protected CommsByteBuffer jfapExchange ( CommsByteBuffer buffer , int sendSegmentType , int priority , boolean canPoolOnReceive ) throws SIConnectionDroppedException , SIConnectionLostException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "jfapExchange" , new Object [ ] { buffer , sendSegmentType , priority , canPoolOnReceive } ) ; boolean success = false ; CommsByteBuffer rcvBuffer = null ; try { if ( buffer == null ) { // The data list cannot be null SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "NULL_DATA_LIST_PASSED_IN_SICO1046" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".JFAPExchange" , CommsConstants . JFAPCOMMUNICATOR_EXCHANGE_01 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , e . getMessage ( ) , e ) ; throw e ; } int reqNum = getRequestNumber ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( this , tc , "About to Exchange segment " + "conversation: " + con + " " + JFapChannelConstants . getSegmentName ( sendSegmentType ) + " - " + sendSegmentType + " (0x" + Integer . toHexString ( sendSegmentType ) + ") " + "using request number " + reqNum ) ; SibTr . debug ( this , tc , con . getFullSummary ( ) ) ; } ReceivedData rd = con . exchange ( buffer , sendSegmentType , reqNum , priority , canPoolOnReceive ) ; rcvBuffer = getCommsByteBuffer ( rd ) ; int rcvSegmentType = rcvBuffer . getReceivedDataSegmentType ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Exchange completed successfully. " + "Segment returned " + JFapChannelConstants . getSegmentName ( rcvSegmentType ) + " - " + rcvSegmentType + " (0x" + Integer . toHexString ( rcvSegmentType ) + ")" ) ; success = true ; } finally { if ( ! success && TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Exchange failed." ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "jfapExchange" , rcvBuffer ) ; } return rcvBuffer ; }
Wraps the JFAP Channel exchange method to allow tracing retrieval of Unique request numbers and setting of message priority .