| |
|
| java.lang.Object java.io.OutputStream java.io.ObjectOutputStream org.apache.harmony.rmi.transport.RMIObjectOutputStream
All known Subclasses: org.apache.harmony.rmi.MarshalledObjectOutputStream,
RMIObjectOutputStream | public class RMIObjectOutputStream extends ObjectOutputStream (Code) | | The RMIObjectOutputStream is a subclass of ObjectOutputStream performing
serialization for RMI calls. The following rules are used in addition to
normal serialization ones:
- if codebase URL is available for a class, the class will be annotated
with this URL
- remote objects are represented in RMIOutputStream by serialized forms
of their stubs
author: Mikhail A. Markov version: $Revision: 1.1.2.2 $ |
Field Summary | |
protected boolean | hasAnnotations True if at least one of written annotations is not null. |
Method Summary | |
protected void | annotateClass(Class cl) Annotates specified class with it's codebase URL if available. | protected void | annotateProxyClass(Class cl) Annotates specified proxy class with it's codebase URL if available. | public void | flush() Flushes the stream. | public UID | getUID() Returns uid used for DGC ack. | protected boolean | hasAnnotations() Returns true if at least one of written annotations is not null and
false otherwise. | public boolean | isResultStream() Returns true if this stream was created in RemoteCall.getResultStream()
method and false otherwise. | protected Object | replaceObject(Object obj) Replaces exported Remote objects with their stubs. | protected void | setLocStream(ObjectOutputStream out) Sets annotation's stream to the value specified. | public void | writeRMIObject(Object obj, Class cl) Write specified obj (possibly primitive) to the stream. | public void | writeUID() Writes DGC ack UID to this stream. |
hasAnnotations | protected boolean hasAnnotations(Code) | | True if at least one of written annotations is not null.
|
RMIObjectOutputStream | public RMIObjectOutputStream(OutputStream out) throws IOException(Code) | | Constructs a RMIObjectOutputStream that writes to the specified
OutputStream.
Parameters: out - underlying OutputStream throws: IOException - if an I/O error occurred during stream initialization |
RMIObjectOutputStream | public RMIObjectOutputStream(OutputStream out, boolean isResultStream) throws IOException(Code) | | Constructs a RMIObjectOutputStream that writes to the specified
OutputStream.
Parameters: out - underlying OutputStream Parameters: isResultStream - true if this stream was createdin RemoteCall.getResultStream() method throws: IOException - if an I/O error occurred during stream initialization |
annotateClass | protected void annotateClass(Class cl) throws IOException(Code) | | Annotates specified class with it's codebase URL if available.
Parameters: cl - class to be annotated |
annotateProxyClass | protected void annotateProxyClass(Class cl) throws IOException(Code) | | Annotates specified proxy class with it's codebase URL if available.
Parameters: cl - proxy class to be annotated |
getUID | public UID getUID()(Code) | | Returns uid used for DGC ack.
uid used for DGC ack |
hasAnnotations | protected boolean hasAnnotations()(Code) | | Returns true if at least one of written annotations is not null and
false otherwise.
true if at least one of written annotations is not null |
isResultStream | public boolean isResultStream()(Code) | | Returns true if this stream was created in RemoteCall.getResultStream()
method and false otherwise.
true if this stream was created in RemoteCall.getResultStream()method and false otherwise |
replaceObject | protected Object replaceObject(Object obj) throws IOException(Code) | | Replaces exported Remote objects with their stubs.
Parameters: obj - Object to be replaced if needed stub for exported Remote object or unmodified object otherwise throws: IOException - |
setLocStream | protected void setLocStream(ObjectOutputStream out)(Code) | | Sets annotation's stream to the value specified.
Subclasses should call this method if they want to write annotations to
the stream other then one for objects themselves.
Parameters: out - stream for annotations |
writeRMIObject | public void writeRMIObject(Object obj, Class cl) throws IOException(Code) | | Write specified obj (possibly primitive) to the stream.
Parameters: obj - object (possibly primitive) to be written to the stream Parameters: cl - type of object to be written to the stream throws: IOException - if an I/O error occurred during serialization |
writeUID | public void writeUID() throws IOException(Code) | | Writes DGC ack UID to this stream.
throws: IOException - if any I/O error occurred while writing |
|
|
|