Examples of receive()


Examples of akka.actor.Inbox.receive()

        // Ask the 'greeter for the latest 'greeting'
        // Reply should go to the "actor-in-a-box"
        inbox.send(greeter, new Greet());

        // Wait 5 seconds for the reply with the 'greeting' message
        Greeting greeting1 = (Greeting) inbox.receive(Duration.create(5, TimeUnit.SECONDS));
        System.out.println("Greeting: " + greeting1.message);

        // Change the greeting and ask for it again
        greeter.tell(new WhoToGreet("typesafe"), ActorRef.noSender());
        inbox.send(greeter, new Greet());

Examples of akka.testkit.TestActorRef.receive()

  @Test
  public void testBoomActor() {
    final TestActorRef child = TestActorRef.apply(
        new Props(BoomActor.class), _system);
    try {
      child.receive("do something");
      // should not reach here
      Assert.assertTrue(false);
    } catch (IllegalArgumentException e) {
      Assert.assertEquals(e.getMessage(), "boom!");
    }

Examples of br.com.visualmidia.core.server.Communicate.receive()

                        String fileRemotePath = getPath(update.getBuildId(), file.getPath(), file.getName());
                               
                        communicate.send("303, Vou te enviar um arquivo");
                        communicate.sendObject(new FileDescriptor(fileRemotePath, file.getName(), file.length(), Long.parseLong(update.getBuildId())));
                       
                        if(communicate.receive().equals("309")) {
                          communicate.sendFile(file);
                            if(communicate.receive().equals("308")){
                                i--;
                            }
                        }

Examples of ch.usi.dslab.bezerra.netwrapper.tcp.TCPReceiver.receive()

      sender.send(message, serverConnection);

      TCPReceiver receiver = new TCPReceiver();
      receiver.addConnection(serverConnection);

      TCPMessage msg = receiver.receive();
      String reply = (String) msg.getContents().getItem(0);
      System.out.println("Reply received: " + reply);

      Message message2 = new Message(new String("second message from client"));

Examples of com.barchart.udt.SocketUDT.receive()

      try {
        if (isBlocking) {
          begin(); // JDK contract for NIO blocking calls
        }
        if (buffer.isDirect()) {
          sizeReceived = socket.receive(buffer);
        } else {
          assert buffer.hasArray();
          byte[] array = buffer.array();
          int position = buffer.position();
          int limit = buffer.limit();

Examples of com.bj58.spat.gaea.client.communication.socket.CSocket.receive()

            }finally {
              if(socket != null){
                socket.dispose();
              }
            }
            byte[] buffer = socket.receive(p.getSessionID(), currUserCount);
            Protocol result = Protocol.fromBytes(buffer,socket.isRights(),socket.getDESKey());
            if (this.state == ServerState.Testing) {
                relive();
            }
            return result;

Examples of com.cloudbees.groovy.cps.Continuation.receive()

                    t = new ClassCastException(t.getClass()+" cannot be cast to Throwable");
                }
                // TODO: fake the stack trace information

                Continuation v = e.getExceptionHandler(Throwable.class.cast(t).getClass());
                return v.receive(t);
            }
        });
    }

    private static final long serialVersionUID = 1L;

Examples of com.consol.citrus.messaging.Consumer.receive()

            Consumer consumer = getOrCreateEndpoint(context).createConsumer();

            if (StringUtils.hasText(messageSelector) && consumer instanceof SelectiveConsumer) {
                receivedMessage = ((SelectiveConsumer)consumer).receive(messageSelector, context, timeout);
            } else {
                receivedMessage = consumer.receive(context, timeout);
            }

            if (receivedMessage != null) {
                if (log.isDebugEnabled()) {
                    log.debug("Received message: " + receivedMessage.getPayload());

Examples of com.dp.nebula.wormhole.common.BufferedLineExchanger.receive()

            reader.read(exchanger);
            reader.finish();
            ILine line = null;
            try{
              int i = 0;
              while((line = exchanger.receive()) != null) {
                result.add(line.getField(0)+"\t"+line.getField(1)+"\n");
                i++;
              }
            }catch(Exception e) {
              //Do nothing

Examples of com.ericsson.otp.erlang.OtpConnection.receive()

          .createRef(), binding.getModule(), msg.getOperation()
          .getName(), params);
      connection.send(MessageHelper.RPC_MBOX, message);
      OtpErlangObject rpcResponse = null;
      if (binding.hasTimeout()) {
        rpcResponse = connection.receive(binding.getTimeout());
      } else {
        rpcResponse = connection.receive();
      }
      OtpErlangObject result = ((OtpErlangTuple) rpcResponse)
          .elementAt(1);
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.