|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
java.io.ObjectOutputStream
org.ow2.carol.irmi.RMIObjectOutputStream
public class RMIObjectOutputStream
RMIObjectOutputStream is a specialized subclass of
ObjectOutputStream used by this RMI implementation. It must be used
in concert with RMIObjectInputStream. Specialized behavior
includes class annotation using RMIClassLoader, automatic
conversion of Remote objects to stubs, caching of class descriptors
accross calls to ObjectOutputStream.reset(), and output buffering.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.io.ObjectOutputStream |
|---|
java.io.ObjectOutputStream.PutField |
| Field Summary |
|---|
| Fields inherited from interface java.io.ObjectStreamConstants |
|---|
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING |
| Constructor Summary | |
|---|---|
RMIObjectOutputStream(java.io.OutputStream out)
Constructs a new RMIObjectOutputStream that writes to the given OutputStream. |
|
| Method Summary | |
|---|---|
protected void |
annotateClass(java.lang.Class<?> cl)
Implementation of the ObjectOutputStream.annotateClass(Class) callback. |
protected void |
annotateProxyClass(java.lang.Class<?> cl)
Implementation of the ObjectOutputStream.annotateProxyClass(Class cl) callback. |
protected java.lang.Object |
replaceObject(java.lang.Object obj)
Implementation of the ObjectOutputStream.replaceObject(Object) callback. |
protected void |
writeClassDescriptor(java.io.ObjectStreamClass desc)
Implementation of the ObjectOutputStream.writeClassDescriptor(ObjectStreamClass)
callback. |
protected void |
writeStreamHeader()
Implementation of the ObjectOutputStream.writeStreamHeader() callback. |
| Methods inherited from class java.io.ObjectOutputStream |
|---|
close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeUnshared, writeUTF |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RMIObjectOutputStream(java.io.OutputStream out)
throws java.io.IOException
OutputStream.
out - the OutputStream to use for output
java.io.IOException| Method Detail |
|---|
protected void annotateClass(java.lang.Class<?> cl)
throws java.io.IOException
ObjectOutputStream.annotateClass(Class) callback. This
implementation delegates to RMIClassLoader.
annotateClass in class java.io.ObjectOutputStreamcl - the Class to annotate
java.io.IOException - when there is an error with the underlying
stream
protected void annotateProxyClass(java.lang.Class<?> cl)
throws java.io.IOException
ObjectOutputStream.annotateProxyClass(Class cl) callback. This
implementation defers to annotateClass(Class).
annotateProxyClass in class java.io.ObjectOutputStreamcl - the Class to annotate
java.io.IOException - when there is an error with the underlying
streamprotected java.lang.Object replaceObject(java.lang.Object obj)
ObjectOutputStream.replaceObject(Object) callback. This
implementation converts Remote objects to stubs if necessary.
replaceObject in class java.io.ObjectOutputStreamobj - the object being considered for serialization
protected void writeClassDescriptor(java.io.ObjectStreamClass desc)
throws java.io.IOException
ObjectOutputStream.writeClassDescriptor(ObjectStreamClass)
callback. This implementation delegates to the superclass if
this descripter has not already been written to the output
stream, otherwise it sends an integer id referencing the
previously written class.
writeClassDescriptor in class java.io.ObjectOutputStreamdesc - the ObjectStreamClass to write
java.io.IOException - if there is an error with the underlying
streamprotected void writeStreamHeader()
ObjectOutputStream.writeStreamHeader() callback. This
implementation is specifically overriden to do nothing because
both the ObjectOutputStream.writeStreamHeader() and
ObjectInputStream.readStreamHeader() callbacks
are invoked from each class' respective constructor. This
introduces a potentially non obvious side effect when
constructing new stream objects in a client server context
since the ObjectInputStream constructor will
block waiting for input and this can cause deadlock if the
ObjectInputStream is constructed first on both
the client and server ends.
writeStreamHeader in class java.io.ObjectOutputStream
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||