FileDocCategorySizeDatePackage
BufferManagerWrite.javaAPI DocJava SE 5 API4046Fri Aug 26 14:54:20 BST 2005com.sun.corba.se.impl.encoding

BufferManagerWrite

public abstract class BufferManagerWrite extends Object
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.

Fields Summary
protected com.sun.corba.se.spi.orb.ORB
orb
protected com.sun.corba.se.impl.logging.ORBUtilSystemException
wrapper
protected Object
outputObject
protected boolean
sentFullMessage
Constructors Summary
BufferManagerWrite(com.sun.corba.se.spi.orb.ORB orb)

	this.orb = orb ;
	this.wrapper = ORBUtilSystemException.get( orb,
	    CORBALogDomains.RPC_ENCODING ) ;
    
Methods Summary
public abstract voidclose()
Close the BufferManagerWrite and do any outstanding cleanup.

public abstract intgetBufferSize()
Returns the correct buffer size for this type of buffer manager as set in the ORB.

public abstract voidoverflow(com.sun.corba.se.impl.encoding.ByteBufferWithInfo bbwi)

public abstract voidsendMessage()
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).

public abstract booleansentFragment()
Has the stream sent out any fragments so far?

public booleansentFullMessage()
Has the entire message been sent? (Has sendMessage been called?)

        return sentFullMessage;
    
public voidsetOutputObject(java.lang.Object outputObject)
A reference to the connection level stream will be required when sending fragments.

        this.outputObject = outputObject;