@Test public void testSubscribe() { new JavaTestKit(system) { { LobbyEvent event = new LobbyEvent() {}; bus.tell(new Subscribe(getRef()), getRef()); bus.tell(event, getRef()); expectMsgEquals(duration("1 second"), event); } }; }
private void subscribe(ActorRef actor) { context().watch(actor); subscriptions.add(actor); }
LobbyEventBus extends AbstractActor { private void subscribe(ActorRef actor) { context().watch(actor); subscriptions.add(actor); } }
LobbyEventBus extends AbstractActor { private void subscribe(ActorRef actor) { context().watch(actor); subscriptions.add(actor); } private  LobbyEventBus(); }
LobbyEventBus extends AbstractActor { private void subscribe(ActorRef actor) { context().watch(actor); subscriptions.add(actor); } private  LobbyEventBus(); @Override PartialFunction<Object, BoxedUnit> receive(); static Props props(); }
LobbyEventBus extends AbstractActor { private void subscribe(ActorRef actor) { context().watch(actor); subscriptions.add(actor); } private  LobbyEventBus(); @Override PartialFunction<Object, BoxedUnit> receive(); static Props props();  }