@Test public void shouldBindAndUnbindLeavingEmptyBindingsMaps() throws Exception { Map<String, Object> acceptOptions = new HashMap<>(); final String connectURIString = "ws: final ResourceAddress bindAddress = addressFactory.newResourceAddress( connectURIString, acceptOptions); final IoHandler ioHandler = new IoHandlerAdapter(); for ( int i = 0; i < 10; i++) { wsnAcceptor.bind(bindAddress, ioHandler, null); } for (int j = 0; j < 10; j++) { UnbindFuture future = wsnAcceptor.unbind(bindAddress); org.junit.Assert.assertTrue("Unbind failed", future.await(1, TimeUnit.SECONDS)); } org.junit.Assert.assertTrue(wsnAcceptor.emptyBindings()); org.junit.Assert.assertTrue(httpAcceptor.emptyBindings()); org.junit.Assert.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();  }