java 8, eclipse Version: 2018-09 (4.9.0)
public class Server extends AbstractActor {
private ActorRef manager;
public Server(ActorRef manager) {
this.manager = manager;
}
public static Props props(ActorRef manager) {
return Props.create(Server.class, manager);
}
@Override
public void preStart() throws Exception {
final ActorRef tcp = Tcp.get(context().system()).manager();
tcp.tell(TcpMessage.bind(getSelf(), new InetSocketAddress("localhost", 0), 100), getSelf());
}
@Override
public Receive createReceive() {
// TODO Auto-generated method stub
return null;
}
}