@ Override public void flush ( int requestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "flush" , "" + requestNumber ) ; // Locate the browser session to use. BrowserSession browserSession = mainConsumer . getBrowserSession ( ) ; SIBusMessage msg = null ; // Browse the next message and send it to the client. try { msg = getNextMessage ( browserSession , getConversation ( ) , ( short ) requestNumber ) ; if ( msg != null ) sendMessage ( msg ) ; // Send a response to the browse request. try { getConversation ( ) . send ( poolManager . allocate ( ) , JFapChannelConstants . SEG_FLUSH_SESS_R , requestNumber , Conversation . PRIORITY_LOWEST , true , ThrottlingPolicy . BLOCK_THREAD , null ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , CLASS_NAME + ".flush" , CommsConstants . CATBROWSECONSUMER_FLUSH_01 , this ) ; SibTr . error ( tc , "COMMUNICATION_ERROR_SICO2012" , e ) ; // Nothing else we can do at this point as the comms exception suggests that the // conversation is dead, anyway. } } catch ( OperationFailedException e ) { // No FFDC code needed if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . exception ( this , tc , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "flush" ) ; }
Invoked when the client sends a flush consumer . Since browser sessions do not have an activeConsumer method this translates to attempting a single browse next and sending back the result .