|
||||||||||
| 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 WireFormatIOException
public Packet writePacket(Packet packet,
DataOutput out)
throws IOException,
JMSException
WireFormat
writePacket in interface WireFormatIOException
JMSException
public void registerTransportStreams(DataOutputStream dataOut,
DataInputStream dataIn)
registerTransportStreams in interface WireFormatdataOut - dataIn -
public void initiateServerSideProtocol()
throws IOException
initiateServerSideProtocol in interface WireFormatIOExceptionpublic WireFormat copy()
copy in interface WireFormat
public void initiateClientSideProtocol()
throws IOException
initiateClientSideProtocol in interface WireFormatIOExceptionpublic boolean canProcessWireFormatVersion(int version)
canProcessWireFormatVersion in interface WireFormatversion - the version number to test
public int getCurrentWireFormatVersion()
getCurrentWireFormatVersion in interface WireFormatpublic boolean isCachingEnabled()
isCachingEnabled in interface WireFormatpublic void setCachingEnabled(boolean enableCaching)
setCachingEnabled in interface WireFormatenableCaching - The enableCaching to set.public boolean doesSupportMessageFragmentation()
doesSupportMessageFragmentation in interface WireFormatpublic boolean doesSupportMessageCompression()
doesSupportMessageCompression in interface WireFormat
public DatagramPacket writePacket(String channelID,
Packet packet)
throws IOException,
JMSException
writePacket in interface WireFormatchannelID - 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 WireFormatbytes - offset - length -
IOException
public Packet fromBytes(byte[] bytes)
throws IOException
fromBytes in interface WireFormatbytes -
IOException
public byte[] toBytes(Packet packet)
throws IOException,
JMSException
toBytes in interface WireFormatpacket -
IOException
JMSException
public Packet readPacket(int firstByte,
DataInput in)
throws IOException
readPacket in interface WireFormatfirstByte - the first byte of the packetin - the rest of the packet
IOException
public Packet readPacket(String channelID,
DatagramPacket dpacket)
throws IOException
readPacket in interface WireFormatchannelID - is the unique channel IDdpacket -
IOExceptionpublic 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 | |||||||||