org.apache.activemq.wireformat
Interface WireFormat

All Known Implementing Classes:
ObjectStreamWireFormat, OpenWireFormat, StompWireFormat, TextWireFormat, XmppWireFormat, XStreamWireFormat

public interface WireFormat

Provides a mechanism to marshal commands into and out of packets or into and out of streams, Channels and Datagrams.

Version:
$Revision: 1.1 $

Method Summary
 int getVersion()
           
 ByteSequence marshal(java.lang.Object command)
          Packet based marshaling
 void marshal(java.lang.Object command, java.io.DataOutput out)
          Stream based marshaling
 void setVersion(int version)
           
 java.lang.Object unmarshal(ByteSequence packet)
          Packet based un-marshaling
 java.lang.Object unmarshal(java.io.DataInput in)
          Packet based un-marshaling
 

Method Detail

marshal

ByteSequence marshal(java.lang.Object command)
                     throws java.io.IOException
Packet based marshaling

Throws:
java.io.IOException

unmarshal

java.lang.Object unmarshal(ByteSequence packet)
                           throws java.io.IOException
Packet based un-marshaling

Throws:
java.io.IOException

marshal

void marshal(java.lang.Object command,
             java.io.DataOutput out)
             throws java.io.IOException
Stream based marshaling

Throws:
java.io.IOException

unmarshal

java.lang.Object unmarshal(java.io.DataInput in)
                           throws java.io.IOException
Packet based un-marshaling

Throws:
java.io.IOException

setVersion

void setVersion(int version)
Parameters:
the - version of the wire format

getVersion

int getVersion()
Returns:
the version of the wire format


Copyright © 2010 Apache Software Foundation. All Rights Reserved.