@ Override public Conversation connect ( InetSocketAddress remoteHost , ConversationReceiveListener arl , String chainName ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "connect" , new Object [ ] { remoteHost , arl , chainName } ) ; if ( initialisationFailed ) { String nlsMsg = nls . getFormattedMessage ( "EXCP_CONN_FAIL_NO_CF_SICJ0007" , null , null ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "connection failed because comms failed to initialise" ) ; throw new SIResourceException ( nlsMsg ) ; } Conversation conversation = tracker . connect ( remoteHost , arl , chainName , Conversation . CLIENT ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "connect" , conversation ) ; return conversation ; }
Implementation of the connect method provided by our abstract parent . Attempts to establish a conversation to the specified remote host using the appropriate chain . This may involve creating a new connection or reusing an existing one . The harder part is doing this in such a way as to avoid blocking all calls while processing a single new outbound connection attempt .