saker.build Documentation TaskDoc JavaDoc Packages
public interface RMIObjectOutput extends ObjectOutput
Object stream class for writing objects to the RMI transfer stream.

Declared methods in this class can be used to precisely control the output of transferred objects.

Methods
public void
Writes the parameter as an enum.
public void
Writes the parameter object using the default write mechanism.
public void
Writes the parameter object as a remote object on the other endpoint.
public void
Writes the parameter object as serialized data.
public void
writeWrappedObject(Object obj, Class<extends RMIWrapper> wrapperclass)
Writes the parameter using the specified wrapper class.
Writes the parameter as an enum.
objThe object to write.
IOExceptionIn case of I/O error.
RMIObjectTransferFailureExceptionIf the object cannot be cast to an Enum.
public abstract void writeObject(Object obj) throws IOException
Writes the parameter object using the default write mechanism.
IOExceptionAny of the usual Input/Output related exceptions.
public abstract void writeRemoteObject(Object obj) throws IOException
Writes the parameter object as a remote object on the other endpoint.

The object will be read on the receiver side and any calls made to it will be called on the parameter local instance.

If the parameter is already a remote object on the other endpoint then the other side will receive the local instance to it. Therefore the received object will identity equal to the remote object denoted by this parameter instance.

Use ObjectInput.readObject() to read the object.

objThe object to write a remove proxy of.
IOExceptionIn case of I/O error.
public abstract void writeSerializedObject(Object obj) throws IOException
Writes the parameter object as serialized data.

The object will be serialized using ObjectOutputStream and resulting bytes will be transferred. If the parameter is a remote object, then it will not be serialized but received as the local instance on the other endpoint. ObjectInputStream will be used to read the transferred data.

Use ObjectInput.readObject() to read the object.

objThe object to serialize.
IOExceptionIn case of I/O error.
public abstract void writeWrappedObject(Object obj, Class<extends RMIWrapper> wrapperclass) throws IOException, NullPointerException
Writes the parameter using the specified wrapper class.

The serialization will occur as specified by RMIWrapper.

Use ObjectInput.readObject() to read the object.

objThe object to write.
wrapperclassThe wrapper class which handles the writing.
IOExceptionIn case of I/O error.
NullPointerExceptionIf wrapper class is null.