org.cometd.bayeux.server
Interface ServerChannel.MessageListener

All Superinterfaces:
Bayeux.BayeuxListener, EventListener, ServerChannel.ServerChannelListener
Enclosing interface:
ServerChannel

public static interface ServerChannel.MessageListener
extends ServerChannel.ServerChannelListener

Listeners objects that implement this interface will be notified of message publish.


Method Summary
 boolean onMessage(ServerSession from, ServerChannel channel, ServerMessage.Mutable message)
          Callback invoked when a message is being published.
 

Method Detail

onMessage

boolean onMessage(ServerSession from,
                  ServerChannel channel,
                  ServerMessage.Mutable message)

Callback invoked when a message is being published.

Implementors can decide to return false to signal that the message should not be published.

Parameters:
from - the session that publishes the message
channel - the channel the message is published to
message - the message to be published
Returns:
whether the message should be published or not


Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.