Java Code Examples for com.sun.corba.se.pept.encoding.OutputObject

The following examples show how to use com.sun.corba.se.pept.encoding.OutputObject. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private void sendFragment(boolean isLastFragment)
{
    Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection();

    // REVISIT: need an ORB
    //System.out.println("sendFragment: last?: " + isLastFragment);
    conn.writeLock();

    try {
        // Send the fragment
        conn.sendWithoutLock(((OutputObject)outputObject));

        fragmentCount++;

    } finally {

        conn.writeUnlock();
    }

}
 
Example 2
private void sendFragment(boolean isLastFragment)
{
    Connection conn = ((OutputObject)outputObject).getMessageMediator().getConnection();

    // REVISIT: need an ORB
    //System.out.println("sendFragment: last?: " + isLastFragment);
    conn.writeLock();

    try {
        // Send the fragment
        conn.sendWithoutLock(((OutputObject)outputObject));

        fragmentCount++;

    } finally {

        conn.writeUnlock();
    }

}
 
Example 3
Source Project: hottub   Source File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;

    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion());

    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 4
Source Project: JDKSourceCode1.8   Source File: CorbaContactInfoBase.java    License: MIT License 5 votes vote down vote up
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;

    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion());

    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 5
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;

    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion());

    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 6
private void endRequest(CorbaMessageMediator messageMediator)
{
    ORB orb = (ORB) messageMediator.getBroker();
    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest<-: " + opAndId(messageMediator));
    }

    // release NIO ByteBuffers to ByteBufferPool

    try {
        OutputObject outputObj = messageMediator.getOutputObject();
        if (outputObj != null) {
            outputObj.close();
        }
        InputObject inputObj = messageMediator.getInputObject();
        if (inputObj != null) {
            inputObj.close();
        }
    } catch (IOException ex) {
        // Given what close() does, this catch shouldn't ever happen.
        // See CDRInput/OutputObject.close() for more info.
        // It also won't result in a Corba error if an IOException happens.
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest: IOException:" + ex.getMessage(), ex);
        }
    } finally {
        ((CorbaConnection)messageMediator.getConnection()).serverRequestProcessingEnds();
    }
}
 
Example 7
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;
    // NOTE: GROW.
    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion(),
                            BufferManagerFactory.GROW);
    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 8
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 9
private void endRequest(CorbaMessageMediator messageMediator)
{
    ORB orb = (ORB) messageMediator.getBroker();
    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest<-: " + opAndId(messageMediator));
    }

    // release NIO ByteBuffers to ByteBufferPool

    try {
        OutputObject outputObj = messageMediator.getOutputObject();
        if (outputObj != null) {
            outputObj.close();
        }
        InputObject inputObj = messageMediator.getInputObject();
        if (inputObj != null) {
            inputObj.close();
        }
    } catch (IOException ex) {
        // Given what close() does, this catch shouldn't ever happen.
        // See CDRInput/OutputObject.close() for more info.
        // It also won't result in a Corba error if an IOException happens.
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest: IOException:" + ex.getMessage(), ex);
        }
    } finally {
        ((CorbaConnection)messageMediator.getConnection()).serverRequestProcessingEnds();
    }
}
 
Example 10
public OutputObject createOutputObject(Broker broker,
                                       MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;
    return sun.corba.OutputStreamFactory.newCDROutputObject((ORB) broker,
                   corbaMessageMediator, corbaMessageMediator.getReplyHeader(),
                   corbaMessageMediator.getStreamFormatVersion());
}
 
Example 11
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;
    // NOTE: GROW.
    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion(),
                            BufferManagerFactory.GROW);
    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 12
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 13
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 14
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 15
Source Project: jdk8u60   Source File: CorbaContactInfoBase.java    License: GNU General Public License v2.0 5 votes vote down vote up
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;

    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion());

    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 16
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;

    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion());

    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 17
