Package akka.io.Tcp

Examples of akka.io.Tcp.CommandFailed.cmd()


  public void onReceive(Object msg) throws Exception {
    if (msg instanceof Bound) {
      log.info("listening on [{}]", ((Bound) msg).localAddress());
    } else if (msg instanceof Tcp.CommandFailed) {
      final CommandFailed failed = (CommandFailed) msg;
      if (failed.cmd() instanceof Bind) {
        log.warning("cannot bind to [{}]", ((Bind) failed.cmd()).localAddress());
        getContext().stop(getSelf());
      } else {
        log.warning("unknown command failed [{}]", failed.cmd());
      }
View Full Code Here


    if (msg instanceof Bound) {
      log.info("listening on [{}]", ((Bound) msg).localAddress());
    } else if (msg instanceof Tcp.CommandFailed) {
      final CommandFailed failed = (CommandFailed) msg;
      if (failed.cmd() instanceof Bind) {
        log.warning("cannot bind to [{}]", ((Bind) failed.cmd()).localAddress());
        getContext().stop(getSelf());
      } else {
        log.warning("unknown command failed [{}]", failed.cmd());
      }
    } else
View Full Code Here

      final CommandFailed failed = (CommandFailed) msg;
      if (failed.cmd() instanceof Bind) {
        log.warning("cannot bind to [{}]", ((Bind) failed.cmd()).localAddress());
        getContext().stop(getSelf());
      } else {
        log.warning("unknown command failed [{}]", failed.cmd());
      }
    } else
    if (msg instanceof Connected) {
      final Connected conn = (Connected) msg;
      log.info("received connection from [{}]", conn.remoteAddress());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.