Examples of send()


Examples of org.sonatype.nexus.bootstrap.monitor.CommandMonitorTalker.send()

    long period = 1000;

    // Then ping for a bit and finally give up and ask it to halt
    while (true) {
      try {
        talker.send(PingCommand.NAME);
      }
      catch (ConnectException e) {
        // likely its shutdown already
        break;
      }
View Full Code Here

Examples of org.springframework.amqp.rabbit.core.RabbitTemplate.send()

    Message message = MessageBuilder.withBody("foo".getBytes())
        .setContentType("text/plain")
        .setContentEncoding("junk")
        .build();
    template.send("", testQueueName, message);

    Message rejected = template.receive(dlq.getName());
    int n = 0;
    while (n++ < 100 && rejected == null) {
      Thread.sleep(100);
View Full Code Here

Examples of org.springframework.integration.MessageChannel.send()

    @Test
    public void testSendingOneWayMessage() throws Exception {
        MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
        resultEndpoint.expectedBodiesReceived(MESSAGE_BODY);
        MessageChannel outputChannel = applicationContext.getBean("channelA", MessageChannel.class);
        outputChannel.send(new GenericMessage<Object>(MESSAGE_BODY));
        resultEndpoint.assertIsSatisfied();
    }

    @Test
    public void testSendingTwoWayMessage() throws Exception {
View Full Code Here

Examples of org.springframework.integration.channel.DirectChannel.send()

      @Override
      public void run() {
        ConsumerIterator<Integer, byte[]> it = stream.iterator();
        while (it.hasNext()) {
          byte[] msg = it.next().message();
          bridge.send(MessageBuilder.withPayload(msg).build());
        }
      }

    });
  }
View Full Code Here

Examples of org.springframework.integration.channel.MessageChannel.send()

        MessageChannel requestChannel = (MessageChannel) applicationContext.getBean("requestChannel");
        Map<String, Object> maps = new HashMap<String, Object>();
        maps.put(MessageHeaders.RETURN_ADDRESS, "responseChannel");
        Message<String> message = new GenericMessage<String>(MESSAGE_BODY, maps);

        requestChannel.send(message);

        AbstractPollableChannel responseChannel = (AbstractPollableChannel) applicationContext.getBean("responseChannel");
        Message responseMessage = responseChannel.receive();
        String result = (String) responseMessage.getPayload();
View Full Code Here

Examples of org.springframework.integration.channel.PublishSubscribeChannel.send()

  public void logsThroughputWhenControlMessagesReceived() {
    PublishSubscribeChannel pubsub = new PublishSubscribeChannel();
    pubsub.subscribe(new ThroughputSamplerMessageHandler());

    int msgs = 100000;
    pubsub.send(new GenericMessage<String>("START"));
    for (int i = 0; i < msgs; i++) {
      pubsub.send(new GenericMessage<Object>(new Object()));
    }
    pubsub.send(new GenericMessage<String>("END"));
  }
View Full Code Here

Examples of org.springframework.integration.channel.QueueChannel.send()

    SplunkData data = new SplunkData("spring", "spring:example");
    data.setCommonDesc("description");

    Message<SplunkData> msg = MessageBuilder.withPayload(data).build();
    channel.send(msg);
    msg = MessageBuilder.withPayload(data).build();
    channel.send(msg);
  }

}
View Full Code Here

Examples of org.springframework.integration.core.MessageChannel.send()

                }
            }
            // put the message back the outputChannel if we need
            org.springframework.integration.core.Message siOutMessage =
                SpringIntegrationBinding.storeToSpringIntegrationMessage(exchange.getOut());
            reply.send(siOutMessage);
        }       
    }  

}
View Full Code Here

Examples of org.springframework.integration.core.MessagingTemplate.send()

        .setHeader(SmppConstants.SRC_ADDR, "pavel")
        .setHeader(SmppConstants.DST_ADDR, "pavel")
        .build();

    MessagingTemplate template = context.getBean("messagingTemplate", MessagingTemplate.class);
    template.send("target", message);
  }

    @Test
    public void testWithAdvice() throws Exception {
        context = new ClassPathXmlApplicationContext("SmppOutboundChannelAdapterParserTests.xml", getClass());
View Full Code Here

Examples of org.springframework.integration.core.PollableChannel.send()

 
  @Test
  public void deletesNestedDirectoriesAndFiles() {
   
    PollableChannel deletionChannel = deletionService.libraryDeletionChannel;
    deletionChannel.send(msg(dir1, set(dir2), set(file1a)));
    deletionChannel.send(FINISHED_MESSAGE);
   
    deletionService.receive();
    deletionService.updateLibrary();
   
View Full Code Here
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.