@Test public void shouldBindWsxAddressesWithTcpBind() throws Exception { String uri1 = "wsx: HashMap<String, Object> options1 = new HashMap<>(); options1.put("tcp.bind", "7777"); String uri2 = "wsx: HashMap<String, Object> options2 = new HashMap<>(); ResourceAddress address1 = addressFactory.newResourceAddress(uri1, options1); ResourceAddress address2 = addressFactory.newResourceAddress(uri2, options2); final IoHandler ioHandler = new IoHandlerAdapter(); wsnAcceptor.bind(address1, ioHandler, null); wsnAcceptor.bind(address2, ioHandler, null); IoFuture future1 = wsnAcceptor.unbind(address1); IoFuture future2 = wsnAcceptor.unbind(address2); future1.await(5, TimeUnit.SECONDS); future2.await(5, TimeUnit.SECONDS); assertTrue(wsnAcceptor.emptyBindings()); assertTrue(httpAcceptor.emptyBindings()); assertTrue(tcpAcceptor.emptyBindings()); }
@Override public void bind(ResourceAddress address, IoHandler handler, BridgeSessionInitializer<? extends IoFuture> initializer) { bind0(address, handler, initializer); }
WsnAcceptor extends AbstractBridgeAcceptor<WsnSession, WsnBindings.WsnBinding> { @Override public void bind(ResourceAddress address, IoHandler handler, BridgeSessionInitializer<? extends IoFuture> initializer) { bind0(address, handler, initializer); } }
WsnAcceptor extends AbstractBridgeAcceptor<WsnSession, WsnBindings.WsnBinding> { @Override public void bind(ResourceAddress address, IoHandler handler, BridgeSessionInitializer<? extends IoFuture> initializer) { bind0(address, handler, initializer); } WsnAcceptor(); }
WsnAcceptor extends AbstractBridgeAcceptor<WsnSession, WsnBindings.WsnBinding> { @Override public void bind(ResourceAddress address, IoHandler handler, BridgeSessionInitializer<? extends IoFuture> initializer) { bind0(address, handler, initializer); } WsnAcceptor(); @Resource(name = "configuration") void setConfiguration(Properties configuration); @Resource(name = "schedulerProvider") void setSchedulerProvider(SchedulerProvider provider); @Resource(name = "bridgeServiceFactory") void setBridgeServiceFactory(BridgeServiceFactory bridgeServiceFactory); @Resource(name = "resourceAddressFactory") void setResourceAddressFactory(ResourceAddressFactory factory); @Resource(name = "ws.acceptor") void setWsAcceptor(WsAcceptor acceptor); @Override void bind(ResourceAddress address,
                     IoHandler handler,
                     BridgeSessionInitializer<? extends IoFuture> initializer); @Override TransportMetadata getTransportMetadata(); }
WsnAcceptor extends AbstractBridgeAcceptor<WsnSession, WsnBindings.WsnBinding> { @Override public void bind(ResourceAddress address, IoHandler handler, BridgeSessionInitializer<? extends IoFuture> initializer) { bind0(address, handler, initializer); } WsnAcceptor(); @Resource(name = "configuration") void setConfiguration(Properties configuration); @Resource(name = "schedulerProvider") void setSchedulerProvider(SchedulerProvider provider); @Resource(name = "bridgeServiceFactory") void setBridgeServiceFactory(BridgeServiceFactory bridgeServiceFactory); @Resource(name = "resourceAddressFactory") void setResourceAddressFactory(ResourceAddressFactory factory); @Resource(name = "ws.acceptor") void setWsAcceptor(WsAcceptor acceptor); @Override void bind(ResourceAddress address,
                     IoHandler handler,
                     BridgeSessionInitializer<? extends IoFuture> initializer); @Override TransportMetadata getTransportMetadata();  }