|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.transport.stomp.StompWireFormat
public class 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 |
addAckListener(org.activemq.transport.stomp.AckListener listener)
|
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[] |
List |
getAckListeners()
|
int |
getCurrentWireFormatVersion()
|
short |
getSessionId()
|
org.activemq.transport.stomp.Subscription |
getSubscriptionFor(ActiveMQDestination destination)
|
String |
getTransactionId(String key)
|
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(DataInput in)
Reads a packet from the given input stream |
Packet |
readPacket(int firstByte,
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(String channelID,
DatagramPacket dpacket)
Read a packet from a Datagram packet from the given channelID. |
void |
registerTransactionId(String user_tx_id,
String tx_id)
|
void |
registerTransportStreams(DataOutputStream dataOut,
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,
DataOutput out)
Writes the packet to the given output stream |
DatagramPacket |
writePacket(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(DataInput in) throws IOException
WireFormat
readPacket
in interface WireFormat
IOException
public Packet writePacket(Packet packet, DataOutput out) throws IOException, JMSException
WireFormat
writePacket
in interface WireFormat
IOException
JMSException
public void registerTransportStreams(DataOutputStream dataOut, DataInputStream dataIn)
registerTransportStreams
in interface WireFormat
dataOut
- dataIn
- public void initiateServerSideProtocol() throws IOException
initiateServerSideProtocol
in interface WireFormat
IOException
public WireFormat copy()
copy
in interface WireFormat
public void initiateClientSideProtocol() throws IOException
initiateClientSideProtocol
in interface WireFormat
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 DatagramPacket writePacket(String channelID, Packet packet) throws IOException, JMSException
writePacket
in interface WireFormat
channelID
- is the unique channel IDpacket
- is the packet to write
IOException
JMSException
public Packet fromBytes(byte[] bytes, int offset, int length) throws IOException
fromBytes
in interface WireFormat
bytes
- offset
- length
-
IOException
public Packet fromBytes(byte[] bytes) throws IOException
fromBytes
in interface WireFormat
bytes
-
IOException
public byte[] toBytes(Packet packet) throws IOException, JMSException
toBytes
in interface WireFormat
packet
-
IOException
JMSException
public Packet readPacket(int firstByte, DataInput in) throws IOException
readPacket
in interface WireFormat
firstByte
- the first byte of the packetin
- the rest of the packet
IOException
public Packet readPacket(String channelID, DatagramPacket dpacket) throws IOException
readPacket
in interface WireFormat
channelID
- is the unique channel IDdpacket
-
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)
public void addAckListener(org.activemq.transport.stomp.AckListener listener)
public List getAckListeners()
public String getTransactionId(String key)
public void registerTransactionId(String user_tx_id, String tx_id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |