public void close ( ) throws SIResourceException , SIConnectionLostException , SIErrorException , SIConnectionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" ) ; // Have we already been closed? if ( ! isClosed ( ) ) { try { closeLock . writeLock ( ) . lockInterruptibly ( ) ; try { CommsByteBuffer request = getCommsByteBuffer ( ) ; // Build Message Header request . putShort ( getConnectionObjectID ( ) ) ; request . putShort ( getProxyID ( ) ) ; // Pass on call to server CommsByteBuffer reply = jfapExchange ( request , JFapChannelConstants . SEG_CLOSE_PRODUCER_SESS , lowestPriority , true ) ; try { short err = reply . getCommandCompletionCode ( JFapChannelConstants . SEG_CLOSE_PRODUCER_SESS_R ) ; if ( err != CommsConstants . SI_NO_EXCEPTION ) { checkFor_SIConnectionDroppedException ( reply , err ) ; checkFor_SIResourceException ( reply , err ) ; checkFor_SIConnectionLostException ( reply , err ) ; checkFor_SIErrorException ( reply , err ) ; defaultChecker ( reply , err ) ; } } finally { if ( reply != null ) reply . release ( ) ; } setClosed ( ) ; if ( oc != null ) oc . decrementUseCount ( ) ; } finally { closeLock . writeLock ( ) . unlock ( ) ; } } catch ( InterruptedException e ) { // No FFDC code needed } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "close" ) ; }
Closes the ProducerSession .