org.activeio.command
Class DefaultWireFormat

java.lang.Object
  extended by org.activeio.command.DefaultWireFormat
All Implemented Interfaces:
WireFormat

public class DefaultWireFormat
extends Object
implements WireFormat

A default implementation which uses serialization

Version:
$Revision: 1.1 $

Constructor Summary
DefaultWireFormat()
           
 
Method Summary
 int getVersion()
           
 Packet marshal(Object command)
          Packet based marshaling
 void marshal(Object command, DataOutputStream ds)
          Stream based marshaling
 void setVersion(int version)
           
 Object unmarshal(DataInputStream ds)
          Packet based un-marshaling
 Object unmarshal(Packet packet)
          Packet based un-marshaling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWireFormat

public DefaultWireFormat()
Method Detail

marshal

public Packet 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(Packet 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,
                    DataOutputStream ds)
             throws IOException
Description copied from interface: WireFormat
Stream based marshaling

Specified by:
marshal in interface WireFormat
Throws:
IOException

unmarshal

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

Specified by:
unmarshal in interface WireFormat
Throws:
IOException

setVersion

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

getVersion

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


Copyright © -2009 The ActiveIO Project. All Rights Reserved.