public void complete ( VirtualConnection vc , TCPReadRequestContext req ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "complete() called: vc=" + vc ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStateMap ( ) . get ( CallbackIDs . CALLBACK_HTTPOSC ) ; // keep reading and handling new data until either we're done // parsing headers or until we're waiting on a read to finish VirtualConnection readVC = null ; try { do { if ( mySC . parseMessage ( ) ) { // start processing the new parsed message mySC . handleParsedMessage ( ) ; return ; } // not done parsing, read for more data if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Reading for more data" ) ; } // configure the buffers for reading mySC . setupReadBuffers ( mySC . getHttpConfig ( ) . getIncomingHdrBufferSize ( ) , false ) ; readVC = req . read ( 1 , this , false , mySC . getReadTimeout ( ) ) ; } while ( null != readVC ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) + ".complete" , "112" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Caught exception: " + e . getMessage ( ) ) ; } mySC . setPersistent ( false ) ; mySC . getAppWriteCallback ( ) . error ( vc , e ) ; } }
Called by the channel below us when a read has completed .