Package org.cometd.bayeux.server
Interface BayeuxServer.SubscriptionListener
- All Superinterfaces:
Bayeux.BayeuxListener
,BayeuxServer.BayeuxServerListener
,EventListener
- Enclosing interface:
- BayeuxServer
public static interface BayeuxServer.SubscriptionListener extends BayeuxServer.BayeuxServerListener
Specialized listener for ServerChannel
subscription events.
This listener is called when a subscribe message or an unsubscribe message
occurs for any channel known to the BayeuxServer
.
This interface the correspondent of the ServerChannel.SubscriptionListener
interface, but it is invoked for any session and any channel known to the
BayeuxServer
, after having invoked the ServerChannel.SubscriptionListener
.
-
Method Summary
Modifier and Type Method Description void
subscribed(ServerSession session, ServerChannel channel, ServerMessage message)
Callback invoked when aServerSession
subscribes to aServerChannel
.void
unsubscribed(ServerSession session, ServerChannel channel, ServerMessage message)
Callback invoked when aServerSession
unsubscribes from aServerChannel
.
-
Method Details
-
subscribed
Callback invoked when a
ServerSession
subscribes to aServerChannel
.- Parameters:
session
- the session that subscribeschannel
- the channel to subscribe tomessage
- the subscription message sent by the client, or null in case of server-side subscription viaServerChannel.subscribe(ServerSession)
-
unsubscribed
Callback invoked when a
ServerSession
unsubscribes from aServerChannel
.- Parameters:
session
- the session that unsubscribeschannel
- the channel to unsubscribe frommessage
- the unsubscription message sent by the client, or null in case of server-side unsubscription viaServerChannel.unsubscribe(ServerSession)
-