dist1.acb.common.transport
Class ObjectStreamFactory

java.lang.Object
  extended bydist1.acb.common.transport.ObjectStreamFactory

public class ObjectStreamFactory
extends java.lang.Object

Object Stream Factory

Version:
$Revision: 1.8 $
Author:
Alexander Stasiv

Constructor Summary
protected ObjectStreamFactory()
           
 
Method Summary
static ObjectStreamFactory getInstance()
          Returns instanse of the factory which was provided to setObjectStreamFactory or default instance if setPreprocessFactory was not involved.
 java.io.ObjectInputStream in(java.net.Socket socket)
          The input stream
 java.io.ObjectOutputStream out(java.net.Socket socket)
          The output stream
static void setObjectStreamFactory(ObjectStreamFactory factory)
          Sets new preprocess factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectStreamFactory

protected ObjectStreamFactory()
Method Detail

getInstance

public static ObjectStreamFactory getInstance()
Returns instanse of the factory which was provided to setObjectStreamFactory or default instance if setPreprocessFactory was not involved. The default instance uses CompressedObjectInputStream and CompressedObjectOutputStream

Returns:
The instance

setObjectStreamFactory

public static void setObjectStreamFactory(ObjectStreamFactory factory)
Sets new preprocess factory

Parameters:
factory - The factory

in

public java.io.ObjectInputStream in(java.net.Socket socket)
                             throws java.io.IOException
The input stream

Parameters:
socket - Connected socket
Returns:
Object Input sream which implement requred way of processing the data
Throws:
java.io.IOException - If an I/O error has occurred

out

public java.io.ObjectOutputStream out(java.net.Socket socket)
                               throws java.io.IOException
The output stream

Parameters:
socket - Connected socket
Returns:
Object Output sream which implement requred way of processing the data
Throws:
java.io.IOException - If an I/O error has occurred


Copyright © 2004 Phoenix Team (CMU/AIT). All Rights Reserved.