public void exchangeStop ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "exchangeStop" ) ; 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 + ".exchangeStop" , CommsConstants . CONVERSATIONHELPERIMPL_04 , 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 final CommsByteBuffer reply = jfapExchange ( request , JFapChannelConstants . SEG_STOP_SESS , JFapChannelConstants . PRIORITY_MEDIUM , true ) ; // Confirm appropriate data returned try { short err = reply . getCommandCompletionCode ( JFapChannelConstants . SEG_STOP_SESS_R ) ; if ( err != CommsConstants . SI_NO_EXCEPTION ) { checkFor_SISessionUnavailableException ( reply , err ) ; checkFor_SISessionDroppedException ( reply , err ) ; checkFor_SIConnectionUnavailableException ( reply , err ) ; checkFor_SIConnectionDroppedException ( reply , err ) ; checkFor_SIConnectionLostException ( reply , err ) ; checkFor_SIResourceException ( reply , err ) ; checkFor_SIErrorException ( reply , err ) ; defaultChecker ( reply , err ) ; } } finally { if ( reply != null ) reply . release ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "exchangeStop" ) ; }
Sends a request to stop the session .