public OutputObject createOutputObject(Broker broker,
                                       MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;
    return sun.corba.OutputStreamFactory.newCDROutputObject((ORB) broker,
                   corbaMessageMediator, corbaMessageMediator.getReplyHeader(),
                   corbaMessageMediator.getStreamFormatVersion());
}
 
Example 18
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;
    // NOTE: GROW.
    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion(),
                            BufferManagerFactory.GROW);
    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 19
private void endRequest(CorbaMessageMediator messageMediator)
{
    ORB orb = (ORB) messageMediator.getBroker();
    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest<-: " + opAndId(messageMediator));
    }

    // release NIO ByteBuffers to ByteBufferPool

    try {
        OutputObject outputObj = messageMediator.getOutputObject();
        if (outputObj != null) {
            outputObj.close();
        }
        InputObject inputObj = messageMediator.getInputObject();
        if (inputObj != null) {
            inputObj.close();
        }
    } catch (IOException ex) {
        // Given what close() does, this catch shouldn't ever happen.
        // See CDRInput/OutputObject.close() for more info.
        // It also won't result in a Corba error if an IOException happens.
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest: IOException:" + ex.getMessage(), ex);
        }
    } finally {
        ((CorbaConnection)messageMediator.getConnection()).serverRequestProcessingEnds();
    }
}
 
Example 20
private void endRequest(CorbaMessageMediator messageMediator)
{
    ORB orb = (ORB) messageMediator.getBroker();
    if (orb.subcontractDebugFlag) {
        dprint(".handleRequest<-: " + opAndId(messageMediator));
    }

    // release NIO ByteBuffers to ByteBufferPool

    try {
        OutputObject outputObj = messageMediator.getOutputObject();
        if (outputObj != null) {
            outputObj.close();
        }
        InputObject inputObj = messageMediator.getInputObject();
        if (inputObj != null) {
            inputObj.close();
        }
    } catch (IOException ex) {
        // Given what close() does, this catch shouldn't ever happen.
        // See CDRInput/OutputObject.close() for more info.
        // It also won't result in a Corba error if an IOException happens.
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest: IOException:" + ex.getMessage(), ex);
        }
    } finally {
        ((CorbaConnection)messageMediator.getConnection()).serverRequestProcessingEnds();
    }
}
 
Example 21
public OutputObject createOutputObject(MessageMediator messageMediator)
{
    CorbaMessageMediator corbaMessageMediator = (CorbaMessageMediator)
        messageMediator;

    OutputObject outputObject =
        sun.corba.OutputStreamFactory.newCDROutputObject(orb, messageMediator,
                            corbaMessageMediator.getRequestHeader(),
                            corbaMessageMediator.getStreamFormatVersion());

    messageMediator.setOutputObject(outputObject);
    return outputObject;
}
 
Example 22
public void endRequest(Broker broker, Object self, InputObject inputObject)
{
    ORB orb = (ORB)broker ;

    try {
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest->");
        }

        // Note: the inputObject may be null if an error occurs
        //       in request or before _invoke returns.
        // Note: self may be null also (e.g., compiler generates null in stub).

        MessageMediator messageMediator =
            orb.getInvocationInfo().getMessageMediator();
        if (messageMediator != null)
        {
            if (messageMediator.getConnection() != null)
            {
                ((CorbaMessageMediator)messageMediator)
                          .sendCancelRequestIfFinalFragmentNotSent();
            }

            // Release any outstanding NIO ByteBuffers to the ByteBufferPool

            InputObject inputObj = messageMediator.getInputObject();
            if (inputObj != null) {
                inputObj.close();
            }

            OutputObject outputObj = messageMediator.getOutputObject();
            if (outputObj != null) {
                outputObj.close();
            }

        }

        // XREVISIT NOTE - Assumes unregistering the waiter for
        // location forwards has already happened somewhere else.
        // The code below is only going to unregister the final successful
        // request.

        // NOTE: In the case of a recursive stack of endRequests in a
        // finally block (because of Remarshal) only the first call to
        // unregisterWaiter will remove the waiter.  The rest will be
        // noops.
        unregisterWaiter(orb);

        // Invoke Portable Interceptors cleanup.  This is done to handle
        // exceptions during stream marshaling.  More generally, exceptions
        // that occur in the ORB after send_request (which includes
        // after returning from _request) before _invoke:
        orb.getPIHandler().cleanupClientPIRequest();

        // REVISIT: Early replies?
    } catch (IOException ex) {
        // See CDRInput/OutputObject.close() for more info.
        // This won't result in a Corba error if an IOException happens.
        if (orb.subcontractDebugFlag)
        {
            dprint(".endRequest: ignoring IOException - " + ex.toString());
        }
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest<-");
        }
    }
}
 
