[jboss-dev-forums] [Design of JBoss Remoting, Unified Invokers] - Re: Detached invokers are too detached from the transport

ron_sigal do-not-reply at jboss.com
Tue Jan 2 23:59:28 EST 2007


How about a generalization of HandshakeCompletedListener:


  |  interface SocketCreatedListener
  |  {
  |    void socketCreated(Socket socket);
  |  }
  | 
 
An instance of SocketCreatedListener could be passed in on the client side:


  |   SocketCreatedListener listener = ... ;
  |   HashMap config = new HashMap();
  |   config.put(Remoting.SOCKET_CREATED_LISTENER, listener);
  |   Client client = new Client(locator, config);
  | 

and on the server side:


  |   SocketCreatedListener listener = ... ;
  |   HashMap config = new HashMap();
  |   config.put(Remoting.SOCKET_CREATED_LISTENER, listener);
  |   Connector = new Connector(locator, config);
  | 

The client and server invokers would be responsible for calling the listener whenever they create a socket.  A customized SocketFactory would probably be necessary for some of the less transparent transports.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997426#3997426

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997426



More information about the jboss-dev-forums mailing list