public static IoConnector createIoConnector(SocketAddress address) throws ConfigError { if (address instanceof InetSocketAddress) { return new NioSocketConnector(); } else if (address instanceof VmPipeAddress) { return new VmPipeConnector(); } else { throw new ConfigError("Unknown session acceptor address type: " + address.getClass().getName()); } } }
public ConnectFuture connect( SocketAddress address, IoHandler handler, IoServiceConfig config ) { return connect( address, null, handler, config ); }
actualLocalAddress = nextLocalAddress(); } catch (IOException e) { return DefaultConnectFuture.newFailedFuture(e); VmPipeSession localSession = new VmPipeSession(this, getListeners(), actualLocalAddress, getHandler(), entry); initSession(localSession, future, sessionInitializer); this.getFilterChainBuilder().buildFilterChain(filterChain); getListeners().fireSessionCreated(localSession); idleChecker.addSession(localSession); } catch (Exception e) {
/** * Creates a new instance. * * @param executor The executor to use */ public VmPipeConnector(Executor executor) { super(new DefaultVmPipeSessionConfig(), executor); idleChecker = new IdleStatusChecker(); // we schedule the idle status checking task in this service exceutor // it will be woke up every seconds executeWorker(idleChecker.getNotifyingTask(), "idleStatusChecker"); }
actualLocalAddress = nextLocalAddress(); } catch (IOException e) { return DefaultConnectFuture.newFailedFuture(e); getListeners(), actualLocalAddress, getHandler(), entry); initSession(localSession, future, sessionInitializer); this.getFilterChainBuilder().buildFilterChain(filterChain); getListeners().fireSessionCreated(localSession); idleChecker.addSession(localSession); } catch (Throwable t) {
/** * Creates a new instance. */ public VmPipeConnector(Executor executor) { super(new DefaultVmPipeSessionConfig(), executor); idleChecker = new IdleStatusChecker(); // we schedule the idle status checking task in this service exceutor // it will be woke up every seconds executeWorker(idleChecker.getNotifyingTask(), "idleStatusChecker"); }
actualLocalAddress = nextLocalAddress(); } catch (IOException e) { return DefaultConnectFuture.newFailedFuture(e); VmPipeSession localSession = new VmPipeSession(this, getListeners(), actualLocalAddress, getHandler(), entry); initSession(localSession, future, sessionInitializer); this.getFilterChainBuilder().buildFilterChain(filterChain); getListeners().fireSessionCreated(localSession); idleChecker.addSession(localSession); } catch (Exception e) {
public static IoConnector createIoConnector(SocketAddress address) throws ConfigError { if (address instanceof InetSocketAddress) { return new NioSocketConnector(); } else if (address instanceof VmPipeAddress) { return new VmPipeConnector(); } else { throw new ConfigError("Unknown session acceptor address type: " + address.getClass().getName()); } } }
/** * Creates a new instance. * * @param executor The executor to use */ public VmPipeConnector(Executor executor) { super(new DefaultVmPipeSessionConfig(), executor); idleChecker = new IdleStatusChecker(); // we schedule the idle status checking task in this service exceutor // it will be woke up every seconds executeWorker(idleChecker.getNotifyingTask(), "idleStatusChecker"); }
public static IoConnector createIoConnector(SocketAddress address) throws ConfigError { if (address instanceof InetSocketAddress) { return new NioSocketConnector(); } else if (address instanceof VmPipeAddress) { return new VmPipeConnector(); } else { throw new ConfigError("Unknown session acceptor address type: " + address.getClass().getName()); } } }