Examples of MessageListener


Examples of org.springframework.data.keyvalue.redis.connection.MessageListener

    assertEquals(MessageListenerAdapter.ORIGINAL_DEFAULT_LISTENER_METHOD, adapter.getDefaultListenerMethod());
  }

  @Test
  public void testAdapterWithListenerAndDefaultMessage() throws Exception {
    MessageListener mock = mock(MessageListener.class);

    MessageListenerAdapter adapter = new MessageListenerAdapter(mock);
    adapter.onMessage(STRING_MSG, null);
    verify(mock).onMessage(STRING_MSG, null);
  }

Examples of org.springframework.data.redis.connection.MessageListener

        ArgumentCaptor<MessageListener> messageListenerCaptor = ArgumentCaptor
                .forClass(MessageListener.class);
        verify(listenerContainer).addMessageListener(messageListenerCaptor.capture(), any(Collection.class));

        MessageListener messageListener = messageListenerCaptor.getValue();
        messageListener.onMessage(new DefaultMessage(null, null), null);
        messageListener.onMessage(new DefaultMessage(null, null), null);

        mock.assertIsSatisfied();
    }

Examples of org.uiautomation.ios.wkrdp.MessageListener

    this.session = session;
    connectionKey = UUID.randomUUID().toString();
    sync = new WebKitSynchronizer(this);
    this.protocol = protocol;

    MessageListener messageListener = new WebKitNotificationListener(this, sync, session);
    protocol.addListener(messageListener);

  }

Examples of rocks.xmpp.core.stanza.MessageListener

        XmppSession xmppSession1 = new TestXmppSession(ROMEO, mockServer);
        XmppSession xmppSession2 = new TestXmppSession(JULIET, mockServer);

        final boolean[] attentionReceived = {false};
        xmppSession2.addMessageListener(new MessageListener() {
            @Override
            public void handle(MessageEvent e) {
                if (e.isIncoming() && e.getMessage().getExtension(Attention.class) != null && e.getMessage().getType() == AbstractMessage.Type.HEADLINE) {
                    attentionReceived[0] = true;
                    Assert.assertEquals(e.getMessage().getType(), AbstractMessage.Type.HEADLINE);
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.