Class GridNioAsyncNotifyFilter

  • All Implemented Interfaces:
    GridNioFilter

    public class GridNioAsyncNotifyFilter
    extends GridNioFilterAdapter
    Enables multithreaded notification of session opened, message received and session closed events.
    • Constructor Detail

      • GridNioAsyncNotifyFilter

        public GridNioAsyncNotifyFilter​(String igniteInstanceName,
                                        Executor exec,
                                        IgniteLogger log)
        Assigns filter name to a filter.
        Parameters:
        igniteInstanceName - Ignite instance name.
        exec - Executor.
        log - Logger.
    • Method Detail

      • stop

        public void stop()
        End of a filter lifecycle, invoked on server stop. It is guaranteed that this method will be invoked after all events are processed, no more event-related methods will be invoked after this method called.
        Specified by:
        stop in interface GridNioFilter
        Overrides:
        stop in class GridNioFilterAdapter
      • onMessageReceived

        public void onMessageReceived​(GridNioSession ses,
                                      Object msg)
                               throws IgniteCheckedException
        Invoked when a new messages received.
        Parameters:
        ses - Session on which message was received.
        msg - Received message.
        Throws:
        IgniteCheckedException - If IgniteCheckedException occurred while handling event.
      • onSessionIdleTimeout

        public void onSessionIdleTimeout​(GridNioSession ses)
                                  throws IgniteCheckedException
        Called when session is idle for longer time that is allowed by NIO server.
        Parameters:
        ses - Session that is idle.
        Throws:
        IgniteCheckedException - If filter is not in chain or GridNioException occurred in the underlying filter.
      • onSessionWriteTimeout

        public void onSessionWriteTimeout​(GridNioSession ses)
                                   throws IgniteCheckedException
        Called when session has not empty write buffer that has not been fully flushed during max timeout allowed by NIO server.
        Parameters:
        ses - Session that has timed out writes.
        Throws:
        IgniteCheckedException - If filter is not in chain or GridNioException occurred in the underlying filter.