문제

I should send and wait for response using an Udp server from a Play controller. Where is the correct place to create de Actor? Local Variable or Object property?

This question come to my mind becouse working with play, when I change code in the actor play recompiles (I'm using play debug ~run), but changes are not applied, so I think I may be doing something wrong.

My actual code:

public class Application extends Controller {
  static final ActorRef server = Akka.system().actorOf(Props.create(Listener.class));

  public static Result index() {
    // ActorRef sender = Akka.system().actorOf(Props.create(SimpleSender.class));

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top