org.jppf.serialization
Class JPPFConfigurationObjectStreamBuilder

java.lang.Object
  extended by org.jppf.serialization.JPPFConfigurationObjectStreamBuilder
All Implemented Interfaces:
JPPFObjectStreamBuilder

public class JPPFConfigurationObjectStreamBuilder
extends Object
implements JPPFObjectStreamBuilder

Standard object stream factory. This factory creates instances of ObjectInputStream and ObjectOutputStream

Author:
Laurent Cohen

Constructor Summary
JPPFConfigurationObjectStreamBuilder()
          Initialize this builder with the default ObjectInputStream and ObjectOutputStream classes of the JDK.
JPPFConfigurationObjectStreamBuilder(Class<?> oisClass, Class<?> oosClass)
          Initialize this builder with the specified object input and output stream classes.
JPPFConfigurationObjectStreamBuilder(String oisClassName, String oosClassName)
          Initialize this builder with the specified object input and output stream classes.
 
Method Summary
 ObjectInputStream newObjectInputStream(InputStream in)
          Obtain an input stream used for deserializing objects.
 ObjectOutputStream newObjectOutputStream(OutputStream out)
          Obtain an Output stream used for serializing objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPPFConfigurationObjectStreamBuilder

public JPPFConfigurationObjectStreamBuilder()
                                     throws Exception
Initialize this builder with the default ObjectInputStream and ObjectOutputStream classes of the JDK.

Throws:
Exception - if an error is raised while initializing.

JPPFConfigurationObjectStreamBuilder

public JPPFConfigurationObjectStreamBuilder(Class<?> oisClass,
                                            Class<?> oosClass)
                                     throws Exception
Initialize this builder with the specified object input and output stream classes.

Parameters:
oisClass - the object input stream class to use.
oosClass - the object output stream class to use.
Throws:
Exception - if an error is raised while initializing.

JPPFConfigurationObjectStreamBuilder

public JPPFConfigurationObjectStreamBuilder(String oisClassName,
                                            String oosClassName)
                                     throws Exception
Initialize this builder with the specified object input and output stream classes.

Parameters:
oisClassName - the fully qualified name of the object input stream class to use.
oosClassName - the fully qualified name of the object output stream class to use.
Throws:
Exception - if an error is raised while initializing.
Method Detail

newObjectInputStream

public ObjectInputStream newObjectInputStream(InputStream in)
                                       throws Exception
Obtain an input stream used for deserializing objects.

Specified by:
newObjectInputStream in interface JPPFObjectStreamBuilder
Parameters:
in - input stream to read from.
Returns:
an ObjectInputStream
Throws:
Exception - if an error is raised while creating the stream.
See Also:
JPPFObjectStreamBuilder.newObjectInputStream(java.io.InputStream)

newObjectOutputStream

public ObjectOutputStream newObjectOutputStream(OutputStream out)
                                         throws Exception
Obtain an Output stream used for serializing objects.

Specified by:
newObjectOutputStream in interface JPPFObjectStreamBuilder
Parameters:
out - output stream to write to.
Returns:
an ObjectOutputStream
Throws:
Exception - if an error is raised while creating the stream.
See Also:
JPPFObjectStreamBuilder.newObjectOutputStream(java.io.OutputStream)


Copyright © 2005-2010 JPPF Team.