public void unsetAsynchConsumer ( boolean stoppable ) //SIB0115d.comms throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIErrorException , SIIncorrectCallException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unsetAsynchConsumer" ) ; if ( sessionId == 0 ) { // If the session Id = 0, then no one called setSessionId(). As such we are unable to flow // to the server as we do not know which session to instruct the server to use. SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "SESSION_ID_HAS_NOT_BEEN_SET_SICO1043" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".unsetAsyncConsumer" , CommsConstants . CONVERSATIONHELPERIMPL_01 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , e . getMessage ( ) , e ) ; throw e ; } CommsByteBuffer request = getCommsByteBuffer ( ) ; // Connection object id request . putShort ( connectionObjectId ) ; // Consumer session id request . putShort ( sessionId ) ; // Pass on call to server CommsByteBuffer reply = null ; try { reply = jfapExchange ( request , ( stoppable ? JFapChannelConstants . SEG_DEREGISTER_STOPPABLE_ASYNC_CONSUMER : JFapChannelConstants . SEG_DEREGISTER_ASYNC_CONSUMER ) , //SIB0115d.comms JFapChannelConstants . PRIORITY_MEDIUM , true ) ; } catch ( SIConnectionLostException e ) { // No FFDC Code needed // Converting this to a connection dropped as that is all we can throw if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Connection was lost" , e ) ; throw new SIConnectionDroppedException ( e . getMessage ( ) , e ) ; } // Confirm appropriate data returned try { short err = reply . getCommandCompletionCode ( JFapChannelConstants . SEG_DEREGISTER_ASYNC_CONSUMER_R ) ; if ( err != CommsConstants . SI_NO_EXCEPTION ) { checkFor_SISessionUnavailableException ( reply , err ) ; checkFor_SISessionDroppedException ( reply , err ) ; checkFor_SIConnectionUnavailableException ( reply , err ) ; checkFor_SIConnectionDroppedException ( reply , err ) ; checkFor_SIIncorrectCallException ( reply , err ) ; checkFor_SIErrorException ( reply , err ) ; defaultChecker ( reply , err ) ; } } finally { if ( reply != null ) reply . release ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "unsetAsynchConsumer" ) ; }
Sends a request to unset the asynchronous consumer .