Text after "
I am new to Akka, so the event just want to ask how to add an event and catch it. . . There is a code sample
localEventBus = new com.google.common.eventbus.EventBus (New ExceptionHandler ()); Object Audience = New Object () {@Subscribe Public Zero WitingCommand (SomeCommand cmd) {// Here I Want To Catch Call}}; ... local eventsbus.reist (listener); ... client = system.actoroff (make props. (ClientAct. Class, local eventbus, receptionist)); ... client.tell (publish new (constant .command, some command), no sender ()); Type:
Private Last Actor System System; Private ActorRef Client; ClientActor.java
Ultimate Client Extends ClientActor UntypedActor {ClientActor (Last EventBus eventBus; ActorSelection & Reclamation from Last List; Receptionist) {localEventBus = EventBus; ClusterReceptionists.addAll (receptionist); } @Override Public Zero PreStart () {...} @Override Public Zero PostStop () {...} @Override Public Zero onReceive (last object msg) {...}} < P> The problem is that being called 'witingCommand' is not being done, can someone tell me what I do wrong?
No comments:
Post a Comment