private void sendData ( CommsByteBuffer request , short jfapPriority , boolean requireReply , SITransaction tran , int outboundSegmentType , int outboundNoReplySegmentType , int replySegmentType ) throws SIResourceException , SISessionUnavailableException , SINotPossibleInCurrentConfigurationException , SIIncorrectCallException , SIConnectionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "sendData" , new Object [ ] { request , jfapPriority , requireReply , tran , outboundSegmentType , outboundNoReplySegmentType , replySegmentType } ) ; if ( requireReply ) { // Pass on call to server CommsByteBuffer reply = jfapExchange ( request , outboundSegmentType , jfapPriority , false ) ; try { short err = reply . getCommandCompletionCode ( replySegmentType ) ; if ( err != CommsConstants . SI_NO_EXCEPTION ) { checkFor_SISessionUnavailableException ( reply , err ) ; checkFor_SISessionDroppedException ( reply , err ) ; checkFor_SIConnectionUnavailableException ( reply , err ) ; checkFor_SIConnectionDroppedException ( reply , err ) ; checkFor_SIResourceException ( reply , err ) ; checkFor_SIConnectionLostException ( reply , err ) ; checkFor_SILimitExceededException ( reply , err ) ; checkFor_SINotAuthorizedException ( reply , err ) ; checkFor_SIIncorrectCallException ( reply , err ) ; checkFor_SINotPossibleInCurrentConfigurationException ( reply , err ) ; checkFor_SIErrorException ( reply , err ) ; defaultChecker ( reply , err ) ; } } finally { if ( reply != null ) reply . release ( ) ; } } else { jfapSend ( request , outboundNoReplySegmentType , jfapPriority , false , ThrottlingPolicy . BLOCK_THREAD ) ; // Update the lowest priority if ( tran != null ) { ( ( Transaction ) tran ) . updateLowestMessagePriority ( jfapPriority ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "sendData" ) ; }
This helper method is used to send the final or only part of a message to our peer . It takes care of whether we should be exchanging the message and deals with the exceptions returned .