Class AcknowledgedMessagesSessionExtension

    • Constructor Detail

      • AcknowledgedMessagesSessionExtension

        public AcknowledgedMessagesSessionExtension​(ServerSession session)
    • Method Detail

      • rcv

        public boolean rcv​(ServerSession from,
                           ServerMessage.Mutable message)
        Description copied from interface: ServerSession.Extension

        Callback method invoked every time a normal message is incoming.

        Specified by:
        rcv in interface ServerSession.Extension
        Parameters:
        from - the session that sent the message
        message - the incoming message
        Returns:
        true if message processing should continue, false if it should stop
      • rcvMeta

        public boolean rcvMeta​(ServerSession session,
                               ServerMessage.Mutable message)
        Description copied from interface: ServerSession.Extension

        Callback method invoked every time a meta message is incoming.

        Specified by:
        rcvMeta in interface ServerSession.Extension
        Parameters:
        session - the session that is sent the message
        message - the incoming meta message
        Returns:
        true if message processing should continue, false if it should stop
      • processBatch

        protected void processBatch​(long batch)
      • deQueue

        public void deQueue​(ServerSession session,
                            java.util.Queue<ServerMessage> queue)
        Description copied from interface: ServerSession.DeQueueListener

        Callback invoked to notify that the queue of messages is about to be sent to the remote client.

        This is the last chance to process the queue and remove duplicates or merge messages.

        Specified by:
        deQueue in interface ServerSession.DeQueueListener
        Parameters:
        session - the session whose messages are being sent
        queue - the queue of messages to send