Transport

<p> Operates on the entities in the associated {@link Connection} by accepting and producing binary AMQP output, potentially layered within SASL and/or SSL. </p> <p> After a connection is bound with {@link #bind(Connection)}, the methods for accepting and producing output are typically repeatedly called. See the specific methods for details of their legal usage. </p> <p> <strong>Processing the input data received from another AMQP container.</strong> </p> <ol> <li>{@link #getInputBuffer()} </li> <li>Write data into input buffer</li> <li>{@link #processInput()}</li> <li>Check the result, e.g. by calling {@link TransportResult#checkIsOk()}</li> </ol> <p> <strong>Getting the output data to send to another AMQP container:</strong> </p> <ol> <li>{@link #getOutputBuffer()} </li> <li>Read output from output buffer</li> <li>{@link #outputConsumed()}</li> </ol>

<p>The following methods on the byte buffers returned by {@link #getInputBuffer()} and {@link #getOutputBuffer()} must not be called: </p> <ol> <li> {@link ByteBuffer#clear()} </li> <li> {@link ByteBuffer#compact()} </li> <li> {@link ByteBuffer#flip()} </li> <li> {@link ByteBuffer#mark()} </li> </ol>

Members

Classes

Factory
class Factory
Undocumented in source.

Functions

bind
void bind(Connection connection)
Undocumented in source.
capacity
int capacity()
Undocumented in source.
close_head
void close_head()
Undocumented in source.
close_tail
void close_tail()
Undocumented in source.
getChannelMax
int getChannelMax()

Gets the local channel-max value to be advertised to the remote peer

getCondition
ErrorCondition getCondition()
Undocumented in source.
getFramesInput
long getFramesInput()
Undocumented in source.
getFramesOutput
long getFramesOutput()
Undocumented in source.
getIdleTimeout
int getIdleTimeout()

@return local idle timeout in milliseconds

getInputBuffer
ByteBuffer getInputBuffer()

Get a buffer that can be used to write input data into the transport. Once the client has finished putting into the input buffer, {@link #processInput()} must be called.

getMaxFrameSize
int getMaxFrameSize()

Get the maximum frame size for the transport

getOutboundFrameSizeLimit
int getOutboundFrameSizeLimit()
Undocumented in source.
getOutputBuffer
ByteBuffer getOutputBuffer()

Get a read-only byte buffer containing the transport's pending output. Once the client has finished getting from the output buffer, {@link #outputConsumed()} must be called.

getRemoteChannelMax
int getRemoteChannelMax()

Gets the remote value of channel-max, as advertised by the peer on its <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-open"> Open frame</a>.

getRemoteIdleTimeout
int getRemoteIdleTimeout()

@return remote idle timeout in milliseconds

getRemoteMaxFrameSize
int getRemoteMaxFrameSize()
Undocumented in source.
head
ByteBuffer head()
Undocumented in source.
input
int input(byte[] bytes, int offset, int size)

Processes the provided input.

isClosed
bool isClosed()
Undocumented in source.
isEmitFlowEventOnSend
bool isEmitFlowEventOnSend()
Undocumented in source.
output
int output(byte[] dest, int offset, int size)

Has the transport produce up to size bytes placing the result into dest beginning at position offset.

outputConsumed
void outputConsumed()

Informs the transport that the output buffer returned by {@link #getOutputBuffer()} is finished with, allowing implementation-dependent steps to be performed such as reclaiming buffer space.

pending
int pending()
Undocumented in source.
pop
void pop(int bytes)
Undocumented in source.
process
void process()
Undocumented in source.
processInput
TransportResult processInput()

Tell the transport to process the data written to the input buffer.

sasl
Sasl sasl()

Signal the transport to expect SASL frames used to establish a SASL layer prior to performing the AMQP protocol version negotiation. This must first be performed before the transport is used for processing. Subsequent invocations will return the same {@link Sasl} object.

setChannelMax
void setChannelMax(int channelMax)

Set the local value of channel-max, to be advertised to the peer on the <a href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-open"> Open frame</a> emitted by the transport.

setEmitFlowEventOnSend
void setEmitFlowEventOnSend(bool emitFlowEventOnSend)

Configure whether a synthetic Flow event should be emitted when messages are sent, reflecting a change in the credit level on the link that may prompt other action.

setIdleTimeout
void setIdleTimeout(int timeout)

@param timeout local idle timeout in milliseconds

setInitialRemoteMaxFrameSize
void setInitialRemoteMaxFrameSize(int size)

Allows overriding the initial remote-max-frame-size to a value greater than the default 512bytes. The value set will be used until such time as the Open frame arrives from the peer and populates the remote max frame size.

setMaxFrameSize
void setMaxFrameSize(int size)
Undocumented in source.
setOutboundFrameSizeLimit
void setOutboundFrameSizeLimit(int size)

Set an upper limit on the size of outgoing frames that will be sent to the peer. Allows constraining the transport not to emit Transfer frames over a given size even when the peers max frame size allows it.

ssl
Ssl ssl(SslDomain sslDomain, SslPeerDetails sslPeerDetails)

Wrap this transport's output and input to apply SSL encryption and decryption respectively.

ssl
Ssl ssl(SslDomain sslDomain)

Equivalent to {@link #ssl(SslDomain, SslPeerDetails)} but passing null for SslPeerDetails, meaning no SNI detail is sent, hostname verification isn't supported etc when connecting.

tail
ByteBuffer tail()
Undocumented in source.
tick
long tick(long nowMillis)

Prompt the transport to perform work such as idle-timeout/heartbeat handling, and return an absolute deadline in milliseconds that tick must again be called by/at, based on the provided current time in milliseconds, to ensure the periodic work is carried out as necessary.

trace
void trace(int levels)
Undocumented in source.
unbind
void unbind()
Undocumented in source.

Static variables

DEFAULT_MAX_FRAME_SIZE
int DEFAULT_MAX_FRAME_SIZE;
Undocumented in source.
TRACE_DRV
int TRACE_DRV;
Undocumented in source.
TRACE_FRM
int TRACE_FRM;
Undocumented in source.
TRACE_OFF
int TRACE_OFF;
Undocumented in source.
TRACE_RAW
int TRACE_RAW;
Undocumented in source.

Variables

END_OF_STREAM
enum int END_OF_STREAM;
Undocumented in source.
MIN_MAX_FRAME_SIZE
enum int MIN_MAX_FRAME_SIZE;

the lower bound for the agreed maximum frame size (in bytes).

SESSION_WINDOW
enum int SESSION_WINDOW;
Undocumented in source.

Inherited Members

From Endpoint

getLocalState
EndpointState getLocalState()

@return the local endpoint state

getRemoteState
EndpointState getRemoteState()

@return the remote endpoint state (as last communicated)

getCondition
ErrorCondition getCondition()

@return the local endpoint error, or null if there is none

setCondition
void setCondition(ErrorCondition condition)

Set the local error condition @param condition

getRemoteCondition
ErrorCondition getRemoteCondition()

@return the remote endpoint error, or null if there is none

free
void free()

free the endpoint and any associated resources

open
void open()

transition local state to ACTIVE

close
void close()

transition local state to CLOSED

setContext
void setContext(Object o)

Sets an arbitrary an application owned object on the end-point. This object is not used by Proton.

getContext
Object getContext()

@see #setContext(Object)

Meta