コード例 #1
0
 private void onMessage(final String message) {
   try {
     userActor.send(new WebDataMessage(ref(), message));
   } catch (SuspendExecution ex) {
     throw new AssertionError(ex);
   }
 }
コード例 #2
0
 public WebSocketActorAdapter(
     ChannelHandlerContext ctx, ActorRef<? super WebMessage> userActor) {
   super(userActor.getName(), new WebSocketChannelAdapter(ctx));
   ((WebSocketChannelAdapter) (SendPort) getMailbox()).actor = this;
   this.ctx = ctx;
   this.userActor = userActor;
   watch(userActor);
 }
コード例 #3
0
    final void service(ChannelHandlerContext ctx, FullHttpRequest req) throws SuspendExecution {
      if (context.watch()) watchToken = watch(userActor);

      this.ctx = ctx;
      this.req = req;

      if (isDone()) {
        handleDeath(getDeathCause());
        return;
      }

      userActor.send(new HttpRequestWrapper(ref(), ctx, req));
    }