APIdia Launch Partner
Top Description Fields Constructors Methods
sun.rmi.transport

pack-priv Class ConnectionOutputStream

extends MarshalOutputStream
Class Inheritance
Imports
java.io.IOException, java.rmi.server.UID, sun.rmi.server.MarshalOutputStream

Special stream to keep track of refs being marshaled as return results to determine whether a special ack needs to be sent to the distributed collector.
Author
Ann Wollrath

Field Summary

Modifier and TypeField and Description
private final UID
ackID

identifier for gc ack

private final Connection
conn

connection associated with ConnectionOutputStream

private DGCAckHandler
dgcAckHandler

to store refs to returned remote object until DGC ack is received

private final boolean
resultStream

indicates whether output stream is used to marshal results

Constructor Summary

AccessConstructor and Description
pack-priv
ConnectionOutputStream(Connection conn, boolean
indicates whether this stream is used to marshal return results
resultStream
)

Constructs an marshal output stream using the underlying stream associated with the connection, the parameter c.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
done()

pack-priv DGCAckHandler
getDGCAckHandler()

Returns this stream's DGCAckHandler, or null if it doesn't have one (saveObject was not invoked).

pack-priv boolean
isResultStream()

Returns true if this output stream is used to marshal return results; otherwise returns false.

pack-priv void
saveObject(Object obj)

Saves a reference to the specified object in this stream's DGCAckHandler.

pack-priv void
Inherited from sun.rmi.server.MarshalOutputStream:
annotateClassannotateProxyClassreplaceObjectwriteLocation

Field Detail

ackIDback to summary
private final UID ackID

identifier for gc ack

connback to summary
private final Connection conn

connection associated with ConnectionOutputStream

dgcAckHandlerback to summary
private DGCAckHandler dgcAckHandler

to store refs to returned remote object until DGC ack is received

resultStreamback to summary
private final boolean resultStream

indicates whether output stream is used to marshal results

Constructor Detail

ConnectionOutputStreamback to summary
pack-priv ConnectionOutputStream(Connection conn, boolean resultStream) throws IOException

Constructs an marshal output stream using the underlying stream associated with the connection, the parameter c.

Parameters
resultStream:boolean

indicates whether this stream is used to marshal return results

Method Detail

doneback to summary
pack-priv void done()
getDGCAckHandlerback to summary
pack-priv DGCAckHandler getDGCAckHandler()

Returns this stream's DGCAckHandler, or null if it doesn't have one (saveObject was not invoked). This method should only be invoked after all objects have been written to the stream, because future objects written may yet cause a DGCAckHandler to be created (by invoking saveObject).

isResultStreamback to summary
pack-priv boolean isResultStream()

Returns true if this output stream is used to marshal return results; otherwise returns false.

saveObjectback to summary
pack-priv void saveObject(Object obj)

Saves a reference to the specified object in this stream's DGCAckHandler.

writeIDback to summary
pack-priv void writeID() throws IOException