Examples of receive()


Examples of org.drools.grid.generic.MessageResponseHandler.receive()

              ((Command)msg.getPayload()).getArguments().get(0) instanceof RuntimeException)
              payload = ((Command)msg.getPayload()).getArguments().get(0);
            if (( payload != null && payload instanceof RuntimeException )) {
                responseHandler.setError( (RuntimeException) payload );
            } else {
                responseHandler.receive( msg );
            }
        } else if ( handler != null ) {
            this.handler.messageReceived( writer,
                                          msg );
        } else {

Examples of org.drools.runtime.pipeline.Action.receive()

       
        ListAdapter listAdapter = new ListAdapterImpl( list, true );       
        action.setReceiver( listAdapter );
       
        assertFalse( mock.isSet() );
        action.receive( mock, new BasePipelineContext( Thread.currentThread().getContextClassLoader() ) );

        assertEquals( 1, list.size());
        assertSame( mock, list.get( 0 ) );
        assertTrue( mock.isSet() );
    }

Examples of org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveResumedEvent.receive()

    final IFileTransferListener listener = new IFileTransferListener() {
      public void handleTransferEvent(IFileTransferEvent event) {
        if (event instanceof IIncomingFileTransferReceiveResumedEvent) {
          try {
            IIncomingFileTransferReceiveResumedEvent rse = (IIncomingFileTransferReceiveResumedEvent) event;
            session = rse.receive(outs);
          } catch (Exception e) {
            fail(e.getLocalizedMessage());
          }
        } else if (event instanceof IIncomingFileTransferReceiveStartEvent) {
          IIncomingFileTransferReceiveStartEvent rse = (IIncomingFileTransferReceiveStartEvent) event;

Examples of org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveStartEvent.receive()

        } else if (event instanceof IIncomingFileTransferReceiveStartEvent) {
          IIncomingFileTransferReceiveStartEvent rse = (IIncomingFileTransferReceiveStartEvent) event;
          try {
            incomingFile = new File(FILENAME);
            outs = new FileOutputStream(incomingFile);
            session = rse.receive(outs);
            pausable = (IFileTransferPausable) session.getAdapter(IFileTransferPausable.class);
            if (pausable == null)
              fail("pausable is null");
          } catch (IOException e) {
            fail(e.getLocalizedMessage());

Examples of org.eclipse.jgit.transport.ReceivePack.receive()

    try {
      rp.setBiDirectionalPipe(false);
      rp.setEchoCommandFailures(hasPushStatusBug(version));
      rsp.setContentType(RECEIVE_PACK_RESULT_TYPE);

      rp.receive(getInputStream(req), out, null);
      out.close();
    } catch (UnpackException e) {
      // This should be already reported to the client.
      getServletContext().log(
          HttpServerText.get().internalErrorDuringReceivePack,

Examples of org.exolab.jms.messagemgr.ConsumerEndpoint.receive()

        List messages = new ArrayList(count);

        try {
            _database.begin();
            for (int i = 0; i < count && !_stop.get();) {
                MessageHandle handle = consumer.receive(_stop);
                if (handle == null) {
                    break;
                }
                MessageImpl orig = handle.getMessage();
                if (orig != null) {

Examples of org.exoplatform.frameworks.ftpclient.data.FtpDataTransiver.receive()

               {
                  Thread.sleep(1000);
               }
            }

            byte[] data = dataTransiver.receive();
            dataTransiver.close();

            String dd = "";
            for (int i = 0; i < data.length; i++)
            {

Examples of org.fusesource.mqtt.client.BlockingConnection.receive()

        Topic[] topics = {new Topic(utf8("foo"), QoS.AT_MOST_ONCE)};
        connection.subscribe(topics);
        for (int i = 0; i < numberOfMessages; i++) {
            String payload = "Test Message: " + i;
            connection.publish("foo", payload.getBytes(), QoS.AT_MOST_ONCE, false);
            Message message = connection.receive();
            assertEquals(payload, new String(message.getPayload()));
        }
        connection.disconnect();
    }

Examples of org.fusesource.stomp.client.BlockingConnection.receive()

        Thread thread = new Thread(new Runnable() {
            public void run() {
                for (int i = 0; i < numberOfMessages; i++) {
                    try {
                        StompFrame frame = subscribeConnection.receive();
                        latch.countDown();
                    } catch (Exception e) {
                        e.printStackTrace();
                        break;
                    }

Examples of org.hornetq.api.core.client.ClientConsumer.receive()

               producer.send(message);

               ClientConsumer messageConsumer = session.createConsumer(queueName);
               session.start();

               ClientMessage messageReceived = messageConsumer.receive(1000);
               System.out.println("Received TextMessage:" + messageReceived.getStringProperty(propName));
            } finally {
               if (session != null) {
                  session.close();
               }
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.