public ClientNetworkManager(int nThreads, ISocketChannelFactory socketChannelFactory) { /* This is a connect only socket and does not listen to any incoming connections, so pass null to * localAddress and listener. */ md = new MuxDemux(null, null, nThreads, MAX_CONNECTION_ATTEMPTS, FullFrameChannelInterfaceFactory.INSTANCE, socketChannelFactory); }
public MessagingNetworkManager(NodeControllerService ncs, String inetAddress, int inetPort, int nThreads, String publicInetAddress, int publicInetPort, IChannelInterfaceFactory channelInterfaceFactory, ISocketChannelFactory socketChannelFactory) { this.ncs = ncs; md = new MuxDemux(new InetSocketAddress(inetAddress, inetPort), new ChannelOpenListener(), nThreads, MAX_CONNECTION_ATTEMPTS, channelInterfaceFactory, socketChannelFactory); publicNetworkAddress = new NetworkAddress(publicInetAddress, publicInetPort); }
public NetworkManager(String inetAddress, int inetPort, PartitionManager partitionManager, int nThreads, int nBuffers, String publicInetAddress, int publicInetPort, IChannelInterfaceFactory channelInterfaceFactory, ISocketChannelFactory socketChannelFactory) { this.partitionManager = partitionManager; this.nBuffers = nBuffers; md = new MuxDemux(new InetSocketAddress(inetAddress, inetPort), new ChannelOpenListener(), nThreads, MAX_CONNECTION_ATTEMPTS, channelInterfaceFactory, socketChannelFactory); // Just save these values for the moment; may be reset in start() publicNetworkAddress = new NetworkAddress(publicInetAddress, publicInetPort); }
/** * @param inetAddress * - Internet address to bind the listen port to * @param inetPort * - Port to bind on inetAddress * @param publicInetAddress * - Internet address to report to consumers; * useful when behind NAT. null = same as inetAddress * @param publicInetPort * - Port to report to consumers; useful when * behind NAT. Ignored if publicInetAddress is null. 0 = same as inetPort */ public ResultNetworkManager(String inetAddress, int inetPort, IResultPartitionManager partitionManager, int nThreads, int nBuffers, String publicInetAddress, int publicInetPort, IChannelInterfaceFactory channelInterfaceFactory, ISocketChannelFactory socketChannelFactory) { this.partitionManager = partitionManager; this.nBuffers = nBuffers; md = new MuxDemux(new InetSocketAddress(inetAddress, inetPort), new ChannelOpenListener(), nThreads, MAX_CONNECTION_ATTEMPTS, channelInterfaceFactory, socketChannelFactory); // Just save these values for the moment; may be reset in start() publicNetworkAddress = new NetworkAddress(publicInetAddress, publicInetPort); }