Package org.cometd.bayeux.server
Interface BayeuxServer.SubscriptionListener
-
- All Superinterfaces:
Bayeux.BayeuxListener
,BayeuxServer.BayeuxServerListener
,java.util.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 theBayeuxServer
, after having invoked theServerChannel.SubscriptionListener
.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
subscribed(ServerSession session, ServerChannel channel, ServerMessage message)
Callback invoked when aServerSession
subscribes to aServerChannel
.default void
unsubscribed(ServerSession session, ServerChannel channel, ServerMessage message)
Callback invoked when aServerSession
unsubscribes from aServerChannel
.
-
-
-
Method Detail
-
subscribed
default void subscribed(ServerSession session, ServerChannel channel, ServerMessage message)
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
default void unsubscribed(ServerSession session, ServerChannel channel, ServerMessage message)
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)
-
-