Package org.cometd.server.filter
Class DataFilterMessageListener
java.lang.Object
org.cometd.server.filter.DataFilterMessageListener
- All Implemented Interfaces:
EventListener
,Bayeux.BayeuxListener
,ConfigurableServerChannel.ServerChannelListener
,ServerChannel.MessageListener
public class DataFilterMessageListener extends Object implements ServerChannel.MessageListener
A MessageListener that applies DataFilters to the received messages.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cometd.bayeux.server.ConfigurableServerChannel.ServerChannelListener
ConfigurableServerChannel.ServerChannelListener.Weak
-
Constructor Summary
Constructors Constructor Description DataFilterMessageListener(BayeuxServer bayeux, DataFilter... filters)
DataFilterMessageListener(DataFilter... filters)
-
Method Summary
Modifier and Type Method Description boolean
onMessage(ServerSession from, ServerChannel channel, ServerMessage.Mutable message)
Callback invoked when a message is being published.
-
Constructor Details
-
Method Details
-
onMessage
Description copied from interface:ServerChannel.MessageListener
Callback invoked when a message is being published.
Implementers can decide to return false to signal that the message should not be published.
- Specified by:
onMessage
in interfaceServerChannel.MessageListener
- Parameters:
from
- the session that publishes the messagechannel
- the channel the message is published tomessage
- the message to be published- Returns:
- whether the message should be published or not
-