com.anwrt.commons.protocol
Class AwtHessianParser

java.lang.Object
  extended by com.anwrt.commons.protocol.AwtHessianParser

public class AwtHessianParser
extends java.lang.Object

AwtHessianParser is used to deserialize hessian objects from a stream to a Java Object
creation : 13 aug 2008

Author:
David FRANCOIS

Field Summary
 java.util.ArrayList classDefs
          List of class def
 java.util.ArrayList directClassDefs
          List of direct class defs
 
Constructor Summary
AwtHessianParser()
           
 
Method Summary
 void addClassDefs(HessianClassdef hessianClassdef)
           
 java.lang.Object deserialize(HessianValue aValue)
          Deserialize the HessianValue given as parameter to a Java object
 java.util.List getClassDefs()
           
 HessianValue parse(byte[] buffer)
          Parse the byte array given as parameter and return the parsed HessianValue.
 HessianValue parse(java.io.InputStream is)
          Parse the stream given as parameter and return the parsed HessianValue.
 HessianEnvelope parseEnvelope(java.io.InputStream is)
          Read from the stream given as parameter and return the read HessianEnveloppe.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classDefs

public final java.util.ArrayList classDefs
List of class def


directClassDefs

public final java.util.ArrayList directClassDefs
List of direct class defs

Constructor Detail

AwtHessianParser

public AwtHessianParser()
Method Detail

parseEnvelope

public HessianEnvelope parseEnvelope(java.io.InputStream is)
                              throws AwtHessianParserException
Read from the stream given as parameter and return the read HessianEnveloppe.

Parameters:
is - The stream to be read.
Returns:
a HessianEnveloppe.
Throws:
AwtHessianParserException - if an error occurred.

parse

public HessianValue parse(byte[] buffer)
                   throws AwtHessianParserException
Parse the byte array given as parameter and return the parsed HessianValue.

Parameters:
buffer - The byte array to be parsed.
Returns:
the HessianObject read.
Throws:
AwtHessianParserException - if an error occurred during parse.

parse

public HessianValue parse(java.io.InputStream is)
                   throws AwtHessianParserException
Parse the stream given as parameter and return the parsed HessianValue.

Parameters:
is - The Stream array to be parsed.
Returns:
the HessianObject read.
Throws:
AwtHessianParserException - if an error occurred during parse.

deserialize

public java.lang.Object deserialize(HessianValue aValue)
                             throws AwtHessianParserException
Deserialize the HessianValue given as parameter to a Java object

Parameters:
aValue -
Returns:
the Java Object deserialized
Throws:
AwtHessianParserException

getClassDefs

public java.util.List getClassDefs()

addClassDefs

public void addClassDefs(HessianClassdef hessianClassdef)