com.norbl.cbp.ppe.usermonitor
Class ReadWriteConnection

java.lang.Object
  extended by com.norbl.cbp.ppe.usermonitor.ReadWriteConnection

public class ReadWriteConnection
extends java.lang.Object

A socket connection to another java app and the associated object stream reader and writer. Note that a JReader, RWriter pair share the same connection (since both actually need to read and write.

A ConnectionJ is not itself secure. Security is achieved by doing communication via ssh port forwarding.


Nested Class Summary
static class ReadWriteConnection.HostType
           
 
Field Summary
static int MAX_WRITE_RETRIES
           
static long RETRY_NAP
           
 
Constructor Summary
ReadWriteConnection(java.net.Socket socket, ReadWriteConnection.HostType type)
           
 
Method Summary
 void close()
           
 java.io.Serializable readMessage()
           
 void writeMessage(java.io.Serializable obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_WRITE_RETRIES

public static int MAX_WRITE_RETRIES

RETRY_NAP

public static long RETRY_NAP
Constructor Detail

ReadWriteConnection

public ReadWriteConnection(java.net.Socket socket,
                           ReadWriteConnection.HostType type)
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

writeMessage

public void writeMessage(java.io.Serializable obj)
                  throws java.lang.Exception
Throws:
java.lang.Exception

readMessage

public java.io.Serializable readMessage()
                                 throws BadMessageException
Throws:
BadMessageException

close

public void close()