Interface AcknowledgedMessagesExtension.Listener
- Enclosing class:
AcknowledgedMessagesExtension
public static interface AcknowledgedMessagesExtension.Listener
A listener for acknowledgement events.
Implementation will be notified of these events:
batchSend, when a batch of messages is sent to a client sessiononBatchReceive(ServerSession, long), when the client session confirms it has received a batch of messages
Stateful implementations may use Session.setAttribute(String, Object)
to store per-session data, or a Map<ServerSession, ?>
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonBatchQueueMaxed(org.cometd.bayeux.server.ServerSession session, Queue<org.cometd.bayeux.server.ServerMessage> queue) Callback method invoked when the unacknowledged message queue size exceeds the value returned byAcknowledgedMessagesExtension.getMaxQueueSize().default voidonBatchReceive(org.cometd.bayeux.server.ServerSession session, long batch) Callback method invoked when a client session confirms it has received the given batch of messages.default voidonBatchSend(org.cometd.bayeux.server.ServerSession session, List<org.cometd.bayeux.server.ServerMessage> messages, long batch) Callback method invoked when a batch of messages is about to be sent to a client session.
-
Method Details
-
onBatchSend
default void onBatchSend(org.cometd.bayeux.server.ServerSession session, List<org.cometd.bayeux.server.ServerMessage> messages, long batch) Callback method invoked when a batch of messages is about to be sent to a client session.
- Parameters:
session- the sessionmessages- the messages to send, as an immutable listbatch- the batch number
-
onBatchReceive
default void onBatchReceive(org.cometd.bayeux.server.ServerSession session, long batch) Callback method invoked when a client session confirms it has received the given batch of messages.
- Parameters:
session- the sessionbatch- the batch number
-
onBatchQueueMaxed
default void onBatchQueueMaxed(org.cometd.bayeux.server.ServerSession session, Queue<org.cometd.bayeux.server.ServerMessage> queue) Callback method invoked when the unacknowledged message queue size exceeds the value returned by
AcknowledgedMessagesExtension.getMaxQueueSize().- Parameters:
session- the sessionqueue- the unacknowledged message queue
-