Package org.springframework.messaging.simp

Examples of org.springframework.messaging.simp.SimpMessageSendingOperations



  @Before
  public void setup() {
    SubscribableChannel channel = Mockito.mock(SubscribableChannel.class);
    SimpMessageSendingOperations brokerTemplate = new SimpMessagingTemplate(channel);

    this.messageHandler = new TestSimpAnnotationMethodMessageHandler(brokerTemplate, channel, channel);
    this.messageHandler.setApplicationContext(new StaticApplicationContext());
    this.messageHandler.setValidator(new StringTestValidator(TEST_INVALID_VALUE));
    this.messageHandler.afterPropertiesSet();
View Full Code Here


  @Test
  public void testHeadersToSend() throws Exception {

    Message<?> inputMessage = createInputMessage("sess1", "sub1", "/app", "/dest", null);

    SimpMessageSendingOperations messagingTemplate = Mockito.mock(SimpMessageSendingOperations.class);
    SendToMethodReturnValueHandler handler = new SendToMethodReturnValueHandler(messagingTemplate, false);

    handler.handleReturnValue(PAYLOAD, this.noAnnotationsReturnType, inputMessage);

    ArgumentCaptor<MessageHeaders> captor = ArgumentCaptor.forClass(MessageHeaders.class);
View Full Code Here

  public void testHeadersToSendToUser() throws Exception {

    TestUser user = new TestUser();
    Message<?> inputMessage = createInputMessage("sess1", "sub1", "/app", "/dest", user);

    SimpMessageSendingOperations messagingTemplate = Mockito.mock(SimpMessageSendingOperations.class);
    SendToMethodReturnValueHandler handler = new SendToMethodReturnValueHandler(messagingTemplate, false);

    handler.handleReturnValue(PAYLOAD, this.sendToUserDefaultDestReturnType, inputMessage);

    verify(messagingTemplate).convertAndSendToUser(eq("joe"), eq("/queue/dest"), eq(PAYLOAD));
View Full Code Here

TOP

Related Classes of org.springframework.messaging.simp.SimpMessageSendingOperations

Copyright © 2018 www.massapicom. 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.