public class TransportImpl extends EndpointImpl implements ProtonJTransport, FrameBody.FrameBodyHandler<java.lang.Integer>, FrameHandler
Transport.FactoryDEFAULT_MAX_FRAME_SIZE, END_OF_STREAM, MIN_MAX_FRAME_SIZE, SESSION_WINDOW, TRACE_DRV, TRACE_FRM, TRACE_OFF, TRACE_RAW| Constructor and Description |
|---|
TransportImpl()
Deprecated.
This constructor's visibility will be reduced to the default scope in a future release.
Client code outside this module should use a
EngineFactory instead |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Connection conn) |
int |
capacity() |
void |
close_head() |
void |
close_tail() |
void |
closed(TransportException error) |
int |
getChannelMax() |
ErrorCondition |
getCondition() |
protected ConnectionImpl |
getConnectionImpl() |
java.nio.ByteBuffer |
getInputBuffer()
Get a buffer that can be used to write input data into the transport.
|
int |
getMaxFrameSize()
Get the maximum frame size for the transport
|
java.nio.ByteBuffer |
getOutputBuffer()
Get a read-only byte buffer containing the transport's pending output.
|
ProtocolTracer |
getProtocolTracer() |
int |
getRemoteChannelMax() |
int |
getRemoteMaxFrameSize() |
void |
handleAttach(Attach attach,
Binary payload,
java.lang.Integer channel) |
void |
handleBegin(Begin begin,
Binary payload,
java.lang.Integer channel) |
void |
handleClose(Close close,
Binary payload,
java.lang.Integer channel) |
void |
handleDetach(Detach detach,
Binary payload,
java.lang.Integer channel) |
void |
handleDisposition(Disposition disposition,
Binary payload,
java.lang.Integer channel) |
void |
handleEnd(End end,
Binary payload,
java.lang.Integer channel) |
void |
handleFlow(Flow flow,
Binary payload,
java.lang.Integer channel) |
boolean |
handleFrame(TransportFrame frame) |
void |
handleOpen(Open open,
Binary payload,
java.lang.Integer channel) |
void |
handleTransfer(Transfer transfer,
Binary payload,
java.lang.Integer channel) |
java.nio.ByteBuffer |
head() |
int |
input(byte[] bytes,
int offset,
int length)
Processes the provided input.
|
boolean |
isClosed() |
boolean |
isHandlingFrames()
Returns whether I am currently able to handle frames.
|
TransportResult |
oldApiCheckStateBeforeInput(int inputLength)
This method is public as it is used by Python layer.
|
int |
output(byte[] bytes,
int offset,
int size)
Has the transport produce up to size bytes placing the result
into dest beginning at position offset.
|
void |
outputConsumed()
Informs the transport that the output buffer returned by
Transport.getOutputBuffer()
is finished with, allowing implementation-dependent steps to be performed such as
reclaiming buffer space. |
int |
pending() |
void |
pop(int bytes) |
void |
process() |
TransportResult |
processInput()
Tell the transport to process the data written to the input buffer.
|
Sasl |
sasl()
Signal the transport to expect SASL frames used to establish a SASL layer prior to
performing the AMQP protocol version negotiation.
|
void |
setChannelMax(int n) |
void |
setFrameHandler(FrameHandler frameHandler)
Override the default frame handler.
|
void |
setMaxFrameSize(int maxFrameSize)
TODO propagate the new value to
_outputProcessor etc |
void |
setProtocolTracer(ProtocolTracer protocolTracer) |
Ssl |
ssl(SslDomain sslDomain)
As per
Transport.ssl(SslDomain, SslPeerDetails) but no attempt is made to resume a previous SSL session. |
Ssl |
ssl(SslDomain sslDomain,
SslPeerDetails sslPeerDetails)
Wrap this transport's output and input to apply SSL encryption and decryption respectively.
|
java.nio.ByteBuffer |
tail() |
java.lang.String |
toString() |
void |
trace(int levels) |
void |
unbind() |
boolean |
writeInto(java.nio.ByteBuffer outputBuffer)
Writes my pending output bytes into outputBuffer.
|
close, free, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, free, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext@Deprecated public TransportImpl()
EngineFactory insteadpublic int getMaxFrameSize()
TransportgetMaxFrameSize in interface Transportpublic int getRemoteMaxFrameSize()
getRemoteMaxFrameSize in interface Transportpublic void setMaxFrameSize(int maxFrameSize)
_outputProcessor etcsetMaxFrameSize in interface Transportpublic int getChannelMax()
getChannelMax in interface Transportpublic void setChannelMax(int n)
setChannelMax in interface Transportpublic int getRemoteChannelMax()
getRemoteChannelMax in interface Transportpublic ErrorCondition getCondition()
getCondition in interface EndpointgetCondition in interface TransportgetCondition in class EndpointImplpublic void bind(Connection conn)
public int input(byte[] bytes,
int offset,
int length)
Transportpublic TransportResult oldApiCheckStateBeforeInput(int inputLength)
Transport.input(byte[], int, int)public int output(byte[] bytes,
int offset,
int size)
Transportpublic boolean writeInto(java.nio.ByteBuffer outputBuffer)
public Sasl sasl()
TransportSasl object.public Ssl ssl(SslDomain sslDomain, SslPeerDetails sslPeerDetails)
Ssl object, regardless of the parameters supplied.
Note that sslDomain must implement ProtonSslEngineProvider. This is not possible
enforce at the API level because ProtonSslEngineProvider is not part of the
public Proton API.
public Ssl ssl(SslDomain sslDomain)
TransportTransport.ssl(SslDomain, SslPeerDetails) but no attempt is made to resume a previous SSL session.protected ConnectionImpl getConnectionImpl()
getConnectionImpl in class EndpointImplpublic void handleOpen(Open open, Binary payload, java.lang.Integer channel)
handleOpen in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleBegin(Begin begin, Binary payload, java.lang.Integer channel)
handleBegin in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleAttach(Attach attach, Binary payload, java.lang.Integer channel)
handleAttach in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleFlow(Flow flow, Binary payload, java.lang.Integer channel)
handleFlow in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleTransfer(Transfer transfer, Binary payload, java.lang.Integer channel)
handleTransfer in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleDisposition(Disposition disposition, Binary payload, java.lang.Integer channel)
handleDisposition in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleDetach(Detach detach, Binary payload, java.lang.Integer channel)
handleDetach in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleEnd(End end, Binary payload, java.lang.Integer channel)
handleEnd in interface FrameBody.FrameBodyHandler<java.lang.Integer>public void handleClose(Close close, Binary payload, java.lang.Integer channel)
handleClose in interface FrameBody.FrameBodyHandler<java.lang.Integer>public boolean handleFrame(TransportFrame frame)
handleFrame in interface FrameHandlerFrameHandler.isHandlingFrames()public void closed(TransportException error)
closed in interface FrameHandlerpublic boolean isHandlingFrames()
FrameHandlerFrameHandler.handleFrame(TransportFrame).isHandlingFrames in interface FrameHandlerpublic ProtocolTracer getProtocolTracer()
getProtocolTracer in interface ProtonJTransportpublic void setProtocolTracer(ProtocolTracer protocolTracer)
setProtocolTracer in interface ProtonJTransportpublic java.nio.ByteBuffer getInputBuffer()
TransportTransport.processInput()
must be called.
Successive calls to this method are not guaranteed to return the same object.
Once Transport.processInput() is called the buffer must not be used.getInputBuffer in interface Transportpublic TransportResult processInput()
TransportTransport.processInput() calls on this object will
throw an exception.processInput in interface TransportTransport.getInputBuffer()public java.nio.ByteBuffer getOutputBuffer()
TransportTransport.outputConsumed()
must be called.
Successive calls to this method are not guaranteed to return the same object.
Once Transport.outputConsumed() is called the buffer must not be used.
If the transport's state changes AFTER calling this method, this will not be
reflected in the output buffer.getOutputBuffer in interface Transportpublic void outputConsumed()
TransportTransport.getOutputBuffer()
is finished with, allowing implementation-dependent steps to be performed such as
reclaiming buffer space.outputConsumed in interface Transportpublic void process()
throws TransportException
process in interface TransportTransportExceptionpublic void close_tail()
close_tail in interface Transportpublic void close_head()
close_head in interface Transportpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setFrameHandler(FrameHandler frameHandler)
getInputBuffer(), getOutputBuffer(), ssl(SslDomain) etc).Copyright © 2014 FuseSource, Corp.. All Rights Reserved.