org.hypergraphdb.peer.protocol
Class Protocol

java.lang.Object
  extended by org.hypergraphdb.peer.protocol.Protocol

public class Protocol
extends java.lang.Object

Author:
Cipri Costa Simple class for now that serializes messages. Will become the point where the format of the serialization is decided.

Constructor Summary
Protocol()
           
 
Method Summary
 void createResponse(java.io.OutputStream out, java.lang.Object response)
           
 java.lang.Object handleResponse(java.io.InputStream in)
           
 java.lang.Object readMessage(java.io.InputStream in)
           
 void writeMessage(java.io.OutputStream out, java.lang.Object msg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Protocol

public Protocol()
Method Detail

readMessage

public java.lang.Object readMessage(java.io.InputStream in)
                             throws java.io.IOException
Parameters:
in -
session -
Returns:
Throws:
java.io.IOException

handleResponse

public java.lang.Object handleResponse(java.io.InputStream in)
                                throws java.io.IOException
Throws:
java.io.IOException

writeMessage

public void writeMessage(java.io.OutputStream out,
                         java.lang.Object msg)
                  throws java.io.IOException
Throws:
java.io.IOException

createResponse

public void createResponse(java.io.OutputStream out,
                           java.lang.Object response)
                    throws java.io.IOException
Throws:
java.io.IOException