org.apache.activemq.transport.stomp
Class StompWireFormat

java.lang.Object
  extended by org.apache.activemq.transport.stomp.StompWireFormat
All Implemented Interfaces:
WireFormat

public class StompWireFormat
extends Object
implements WireFormat

Implements marshalling and unmarsalling the Stomp protocol.


Constructor Summary
StompWireFormat()
           
 
Method Summary
 String getStompVersion()
           
 int getVersion()
           
 ByteSequence marshal(Object command)
          Packet based marshaling
 void marshal(Object command, DataOutput os)
          Stream based marshaling
protected  String parseAction(DataInput in)
           
protected  int parseContentLength(String contentLength)
           
protected  HashMap<String,String> parseHeaders(DataInput in)
           
 void setStompVersion(String stompVersion)
           
 void setVersion(int version)
           
 Object unmarshal(ByteSequence packet)
          Packet based un-marshaling
 Object unmarshal(DataInput in)
          Packet based un-marshaling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StompWireFormat

public StompWireFormat()
Method Detail

marshal

public ByteSequence marshal(Object command)
                     throws IOException
Description copied from interface: WireFormat
Packet based marshaling

Specified by:
marshal in interface WireFormat
Throws:
IOException

unmarshal

public Object unmarshal(ByteSequence packet)
                 throws IOException
Description copied from interface: WireFormat
Packet based un-marshaling

Specified by:
unmarshal in interface WireFormat
Throws:
IOException

marshal

public void marshal(Object command,
                    DataOutput os)
             throws IOException
Description copied from interface: WireFormat
Stream based marshaling

Specified by:
marshal in interface WireFormat
Throws:
IOException

unmarshal

public Object unmarshal(DataInput in)
                 throws IOException
Description copied from interface: WireFormat
Packet based un-marshaling

Specified by:
unmarshal in interface WireFormat
Throws:
IOException

parseAction

protected String parseAction(DataInput in)
                      throws IOException
Throws:
IOException

parseHeaders

protected HashMap<String,String> parseHeaders(DataInput in)
                                       throws IOException
Throws:
IOException

parseContentLength

protected int parseContentLength(String contentLength)
                          throws ProtocolException
Throws:
ProtocolException

getVersion

public int getVersion()
Specified by:
getVersion in interface WireFormat
Returns:
the version of the wire format

setVersion

public void setVersion(int version)
Specified by:
setVersion in interface WireFormat

getStompVersion

public String getStompVersion()

setStompVersion

public void setStompVersion(String stompVersion)


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.