rice.pastry.socket.appsocket
Interface SocketFactory


public interface SocketFactory

Allows opening a socket directly to an Application on a FreePastry node. On the FreePastry side, the connection is an AppSocket. On the connecting side, you can receive an AppSocket or a SocketChannel.

Author:
Jeff Hoye

Method Summary
 Cancellable getAppSocket(InetSocketAddress addr, int appid, Continuation<AppSocket,Exception> c, Map<String,Object> options)
           
 Cancellable getSocketChannel(InetSocketAddress addr, int appid, Continuation<SocketChannel,Exception> c, Map<String,Object> options)
           
 

Method Detail

getAppSocket

Cancellable getAppSocket(InetSocketAddress addr,
                         int appid,
                         Continuation<AppSocket,Exception> c,
                         Map<String,Object> options)
Parameters:
addr - the location of the freepastry node
appid - the application in the freepastry node see StandardAddress.getAddress()
c - deliver the socket to this continuation
options - use these transport layer specific options when opening the socket
Returns:
use this to cancel the call

getSocketChannel

Cancellable getSocketChannel(InetSocketAddress addr,
                             int appid,
                             Continuation<SocketChannel,Exception> c,
                             Map<String,Object> options)


Copyright © 2010. All Rights Reserved.