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 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 message
        queue - the session's message queue
        sender - the session that is sending the messages
        message - the message that exceeded the max queue capacity
        Returns:
        true if the message should be added to the session queue