Interface IoHandler

    • Method Detail

      • prepareToDestroy

        void prepareToDestroy()
        Prepare to destroy this IoHandler. This method will be called before destroy() and may be called multiple times.
      • destroy

        void destroy()
        Destroy the IoHandler and free all its resources.
      • register

        void register​(IoHandle channel)
               throws Exception
        Register a Channel for IO.
        Parameters:
        channel - the Channel to register..
        Throws:
        Exception - thrown if an error happens during registration.
      • deregister

        void deregister​(IoHandle handle)
                 throws Exception
        Deregister a IoHandle for IO.
        Parameters:
        handle - the IoHandle to deregister..
        Throws:
        Exception - thrown if an error happens during deregistration.
      • wakeup

        void wakeup​(boolean inEventLoop)
        Wakeup the IoHandler, which means if any operation blocks it should be unblocked and return as soon as possible.
      • isCompatible

        boolean isCompatible​(Class<? extends IoHandle> handleType)
        Returns true if the given type is compatible with this IoHandler and so can be registered, false otherwise.
        Parameters:
        handleType - the type of the IoHandle.
        Returns:
        if compatible of not.