Package org.cometd.bayeux.client.ClientSessionChannel

Examples of org.cometd.bayeux.client.ClientSessionChannel.MessageListener


    }

    private void reconnect() {
        final ArgumentCaptor<MessageListener> listenerCaptor = ArgumentCaptor.forClass(MessageListener.class);
        verify(metaHandshakeChannel).addListener(listenerCaptor.capture());
        MessageListener reconnectListener = listenerCaptor.getValue();
        reconnectListener.onMessage(metaHandshakeChannel, Mockito.mock(Message.class));
    }
View Full Code Here


   * Subscribes to a channel for receiving events.
   *
   * @return An EventSubscription instance that can be used to unsubscribe.
   */
  public EventSubscription subscribe(final String channel, final GenesysEventListener listener) {
    final MessageListener bayeuxListener = new MessageListener() {
      @Override public void onMessage(ClientSessionChannel channel, final Message message) {
        LOG_EVENT.debug("Received event on channel: " + message.getChannel());
        LOG_EVENT_CONTENT_RAW.debug("Content: " + message.getJSON());
        if (LOG_EVENT_CONTENT_PRETTY.isDebugEnabled())
          LOG_EVENT_CONTENT_PRETTY.debug("Content:\n" + JsonUtil.prettify(message.getJSON()));
View Full Code Here

TOP

Related Classes of org.cometd.bayeux.client.ClientSessionChannel.MessageListener

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.