gr.uoa.di.madgik.grs.test
Class SimplePumpable

java.lang.Object
  extended by gr.uoa.di.madgik.grs.test.SimplePumpable
All Implemented Interfaces:
IPumpable

public class SimplePumpable
extends java.lang.Object
implements IPumpable


Field Summary
 int counter
           
 java.lang.String payload
           
 
Constructor Summary
SimplePumpable()
           
 
Method Summary
 void deflate(java.io.DataOutput out)
          Deflates the state and data of the implementor in a from capable of reconstructing the exact same instance
 void fromXML(org.w3c.dom.Element element)
           
 void inflate(java.io.DataInput in)
          Inflate the state and data of the implementor as was previously deflated using IPumpable.deflate(DataOutput)
 void inflate(java.io.DataInput in, boolean reset)
          Inflate the state and data of the implementor as was previously deflated using IPumpable.deflate(DataOutput)
 void populate()
           
 java.lang.String toString()
           
 org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

payload

public java.lang.String payload

counter

public int counter
Constructor Detail

SimplePumpable

public SimplePumpable()
Method Detail

populate

public void populate()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

deflate

public void deflate(java.io.DataOutput out)
             throws GRS2RecordSerializationException
Description copied from interface: IPumpable
Deflates the state and data of the implementor in a from capable of reconstructing the exact same instance

Specified by:
deflate in interface IPumpable
Parameters:
out - the stream to write to
Throws:
GRS2RecordSerializationException - the deflate could not be completed

inflate

public void inflate(java.io.DataInput in)
             throws GRS2RecordSerializationException
Description copied from interface: IPumpable
Inflate the state and data of the implementor as was previously deflated using IPumpable.deflate(DataOutput)

Specified by:
inflate in interface IPumpable
Parameters:
in - the stream to inflate from
Throws:
GRS2RecordSerializationException - the inflate could not be completed

inflate

public void inflate(java.io.DataInput in,
                    boolean reset)
             throws GRS2RecordSerializationException
Description copied from interface: IPumpable
Inflate the state and data of the implementor as was previously deflated using IPumpable.deflate(DataOutput)

Specified by:
inflate in interface IPumpable
Parameters:
in - the stream to inflate from
reset - if the implementor keeps some state over actions previously taken and this is true, this state must be reset
Throws:
GRS2RecordSerializationException - the inflate could not be completed

toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
                          throws GRS2RecordSerializationException,
                                 GRS2RecordDefinitionException,
                                 org.w3c.dom.DOMException
Specified by:
toXML in interface IPumpable
Throws:
GRS2RecordSerializationException
GRS2RecordDefinitionException
org.w3c.dom.DOMException

fromXML

public void fromXML(org.w3c.dom.Element element)
             throws GRS2RecordSerializationException,
                    GRS2RecordDefinitionException,
                    org.w3c.dom.DOMException
Specified by:
fromXML in interface IPumpable
Throws:
GRS2RecordSerializationException
GRS2RecordDefinitionException
org.w3c.dom.DOMException