@Test public void connectorWithAcceptorShouldConnectSuccessfully() throws Throwable { NamedPipeAcceptorImpl acceptor = new NamedPipeAcceptorImpl(); acceptor.setHandler(new IoHandlerAdapter()); NamedPipeAddress localAddress = new NamedPipeAddress("accept"); acceptor.bind(localAddress); NamedPipeConnectorImpl connector = new NamedPipeConnectorImpl(); connector.setNamedPipeAcceptor(acceptor); connector.setHandler(new IoHandlerAdapter()); NamedPipeAddress remoteAddress = new NamedPipeAddress("accept"); ConnectFuture future = connector.connect(remoteAddress); future.awaitUninterruptibly(); NamedPipeSession connectSession = (NamedPipeSession)future.getSession(); NamedPipeSession acceptSession = connectSession.getRemoteSession(); assertNotNull(acceptSession); assertSame(connectSession, acceptSession.getRemoteSession()); }
public void setNamedPipeAcceptor(Ref<NamedPipeAcceptorImpl> acceptorRef) { this.acceptorRef = acceptorRef; }
NamedPipeConnectorImpl extends AbstractIoConnectorEx implements NamedPipeService { public void setNamedPipeAcceptor(Ref<NamedPipeAcceptorImpl> acceptorRef) { this.acceptorRef = acceptorRef; } }
NamedPipeConnectorImpl extends AbstractIoConnectorEx implements NamedPipeService { public void setNamedPipeAcceptor(Ref<NamedPipeAcceptorImpl> acceptorRef) { this.acceptorRef = acceptorRef; } NamedPipeConnectorImpl();  NamedPipeConnectorImpl(Executor executor); }
NamedPipeConnectorImpl extends AbstractIoConnectorEx implements NamedPipeService { public void setNamedPipeAcceptor(Ref<NamedPipeAcceptorImpl> acceptorRef) { this.acceptorRef = acceptorRef; } NamedPipeConnectorImpl();  NamedPipeConnectorImpl(Executor executor); void setNamedPipeAcceptor(Ref<NamedPipeAcceptorImpl> acceptorRef); @Override TransportMetadata getTransportMetadata(); }
NamedPipeConnectorImpl extends AbstractIoConnectorEx implements NamedPipeService { public void setNamedPipeAcceptor(Ref<NamedPipeAcceptorImpl> acceptorRef) { this.acceptorRef = acceptorRef; } NamedPipeConnectorImpl();  NamedPipeConnectorImpl(Executor executor); void setNamedPipeAcceptor(Ref<NamedPipeAcceptorImpl> acceptorRef); @Override TransportMetadata getTransportMetadata();  }