Package akka.zeromq

Examples of akka.zeromq.Frame


  public void onReceive(Object message) throws Exception {

    if (message instanceof ZMQMessage) {
      ZMQMessage m = (ZMQMessage) message;
      String mesg = new String(m.payload(0));
      subSocket.tell((new ZMQMessage(new Frame(mesg
          + " Processed the workload for A"))));
    }

  }
View Full Code Here


  @Override
  public void onReceive(Object message) throws Exception {
    if (message.equals(TICK)) {
      // send a message to the replier system
      reqSocket.tell(new ZMQMessage(new Frame("Hi there! ("
          + getContext().self().hashCode() + ")->")));
      count++;
      if (count == 10)
        cancellable.cancel();
    } else if (message instanceof ZMQMessage) {
View Full Code Here

  @Override
  public void onReceive(Object message) throws Exception {
    if (message.equals(TICK)) {

      if (random.nextBoolean() == true) {
        routerSocket.tell(new ZMQMessage(new Frame("A"), new Frame(
            "This is the workload for A")));
      } else {
        routerSocket.tell(new ZMQMessage(new Frame("B"), new Frame(
            "This is the workload for B")));

      }
      count++;
      if (count == 10)
View Full Code Here

    if (message instanceof ZMQMessage) {
      ZMQMessage m = (ZMQMessage) message;
      String mesg = new String(m.payload(0));

      repSocket.tell((new ZMQMessage(
          new Frame(mesg + " Good to see you!"))));
    }
  }
View Full Code Here

  public void onReceive(Object message) throws Exception {

    if (message instanceof ZMQMessage) {
      ZMQMessage m = (ZMQMessage) message;
      String mesg = new String(m.payload(0));
      subSocket.tell((new ZMQMessage(new Frame(mesg
          + " Processed the workload for B"))));
    }

  }
View Full Code Here

  public void onReceive(Object message) throws Exception {
    if (message.equals(TICK)) {

      count++;
      pushSocket.tell(new ZMQMessage(
          new Frame("Hi there (" + count + ")")));
      if (count == 5)
        cancellable.cancel();
    }

  }
View Full Code Here

  }

  @Override
  public void onReceive(Object message) throws Exception {
    if (message.equals(TICK)) {
      pubSocket.tell(new ZMQMessage(new Frame("someTopic"), new Frame(
          "This is the workload " + ++count)));
     
      if(count==10)
        cancellable.cancel();
    }
View Full Code Here

TOP

Related Classes of akka.zeromq.Frame

Copyright © 2018 www.massapicom. 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.