private long sendMessage ( SIBusMessage msg ) throws OperationFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "sendMessage" , msg ) ; long retValue = 0 ; // If we are at FAP9 or above we can do a 'chunked' send of the message in seperate // slices to make life easier on the Java memory manager final HandshakeProperties props = getConversation ( ) . getHandshakeProperties ( ) ; if ( props . getFapLevel ( ) >= JFapChannelConstants . FAP_VERSION_9 ) { retValue = sendChunkedMessage ( msg ) ; } else { retValue = sendEntireMessage ( msg , null ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "sendMessage" , "" + retValue ) ; return retValue ; }
Helper function . Sends an SIBusMessage to the client taking care of the myriad pesky exceptions which may get thrown . If something does go wrong then the caller is notified by a single OperationFailedException . By this point the appropriate error flow has also been transmitted to the client .