@Test public void testForward() throws Exception { Topic topic = Topics.getTopic("test1"); reactor1.forward(topic); Receiver receiver2 = new Receiver() { public void accept(ByteBuffer buf) { received++; } }; Subscription subscription2 = reactor2.subscribe(topic, receiver2); ByteBuffer msg = ByteBuffer.allocate(1024); msg.put("This is a test".getBytes()); reactor1.post(topic, msg); Thread.sleep(500L); assertEquals(1, received); }
public void forward(Topic topic) { Subscription subscription = subscribe(topic, theForwarder); if (subscription != null) { subscriptions.put(topic, subscription); } }
EventReactorWithBridge extends EventReactor<ByteBuffer> { public void forward(Topic topic) { Subscription subscription = subscribe(topic, theForwarder); if (subscription != null) { subscriptions.put(topic, subscription); } } }
EventReactorWithBridge extends EventReactor<ByteBuffer> { public void forward(Topic topic) { Subscription subscription = subscribe(topic, theForwarder); if (subscription != null) { subscriptions.put(topic, subscription); } } protected  EventReactorWithBridge(Builder builder); }
EventReactorWithBridge extends EventReactor<ByteBuffer> { public void forward(Topic topic) { Subscription subscription = subscribe(topic, theForwarder); if (subscription != null) { subscriptions.put(topic, subscription); } } protected  EventReactorWithBridge(Builder builder); static Builder builder(); void accept(ByteBuffer t); @Override void close(); void forward(Topic topic); @Override CompletableFuture<? extends EventReactor<ByteBuffer>> open(); void stopForwarding(Topic topic); }
EventReactorWithBridge extends EventReactor<ByteBuffer> { public void forward(Topic topic) { Subscription subscription = subscribe(topic, theForwarder); if (subscription != null) { subscriptions.put(topic, subscription); } } protected  EventReactorWithBridge(Builder builder); static Builder builder(); void accept(ByteBuffer t); @Override void close(); void forward(Topic topic); @Override CompletableFuture<? extends EventReactor<ByteBuffer>> open(); void stopForwarding(Topic topic);  }