Package com.sun.corba.se.impl.encoding
Class BufferManagerWrite
java.lang.Object
com.sun.corba.se.impl.encoding.BufferManagerWrite
- Direct Known Subclasses:
BufferManagerWriteCollect,BufferManagerWriteGrow,BufferManagerWriteStream
Defines the contract between the BufferManager and
CDR stream on the writing side. The CDR stream
calls back to the BufferManagerWrite when it needs
more room in the output buffer to continue. The
BufferManager can then grow the output buffer or
use some kind of fragmentation technique.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ORBprotected Objectprotected booleanprotected ORBUtilSystemException -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclose()Close the BufferManagerWrite and do any outstanding cleanup.abstract intReturns the correct buffer size for this type of buffer manager as set in the ORB.abstract voidoverflow(ByteBufferWithInfo bbwi) abstract voidCalled after Stub.abstract booleanHas the stream sent out any fragments so far?booleanHas the entire message been sent?voidsetOutputObject(Object outputObject) A reference to the connection level stream will be required when sending fragments.
-
Field Details
-
orb
-
wrapper
-
outputObject
-
sentFullMessage
protected boolean sentFullMessage
-
-
Method Details
-
sentFragment
public abstract boolean sentFragment()Has the stream sent out any fragments so far? -
sentFullMessage
public boolean sentFullMessage()Has the entire message been sent? (Has sendMessage been called?) -
getBufferSize
public abstract int getBufferSize()Returns the correct buffer size for this type of buffer manager as set in the ORB. -
overflow
-
sendMessage
public abstract void sendMessage()Called after Stub._invoke (i.e., before complete message has been sent). IIOPOutputStream.writeTo called from IIOPOutputStream.invoke Case: overflow was never called (bbwi.buf contains complete message). Backpatch size field. If growing or collecting: this.bufQ.put(bbwi). this.bufQ.iterate // However, see comment in getBufferQ this.connection.send(fragment) If streaming: this.connection.send(bbwi). Case: overflow was called N times (bbwi.buf contains last buffer). If growing or collecting: this.bufQ.put(bbwi). backpatch size field in first buffer. this.bufQ.iterate // However, see comment in getBufferQ this.connection.send(fragment) If streaming: backpatch fragment size field in bbwi.buf. Set no more fragments bit. this.connection.send(bbwi). -
setOutputObject
A reference to the connection level stream will be required when sending fragments. -
close
public abstract void close()Close the BufferManagerWrite and do any outstanding cleanup.
-