public Conversation startConversation(String senderId,
InetSocketAddress address,
String recipientId) {
RequestResponseDispatchListener dispathListener = new RequestResponseDispatchListener();
ConnectorFactoryService cfs = this.grid.get( ConnectorFactoryService.class );
if ( cfs == null ) {
throw new RuntimeException( "Unable to resolve ConnectorFactoryService" );
}
Connector conn = cfs.newConnector();
IoWriter writer = conn.open( address,
dispathListener,
systemEventListener );
return new ConversationImpl( conn,
Long.toString( this.conversationIdCounter.incrementAndGet() ),