Example 23
public void sendWithoutLock(OutputObject outputObject)
{
    // Don't we need to check for CloseConnection
    // here?  REVISIT

    // XREVISIT - Shouldn't the MessageMediator
    // be the one to handle writing the data here?

    try {

        // Write the fragment/message

        CDROutputObject cdrOutputObject = (CDROutputObject) outputObject;
        cdrOutputObject.writeTo(this);
        // REVISIT - no flush?
        //socket.getOutputStream().flush();

    } catch (IOException e1) {

        /*
         * ADDED(Ram J) 10/13/2000 In the event of an IOException, try
         * sending a CancelRequest for regular requests / locate requests
         */

        // Since IIOPOutputStream's msgheader is set only once, and not
        // altered during sending multiple fragments, the original
        // msgheader will always have the requestId.
        // REVISIT This could be optimized to send a CancelRequest only
        // if any fragments had been sent already.

        /* REVISIT: MOVE TO SUBCONTRACT
        Message msg = os.getMessage();
        if (msg.getType() == Message.GIOPRequest ||
                msg.getType() == Message.GIOPLocateRequest) {
            GIOPVersion requestVersion = msg.getGIOPVersion();
            int requestId = MessageBase.getRequestId(msg);
            try {
                sendCancelRequest(requestVersion, requestId);
            } catch (IOException e2) {
                // most likely an abortive connection closure.
                // ignore, since nothing more can be done.
                if (orb.transportDebugFlag) {

            }
        }
        */

        // REVISIT When a send failure happens, purgeCalls() need to be
        // called to ensure that the connection is properly removed from
        // further usage (ie., cancelling pending requests with COMM_FAILURE
        // with an appropriate minor_code CompletionStatus.MAY_BE).

        // Relying on the IIOPOutputStream (as noted below) is not
        // sufficient as it handles COMM_FAILURE only for the final
        // fragment (during invoke processing). Note that COMM_FAILURE could
        // happen while sending the initial fragments.
        // Also the IIOPOutputStream does not properly close the connection.
        // It simply removes the connection from the table. An orderly
        // closure is needed (ie., cancel pending requests on the connection
        // COMM_FAILURE as well.

        // IIOPOutputStream will cleanup the connection info when it
        // sees this exception.
        SystemException exc = wrapper.writeErrorSend(e1);
        purgeCalls(exc, false, true);
        throw exc;
    }
}
 
