Package org.cometd.bayeux.server
Interface ServerSession.QueueMaxedListener
-
- All Superinterfaces:
Bayeux.BayeuxListener
,java.util.EventListener
,ServerSession.ServerSessionListener
- Enclosing interface:
- ServerSession
public static interface ServerSession.QueueMaxedListener extends ServerSession.ServerSessionListener
Listeners objects that implement this interface will be notified when the session queue is full.
This is a restricted listener interface because implementers are invoked while holding the session lock and therefore are restricted in the type of operations they may perform; in particular, publishing a message to another session may end up in a deadlock.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
queueMaxed(ServerSession session, java.util.Queue<ServerMessage> queue, ServerSession sender, ServerMessage message)
Callback invoked to notify when the message queue is exceeding the value configured for the transport with the option "maxQueue".
-
-
-
Method Detail
-
queueMaxed
boolean queueMaxed(ServerSession session, java.util.Queue<ServerMessage> queue, ServerSession sender, ServerMessage message)
Callback invoked to notify when the message queue is exceeding the value configured for the transport with the option "maxQueue".
Implementers may modify the queue, for example by removing or merging messages.
- Parameters:
session
- the session that will receive the messagequeue
- the session's message queuesender
- the session that is sending the messagesmessage
- the message that exceeded the max queue capacity- Returns:
- true if the message should be added to the session queue
-
-