title: Akka EventBus for Java example
body: <p>I need some advice of how to use EventBus provided by Akka in Java (not Scala!).
  I've seen the doc in <a href="http://doc.akka.io/docs/akka/2.0.1/java/event-bus.html" rel="nofollow">http://doc.akka.io/docs/akka/2.0.1/java/event-bus.html</a></p>
  
  <p>and I tried to do it myself, so I got these code here:</p>
  
  <pre><code>public class Subscriber {
  
  public static void main(String args[]){
      final ActorSystem actorSystem = ActorSystem.create("ServerEvents");
      final ActorRef actor = actorSystem.actorOf(new Props(ServerEventHandler.class));
      actorSystem.eventStream().subscribe(actor,ServerMessage.class);
      actorSystem.eventStream().publish(new ServerMessage());
  }
    }
  
  
  public class ServerEventHandler extends UntypedActor {
    @Override
    public void onReceive(final Object message) {
      System.out.println("Got event in thread: " + Thread.currentThread().getName());
      System.out.println("Event: " + message);
    }
  }
  </code></pre>
  
  <p>the question is, I known that </p>
  
  <pre><code>actorSystem.eventStream().subscribe(actor,ServerMessage.class);
  actorSystem.eventStream().publish(new ServerMessage());
  </code></pre>
  
  <p>ServerMessage() is the channel and message to sub/pub, but what is the exactly content in Class ServerMessage??</p>
  
  <p>it would be appreciated if you guys can help  </p>
  
  <p>thanks! </p>