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.
        channel - the Channel to register..
        Exception - thrown if an error happens during registration.
      • deregister

        void deregister​(IoHandle handle)
                 throws Exception
        Deregister a IoHandle for IO.
        handle - the IoHandle to deregister..
        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.
        handleType - the type of the IoHandle.
        if compatible of not.