Examples of receive()


Examples of org.springframework.jms.core.JmsOperations.receive()

  @Test
  public void testNextMessageSunnyDay() {
    JmsOperations jmsTemplate = mock(JmsOperations.class);
    Message message = mock(Message.class);
    when(jmsTemplate.receive()).thenReturn(message);

    JmsItemReader<Message> itemReader = new JmsItemReader<Message>();
    itemReader.setJmsTemplate(jmsTemplate);
    itemReader.setItemType(Message.class);
    assertEquals(message, itemReader.read());

Examples of org.springframework.jms.core.JmsTemplate.receive()

                        return resolv.resolveDestinationName(session, jmsConfig.getTargetDestination(),
                                                             false);
                    }
                });
               
                final Message message = jmsTemplate.receive(destination);
                MessageCreator messageCreator = new MessageCreator() {
                    public Message createMessage(Session session) {
                        return message;
                    }
                };

Examples of org.springframework.messaging.PollableChannel.receive()

    Thread.sleep(2000);
    logger.info("Starting Spring Integration Sequential File processing");
    ConfigurableApplicationContext ac = new ClassPathXmlApplicationContext("META-INF/spring/integration/sequentialFileProcessing-config.xml");
    PollableChannel filesOutChannel = ac.getBean("filesOutChannel", PollableChannel.class);
    for (int i = 0; i < fileCount; i++) {
      logger.info("Finished processing " + filesOutChannel.receive(10000).getPayload());
    }
    ac.stop();
  }
  @Test
  public void testConcurrentFileProcessing() throws Exception {

Examples of org.springframework.ws.server.MessageDispatcher.receive()

        MessageDispatcher messageDispatcher = new SoapMessageDispatcher();
        messageDispatcher.setApplicationContext(applicationContext);
        messageDispatcher.setEndpointMappings(Collections.<EndpointMapping>singletonList(mapping));
        messageDispatcher.setEndpointAdapters(Collections.<EndpointAdapter>singletonList(adapter));

        messageDispatcher.receive(messageContext);

        MyEndpoint endpoint = applicationContext.getBean("endpoint", MyEndpoint.class);
        assertTrue("doIt() not invoked on endpoint", endpoint.isDoItInvoked());

        LogAspect aspect = (LogAspect) applicationContext.getBean("logAspect");

Examples of org.springframework.ws.soap.server.SoapMessageDispatcher.receive()

        MessageDispatcher messageDispatcher = new SoapMessageDispatcher();
        messageDispatcher.setApplicationContext(applicationContext);
        messageDispatcher.setEndpointMappings(Collections.<EndpointMapping>singletonList(mapping));
        messageDispatcher.setEndpointAdapters(Collections.<EndpointAdapter>singletonList(adapter));

        messageDispatcher.receive(messageContext);

        MyEndpoint endpoint = applicationContext.getBean("endpoint", MyEndpoint.class);
        assertTrue("doIt() not invoked on endpoint", endpoint.isDoItInvoked());

        LogAspect aspect = (LogAspect) applicationContext.getBean("logAspect");

Examples of org.springframework.ws.transport.FaultAwareWebServiceConnection.receive()

        FaultAwareWebServiceConnection connection =
                (FaultAwareWebServiceConnection) messageSender.createConnection(connectionUri);
        SOAPMessage request = createRequest();
        try {
            connection.send(new SaajSoapMessage(request));
            connection.receive(messageFactory);
            Assert.assertTrue("Response has no fault", connection.hasFault());
        }
        finally {
            connection.close();
        }

Examples of org.springframework.ws.transport.WebServiceConnection.receive()

                            SoapVersion.SOAP_11.getContentType());
                    response.writeBytes(buf);
                    return response;
                }
            });
            SoapMessage response = (SoapMessage) connection.receive(new SaajSoapMessageFactory(messageFactory));
            assertNotNull("No response received", response);
            assertEquals("Invalid SOAPAction", SOAP_ACTION, response.getSoapAction());
            assertFalse("Message is fault", response.hasFault());
        }
        finally {

Examples of org.springframework.ws.transport.WebServiceMessageReceiver.receive()

        setWebServiceMessageReceiver(new WebServiceMessageReceiver() {

            @Override
            public void receive(MessageContext messageContext) throws Exception {
                decorator.receive(messageContext);
                original.receive(messageContext);
            }
        });
    }

    /*
 

Examples of org.springframework.xd.dirt.test.sink.NamedChannelSink.receive()

    }

    Message<?> m2;
    int count2 = 0;
    String result2 = null;
    while ((m2 = tapSink.receive(1000)) != null) {
      count2++;
      result2 = (String) m2.getPayload();
    }

    assertEquals("DRACARYS!", result1);

Examples of org.xmlBlaster.client.I_XmlBlasterAccess.receive()

                        break;
                     }
                     int count = 1;
                     if (ret > '0' && ret <= '9') count = ret - '0';
                     System.out.println("Waiting on '" + queueOid + "' maxEntries=" + count + " timeout=" + timeout + " consumable=" + consuming + " ...");
                     MsgUnit[] msgs = con.receive(queueOid, count, timeout, consuming);
                     System.out.println("Received " + msgs.length + " messages");
                     for (int i=0; i<msgs.length; i++)
                        System.out.println("#" + i + ": " + msgs[i].getContentStr());
                  }
                  catch (XmlBlasterException e) {
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.