Example 24
public void endRequest(Broker broker, Object self, InputObject inputObject)
{
    ORB orb = (ORB)broker ;

    try {
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest->");
        }

        // Note: the inputObject may be null if an error occurs
        //       in request or before _invoke returns.
        // Note: self may be null also (e.g., compiler generates null in stub).

        MessageMediator messageMediator =
            orb.getInvocationInfo().getMessageMediator();
        if (messageMediator != null)
        {
            if (messageMediator.getConnection() != null)
            {
                ((CorbaMessageMediator)messageMediator)
                          .sendCancelRequestIfFinalFragmentNotSent();
            }

            // Release any outstanding NIO ByteBuffers to the ByteBufferPool

            InputObject inputObj = messageMediator.getInputObject();
            if (inputObj != null) {
                inputObj.close();
            }

            OutputObject outputObj = messageMediator.getOutputObject();
            if (outputObj != null) {
                outputObj.close();
            }

        }

        // XREVISIT NOTE - Assumes unregistering the waiter for
        // location forwards has already happened somewhere else.
        // The code below is only going to unregister the final successful
        // request.

        // NOTE: In the case of a recursive stack of endRequests in a
        // finally block (because of Remarshal) only the first call to
        // unregisterWaiter will remove the waiter.  The rest will be
        // noops.
        unregisterWaiter(orb);

        // Invoke Portable Interceptors cleanup.  This is done to handle
        // exceptions during stream marshaling.  More generally, exceptions
        // that occur in the ORB after send_request (which includes
        // after returning from _request) before _invoke:
        orb.getPIHandler().cleanupClientPIRequest();

        // REVISIT: Early replies?
    } catch (IOException ex) {
        // See CDRInput/OutputObject.close() for more info.
        // This won't result in a Corba error if an IOException happens.
        if (orb.subcontractDebugFlag)
        {
            dprint(".endRequest: ignoring IOException - " + ex.toString());
        }
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".endRequest<-");
        }
    }
}
 
Example 25
protected CorbaMessageMediator createResponseHelper(
    CorbaMessageMediator messageMediator, ReplyMessage reply, IOR ior)
{
    // REVISIT - these should be invoked from subcontract.
    runServantPostInvoke(messageMediator);
    runInterceptors(messageMediator, reply);
    runRemoveThreadInfo(messageMediator);

    if (((ORB)messageMediator.getBroker()).subcontractDebugFlag) {
        dprint(".createResponseHelper: "
               + opAndId(messageMediator) + ": "
               + reply);
    }

    messageMediator.setReplyHeader(reply);

    OutputObject replyOutputObject;
    // REVISIT = do not use null.
    //
    if (messageMediator.getConnection() == null) {
        replyOutputObject =
            sun.corba.OutputStreamFactory.newCDROutputObject(orb,
                        messageMediator, messageMediator.getReplyHeader(),
                        messageMediator.getStreamFormatVersion(),
                        BufferManagerFactory.GROW);
    } else {
        replyOutputObject = messageMediator.getConnection().getAcceptor()
         .createOutputObject(messageMediator.getBroker(), messageMediator);
    }
    messageMediator.setOutputObject(replyOutputObject);
    messageMediator.getOutputObject().setMessageMediator(messageMediator);

    reply.write((OutputStream) messageMediator.getOutputObject());
    if (reply.getIOR() != null) {
        reply.getIOR().write((OutputStream) messageMediator.getOutputObject());
    }
    // REVISIT - not necessary?
    //messageMediator.this.replyIOR = reply.getIOR();

    // NOTE: The mediator holds onto output object so return value
    // not really necessary.
    return messageMediator;
}
 
Example 26
Source Project: openjdk-8   Source File: ParserTable.java    License: GNU General Public License v2.0 4 votes vote down vote up
public OutputObject createOutputObject(
Broker broker, MessageMediator messageMediator) { return null; }
 
Example 27
Source Project: JDKSourceCode1.8   Source File: CorbaMessageMediatorImpl.java    License: MIT License 4 votes vote down vote up
public OutputObject getOutputObject()
{
    return outputObject;
}
 
Example 28
public void sendWithoutLock(OutputObject outputObject)
{
    // Don't we need to check for CloseConnection
    // here?  REVISIT

    // XREVISIT - Shouldn't the MessageMediator
    // be the one to handle writing the data here?

    try {

        // Write the fragment/message

        CDROutputObject cdrOutputObject = (CDROutputObject) outputObject;
        cdrOutputObject.writeTo(this);
        // REVISIT - no flush?
        //socket.getOutputStream().flush();

    } catch (IOException e1) {

        /*
         * ADDED(Ram J) 10/13/2000 In the event of an IOException, try
         * sending a CancelRequest for regular requests / locate requests
         */

        // Since IIOPOutputStream's msgheader is set only once, and not
        // altered during sending multiple fragments, the original
        // msgheader will always have the requestId.
        // REVISIT This could be optimized to send a CancelRequest only
        // if any fragments had been sent already.

        /* REVISIT: MOVE TO SUBCONTRACT
        Message msg = os.getMessage();
        if (msg.getType() == Message.GIOPRequest ||
                msg.getType() == Message.GIOPLocateRequest) {
            GIOPVersion requestVersion = msg.getGIOPVersion();
            int requestId = MessageBase.getRequestId(msg);
            try {
                sendCancelRequest(requestVersion, requestId);
            } catch (IOException e2) {
                // most likely an abortive connection closure.
                // ignore, since nothing more can be done.
                if (orb.transportDebugFlag) {

            }
        }
        */

        // REVISIT When a send failure happens, purgeCalls() need to be
        // called to ensure that the connection is properly removed from
        // further usage (ie., cancelling pending requests with COMM_FAILURE
        // with an appropriate minor_code CompletionStatus.MAY_BE).

        // Relying on the IIOPOutputStream (as noted below) is not
        // sufficient as it handles COMM_FAILURE only for the final
        // fragment (during invoke processing). Note that COMM_FAILURE could
        // happen while sending the initial fragments.
        // Also the IIOPOutputStream does not properly close the connection.
        // It simply removes the connection from the table. An orderly
        // closure is needed (ie., cancel pending requests on the connection
        // COMM_FAILURE as well.

        // IIOPOutputStream will cleanup the connection info when it
        // sees this exception.
        SystemException exc = wrapper.writeErrorSend(e1);
        purgeCalls(exc, false, true);
        throw exc;
    }
}
 
Example 29
public void sendMessage ()
{
    Connection conn =
          ((OutputObject)outputObject).getMessageMediator().getConnection();

    conn.writeLock();

    try {

        conn.sendWithoutLock((OutputObject)outputObject);

        sentFullMessage = true;

    } finally {

        conn.writeUnlock();
    }
}
 
Example 30
public void sendMessage ()
{
    // Enqueue the last fragment
    queue.enqueue(((CDROutputObject)outputObject).getByteBufferWithInfo());

    Iterator bufs = iterator();

    Connection conn =
                      ((OutputObject)outputObject).getMessageMediator().
                                                   getConnection();

    // With the collect strategy, we must lock the connection
    // while fragments are being sent.  This is so that there are
    // no interleved fragments in GIOP 1.1.
    //
    // Note that this thread must not call writeLock again in any
    // of its send methods!
    conn.writeLock();

    try {

        // Get a reference to ByteBufferPool so that the ByteBufferWithInfo
        // ByteBuffer can be released to the ByteBufferPool
        ByteBufferPool byteBufferPool = orb.getByteBufferPool();

        while (bufs.hasNext()) {

            ByteBufferWithInfo bbwi = (ByteBufferWithInfo)bufs.next();
            ((CDROutputObject)outputObject).setByteBufferWithInfo(bbwi);

            conn.sendWithoutLock(((CDROutputObject)outputObject));

            sentFragment = true;

            // Release ByteBufferWithInfo's ByteBuffer back to the pool
            // of ByteBuffers.
            if (debug)
            {
                // print address of ByteBuffer being released
                int bbAddress = System.identityHashCode(bbwi.byteBuffer);
                StringBuffer sb = new StringBuffer(80);
                sb.append("sendMessage() - releasing ByteBuffer id (");
                sb.append(bbAddress).append(") to ByteBufferPool.");
                String msg = sb.toString();
                dprint(msg);
            }
            byteBufferPool.releaseByteBuffer(bbwi.byteBuffer);
            bbwi.byteBuffer = null;
            bbwi = null;
        }

        sentFullMessage = true;

    } finally {

        conn.writeUnlock();
    }
}