private short getClientCapabilities ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getClientCapabilities" ) ; short capabilities = CommsConstants . CAPABILITIES_DEFAULT ; // Allow the use of a runtime property to alter the capability that we require a non-java // bootstrap to locate an ME boolean nonJavaBootstrap = CommsUtils . getRuntimeBooleanProperty ( CommsConstants . CAPABILITIY_REQUIRES_NONJAVA_BOOTSTRAP_KEY , CommsConstants . CAPABILITIY_REQUIRES_NONJAVA_BOOTSTRAP_DEF ) ; if ( nonJavaBootstrap ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Requesting non-java bootstrap" ) ; // This bit is off by default, so turn it on capabilities |= CommsConstants . CAPABILITIY_REQUIRES_NONJAVA_BOOTSTRAP ; } // Allow the use of a runtime property to alter the capability that we require JMF messages boolean jmfMessagesOnly = CommsUtils . getRuntimeBooleanProperty ( CommsConstants . CAPABILITIY_REQUIRES_JMF_ENCODING_KEY , CommsConstants . CAPABILITIY_REQUIRES_JMF_ENCODING_DEF ) ; if ( jmfMessagesOnly ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Requesting JMF Only" ) ; // This bit is off by default, so turn it on capabilities |= CommsConstants . CAPABILITIY_REQUIRES_JMF_ENCODING ; } // Allow the use of a runtime property to alter the capability that we require JMS messages boolean jmsMessagesOnly = CommsUtils . getRuntimeBooleanProperty ( CommsConstants . CAPABILITIY_REQUIRES_JMS_MESSAGES_KEY , CommsConstants . CAPABILITIY_REQUIRES_JMS_MESSAGES_DEF ) ; if ( jmsMessagesOnly ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Requesting JMS Only" ) ; // This bit is off by default, so turn it on capabilities |= CommsConstants . CAPABILITIY_REQUIRES_JMS_MESSAGES ; } // Allow the use of a runtime property to turn off optimized transactions. boolean disableOptimizedTx = CommsUtils . getRuntimeBooleanProperty ( CommsConstants . DISABLE_OPTIMIZED_TX_KEY , CommsConstants . DISABLE_OPTIMIZED_TX ) ; if ( disableOptimizedTx ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Disabling use of optimized transactions" ) ; // This bit is set on by default, so we must turn it off capabilities &= ( 0xFFFF ^ CommsConstants . CAPABILITIY_REQUIRES_OPTIMIZED_TX ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getClientCapabilities" , capabilities ) ; return capabilities ; }
Works out the capabilities that will be sent to the peer as part of the initial handshake . This also takes into account any overrides from the SIB properties file .