@Override
    public VirtualConnection sendRequestHeaders(InterChannelCallback callback, boolean bForce) throws MessageSentException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "sendRequestHeaders(async)");
        }
        if (headersSent()) {
            throw new MessageSentException("Headers already sent");
        }

        setPartialBody(true);
        getLink().setAllowReconnect(true);
        setForceAsync(bForce);
        setAppWriteCallback(callback);
        VirtualConnection vc = sendHeaders(getRequestImpl(), HttpOSCWriteCallback.getRef());
        // Note: if forcequeue is true, then we will not get a VC object as
        // the lower layer will use the callback and return null
        if (null != vc && shouldReadResponseImmediately()) {
            // write worked already and we need to read the response headers now
            vc = startResponseRead();
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "sendRequestHeaders(async): " + vc);
        }
        return vc;
    }
@ Override public VirtualConnection sendRequestHeaders ( InterChannelCallback callback , boolean bForce ) throws MessageSentException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "sendRequestHeaders(async)" ) ; } if ( headersSent ( ) ) { throw new MessageSentException ( "Headers already sent" ) ; } setPartialBody ( true ) ; getLink ( ) . setAllowReconnect ( true ) ; setForceAsync ( bForce ) ; setAppWriteCallback ( callback ) ; VirtualConnection vc = sendHeaders ( getRequestImpl ( ) , HttpOSCWriteCallback . getRef ( ) ) ; if ( null != vc && shouldReadResponseImmediately ( ) ) { vc = startResponseRead ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "sendRequestHeaders(async): " + vc ) ; } return vc ; }
Send the headers for the outgoing request asynchronously.

If the write can be done immediately, the VirtualConnection will be
returned and the callback will not be used. The caller is responsible
for handling that situation in their code. A null return code means
that the async write is in progress.

The boolean bForce parameter allows the caller to force the asynchronous
action even if it could be handled immediately. The return
code will always be null and the callback always used.

@param callback
@param bForce
@return VirtualConnection
@throws MessageSentException
-- if the headers have already been sent