|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.transport.stomp.StompWireFormat
Implements the TTMP protocol.
Field Summary |
Fields inherited from interface org.activemq.io.WireFormat |
DEFAULT_MAXIMUM_MESSAGE_SIZE |
Constructor Summary | |
StompWireFormat()
|
Method Summary | |
void |
addSubscription(org.activemq.transport.stomp.Subscription s)
|
boolean |
canProcessWireFormatVersion(int version)
Can this wireformat process packets of this version |
WireFormat |
copy()
Creates a new copy of this wire format so it can be used in another thread/context |
boolean |
doesSupportMessageCompression()
Some wire formats will not be able to understand compressed messages |
boolean |
doesSupportMessageFragmentation()
some wire formats will implement their own fragementation |
void |
enqueuePacket(Packet ack)
|
Packet |
fromBytes(byte[] bytes)
Reads the packet from the given byte[] |
Packet |
fromBytes(byte[] bytes,
int offset,
int length)
Reads the packet from the given byte[] |
int |
getCurrentWireFormatVersion()
|
short |
getSessionId()
|
org.activemq.transport.stomp.Subscription |
getSubscriptionFor(ActiveMQDestination destination)
|
void |
initiateClientSideProtocol()
Some wire formats require a handshake at start-up |
void |
initiateServerSideProtocol()
Some wire formats require a handshake at start-up |
boolean |
isCachingEnabled()
|
Packet |
readPacket(java.io.DataInput in)
Reads a packet from the given input stream |
Packet |
readPacket(int firstByte,
java.io.DataInput in)
A helper method for working with sockets where the first byte is read first, then the rest of the message is read. |
Packet |
readPacket(java.lang.String channelID,
java.net.DatagramPacket dpacket)
Read a packet from a Datagram packet from the given channelID. |
void |
registerTransportStreams(java.io.DataOutputStream dataOut,
java.io.DataInputStream dataIn)
some transports may register their streams (e.g. |
void |
setCachingEnabled(boolean enableCaching)
|
byte[] |
toBytes(Packet packet)
A helper method which converts a packet into a byte array |
Packet |
writePacket(Packet packet,
java.io.DataOutput out)
Writes the packet to the given output stream |
java.net.DatagramPacket |
writePacket(java.lang.String channelID,
Packet packet)
Writes the given package to a new datagram |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StompWireFormat()
Method Detail |
public Packet readPacket(java.io.DataInput in) throws java.io.IOException
WireFormat
readPacket
in interface WireFormat
in
-
java.io.IOException
public Packet writePacket(Packet packet, java.io.DataOutput out) throws java.io.IOException, javax.jms.JMSException
WireFormat
writePacket
in interface WireFormat
packet
- out
-
javax.jms.JMSException
java.io.IOException
public void registerTransportStreams(java.io.DataOutputStream dataOut, java.io.DataInputStream dataIn)
registerTransportStreams
in interface WireFormat
dataOut
- dataIn
- public void initiateServerSideProtocol() throws java.io.IOException
initiateServerSideProtocol
in interface WireFormat
java.io.IOException
public WireFormat copy()
copy
in interface WireFormat
public void initiateClientSideProtocol() throws java.io.IOException
initiateClientSideProtocol
in interface WireFormat
java.io.IOException
public boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion
in interface WireFormat
version
- the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion
in interface WireFormat
public boolean isCachingEnabled()
isCachingEnabled
in interface WireFormat
public void setCachingEnabled(boolean enableCaching)
setCachingEnabled
in interface WireFormat
enableCaching
- The enableCaching to set.public boolean doesSupportMessageFragmentation()
doesSupportMessageFragmentation
in interface WireFormat
public boolean doesSupportMessageCompression()
doesSupportMessageCompression
in interface WireFormat
public java.net.DatagramPacket writePacket(java.lang.String channelID, Packet packet) throws java.io.IOException, javax.jms.JMSException
writePacket
in interface WireFormat
channelID
- is the unique channel IDpacket
- is the packet to write
java.io.IOException
javax.jms.JMSException
public Packet fromBytes(byte[] bytes, int offset, int length) throws java.io.IOException
fromBytes
in interface WireFormat
bytes
- offset
- length
-
java.io.IOException
public Packet fromBytes(byte[] bytes) throws java.io.IOException
fromBytes
in interface WireFormat
bytes
-
java.io.IOException
public byte[] toBytes(Packet packet) throws java.io.IOException, javax.jms.JMSException
toBytes
in interface WireFormat
packet
-
java.io.IOException
javax.jms.JMSException
public Packet readPacket(int firstByte, java.io.DataInput in) throws java.io.IOException
readPacket
in interface WireFormat
firstByte
- the first byte of the packetin
- the rest of the packet
java.io.IOException
public Packet readPacket(java.lang.String channelID, java.net.DatagramPacket dpacket) throws java.io.IOException
readPacket
in interface WireFormat
channelID
- is the unique channel IDdpacket
-
java.io.IOException
public short getSessionId()
public void addSubscription(org.activemq.transport.stomp.Subscription s)
public void enqueuePacket(Packet ack)
public org.activemq.transport.stomp.Subscription getSubscriptionFor(ActiveMQDestination destination)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |