Examples of receive()


Examples of org.hornetq.core.client.impl.ClientConsumerInternal.receive()

         for (int trans = 0; trans < 2; trans++)
         {

            for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
            {
               ClientMessage msg = consumer.receive(10000);
               Assert.assertNotNull(msg);

               // it will ignore the buffer (not read it) on the first try
               if (trans == 0)
               {

Examples of org.javagroups.Channel.receive()

                }

                Message mes = null;
                try
                {
                    Object obj = javagroups.receive( 0 );
                    if ( obj != null && obj instanceof org.javagroups.Message )
                    {
                        mes = ( Message ) obj;
                        log.info( "Starting new socket node." );
                        new Thread( new LateralJGReceiverConnection( mes, ilcl ) ).start();

Examples of org.jboss.blacktie.jatmibroker.core.transport.Receiver.receive()

    Receiver endpoint = temporaryQueues.get(cd);
    if (endpoint == null) {
      throw new ConnectionException(Connection.TPEBADDESC,
          "Session does not exist: " + cd);
    }
    Message message = endpoint.receive(flags);
    temporaryQueues.remove(cd);
    Buffer buffer = null;
    if (message.type != null && !message.type.equals("")) {
      buffer = tpalloc(message.type, message.subtype, message.len);
      buffer.deserialize(message.data);

Examples of org.jboss.example.jms.stateless.bean.StatelessSessionExample.receive()

                 
      assertEquals(1, num);
         
      log("Queue browse result: " + num);           
     
      String result = bean.receive(queueName);
      log("Received " + result);           
     
      assertEquals("Hello!", result);           
     
      bean.remove();

Examples of org.jboss.narayana.blacktie.jatmibroker.core.transport.Receiver.receive()

    String aString = "Hello from Java Land";
    Receiver endpoint = proxy.createReceiver(1, null);
    serviceFactory.send(endpoint.getReplyTo(), (short) 0, 0,
        aString.getBytes(), aString.getBytes().length, 0, 0, 0,
        "X_OCTET", "");
    Message receive = endpoint.receive(0);

    assertNotNull(receive);
    String string = new String(receive.data).intern();
    String expectedResponse = "BAR SAYS HELLO";
    log.debug("Bar ServiceManager service_request response is " + string);

Examples of org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarReplyEndpoint.receive()

         Relationship[] relationships = new Relationship[1];
         relationships[0] = new RelationshipImpl(asyncRequest.getMessageId());
         requestProps.setRelatesTo(relationships);
         ((BindingProvider)endpoint).getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, requestProps);
        
         endpoint.receive(darResponse);
         log.info("Response sent.");
      } catch (Exception e) {
         e.printStackTrace();
      }
   }

Examples of org.jclouds.sqs.features.MessageApi.receive()

      MessageApi messageClient = createMock(MessageApi.class);
      ReceiveMessageOptions options = new ReceiveMessageOptions();
      FluentIterable<Message> aMessage = FluentIterable.from(ImmutableSet.of(createMock(Message.class)));
      FluentIterable<Message> noMessages = FluentIterable.from(ImmutableSet.<Message>of());

      expect(messageClient.receive(1, options))
            .andReturn(aMessage)
            .once();
     
      expect(messageClient.receive(1, options))
            .andReturn(noMessages)

Examples of org.jgroups.Channel.receive()

      Object tmp;
      int cnt = -1;
      while (true) {
         try {
            tmp = channel.receive(0);
            if (tmp instanceof ExitEvent) {
               break;
            }
            if (tmp instanceof SetStateEvent) {
               cnt = ((Integer) Util.objectFromByteBuffer(((SetStateEvent) tmp).getArg())).intValue();

Examples of org.jgroups.JChannel.receive()

      Object tmp;
      int cnt = -1;
      while (true) {
         try {
            tmp = channel.receive(0);
            if (tmp instanceof ExitEvent) {
               break;
            }
            if (tmp instanceof SetStateEvent) {
               cnt = ((Integer) Util.objectFromByteBuffer(((SetStateEvent) tmp).getArg())).intValue();

Examples of org.jgroups.Receiver.receive()

                    if (msg.getHeader(MAGIC_HEADER) != null) {
                        if (!(discardOwnMessages && getAddress() != null && msg.getSrc() != null && getAddress().equals(msg.getSrc())))
                            receiver.receive(msg);
                    } else {
                        if (dataReceiver != null && !(dataDiscardOwnMessages && getAddress() != null && msg.getSrc() != null && getAddress().equals(msg.getSrc())))
                            dataReceiver.receive(msg);
                    }
                    break;

                case Event.VIEW_CHANGE:
                    receiver.viewAccepted((View) evt.getArg());
TOP
Copyright © 2015 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.