Examples of receive()


Examples of javax.jms.TopicSubscriber.receive()

         conn.start();
        
         TopicSession newsess = conn.createTopicSession(true, 0);
         TopicSubscriber newcons = newsess.createSubscriber(topic);
        
         Message m2 = (Message)newcons.receive(200);
         assertNull(m2);
      }
      finally
      {
         if (conn != null)

Examples of javax.microedition.io.DatagramConnection.receive()

    protected void listenForMessages() throws Exception {
        _connection = openPort();
        DatagramConnection dCon = (DatagramConnection) _connection;
        while( true ) {
            Datagram dgram = dCon.newDatagram( dCon.getMaximumLength() );
            dCon.receive( dgram );
            if( isRunning() && listenerRegistry.listenerIsSet() ) {
                new DatagramProcessor( dgram ).start();
            } else {
                yield();
            }

Examples of javax.microedition.io.UDPDatagramConnection.receive()

                    Datagram packet = udpCon.newDatagram(buf, buf.length);
                    udpCon.send(packet);

                    // Get response
                    packet = udpCon.newDatagram(buf, buf.length);
                    udpCon.receive(packet);

                    // Display response
                    final String message =
                            new String(packet.getData(), 0, packet.getLength());
                    displayMessage(_connectionName + " " + message);

Examples of javax.wireless.messaging.MessageConnection.receive()

      }
      else //show the arrived sms
      {
        MessageConnection con = (MessageConnection)Connector.open(conn);
        TextMessage msg;
        msg = (TextMessage)con.receive();
        text = msg.getPayloadText();
        Dialog.show("SMS", text, null, Dialog.TYPE_CONFIRMATION,null, 4000);
       
       
      }

Examples of net.floodlightcontroller.core.IOFMessageListener.receive()

        // Start recording the replay on the mocks
        replay(mockSwitch);
        // Get the listener and trigger the packet in
        IOFMessageListener listener = mockFloodlightProvider.getListeners().get(
                OFType.PACKET_IN).get(0);
        listener.receive(mockSwitch, this.packetIn,
                         parseAndAnnotate(this.packetIn));

        // Verify the replay matched our expectations
        verify(mockSwitch);
       

Examples of net.rim.device.api.io.messaging.BlockingReceiverDestination.receive()

                                    .createBlockingReceiverDestination(config,
                                            URI.create(_uriStr));
                }

                String alertString = "";
                _response = blockRecvDest.receive(_timeout * 1000);

                if (_response != null) {
                    alertString =
                            "RECEIVED[id: " + _response.getMessageId() + "]:";
                    final String stringPayload =

Examples of net.sf.laja.parser.engine2.Output.receive()

      if (elementOutput.isCaseSensitive() != null) {
        caseSensitive = elementOutput.isCaseSensitive().booleanValue();
      }

      boolean match = false;
      if (output.receive()) {
        if (receive) {
          match = recorder.playMatch(element, source.getBookmark());
          source.setBookmark(recorder.playBookmark());
        } else {
          output.init(source);

Examples of org.apache.activemq.ActiveMQMessageConsumer.receive()

            ActiveMQConnection replyConnection = (ActiveMQConnection) replyFactory.createConnection();
            replyConnection.setWatchTopicAdvisories(false);
            replyConnection.start();
            Session replySession = replyConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            ActiveMQMessageConsumer replyConsumer = (ActiveMQMessageConsumer) replySession.createConsumer(requestReplyDest);
            javax.jms.Message msg = replyConsumer.receive(10000);
            assertNotNull("request message not null: " + i, msg);
            MessageProducer replyProducer = replySession.createProducer(msg.getJMSReplyTo());
            replyProducer.send(session.createTextMessage("reply-" + i));
            replyConnection.close();

Examples of org.apache.activemq.MessageAvailableConsumer.receive()

                    if (consumer.getAvailableListener() == null) {
                        continue;
                    }
   
                    // Look for any available messages
                    message = consumer.receive(10);
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("received " + message + " from " + consumer);
                    }
                }
            }

Examples of org.apache.activemq.transport.stomp.StompConnection.receive()

        StompFrame message;
        String allMessageBodies = "";
        try {
            while( true ) {
                message = connection.receive(5000);
                allMessageBodies = allMessageBodies +"\n"+ message.getBody();
            }
        } catch (SocketTimeoutException e) {}

        LOG.debug( "All message bodies : " + allMessageBodies );
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.