Package org.apache.activemq.transport
Class WireFormatNegotiator
- java.lang.Object
-
- org.apache.activemq.transport.TransportFilter
-
- org.apache.activemq.transport.WireFormatNegotiator
-
- All Implemented Interfaces:
Service,Transport,TransportListener
public class WireFormatNegotiator extends TransportFilter
Negotiates the wire format with a new connection
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener
-
-
Constructor Summary
Constructors Constructor Description WireFormatNegotiator(Transport next, OpenWireFormat wireFormat, int minimumVersion)Negotiator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetNegotiateTimeout()voidnegociate(WireFormatInfo info)voidonCommand(Object o)called to process a commandvoidoneway(Object command)A one way asynchronous sendvoidonException(IOException error)An unrecoverable exception has occured on the transportprotected voidonWireFormatNegotiated(WireFormatInfo info)voidsendWireFormat()protected voidsendWireFormat(WireFormatInfo info)voidsetNegotiateTimeout(long negotiateTimeout)voidstart()voidstop()StringtoString()-
Methods inherited from class org.apache.activemq.transport.TransportFilter
asyncRequest, getNext, getPeerCertificates, getReceiveCounter, getRemoteAddress, getTransportListener, getWireFormat, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, request, request, setPeerCertificates, setTransportListener, transportInterupted, transportResumed, updateURIs
-
-
-
-
Constructor Detail
-
WireFormatNegotiator
public WireFormatNegotiator(Transport next, OpenWireFormat wireFormat, int minimumVersion)
Negotiator- Parameters:
next-
-
-
Method Detail
-
start
public void start() throws Exception- Specified by:
startin interfaceService- Overrides:
startin classTransportFilter- Throws:
Exception- See Also:
Service.start()
-
sendWireFormat
public void sendWireFormat() throws IOException- Throws:
IOException
-
stop
public void stop() throws Exception- Specified by:
stopin interfaceService- Overrides:
stopin classTransportFilter- Throws:
Exception- See Also:
Service.stop()
-
oneway
public void oneway(Object command) throws IOException
Description copied from interface:TransportA one way asynchronous send- Specified by:
onewayin interfaceTransport- Overrides:
onewayin classTransportFilter- Throws:
IOException
-
onCommand
public void onCommand(Object o)
Description copied from interface:TransportListenercalled to process a command- Specified by:
onCommandin interfaceTransportListener- Overrides:
onCommandin classTransportFilter
-
negociate
public void negociate(WireFormatInfo info)
-
onException
public void onException(IOException error)
Description copied from interface:TransportListenerAn unrecoverable exception has occured on the transport- Specified by:
onExceptionin interfaceTransportListener- Overrides:
onExceptionin classTransportFilter
-
toString
public String toString()
- Overrides:
toStringin classTransportFilter
-
sendWireFormat
protected void sendWireFormat(WireFormatInfo info) throws IOException
- Throws:
IOException
-
onWireFormatNegotiated
protected void onWireFormatNegotiated(WireFormatInfo info)
-
getNegotiateTimeout
public long getNegotiateTimeout()
-
setNegotiateTimeout
public void setNegotiateTimeout(long negotiateTimeout)
-
-