Class FillInterest

    • Constructor Detail

      • FillInterest

        protected FillInterest()
    • Method Detail

      • register

        public void register​(Callback callback)
                      throws ReadPendingException
        Call to register interest in a callback when a read is possible. The callback will be called either immediately if needsFillInterest() returns true or eventually once fillable() is called.
        Parameters:
        callback - the callback to register
        Throws:
        ReadPendingException - if unable to read due to pending read op
      • tryRegister

        public boolean tryRegister​(Callback callback)
        Call to register interest in a callback when a read is possible. The callback will be called either immediately if needsFillInterest() returns true or eventually once fillable() is called.
        Parameters:
        callback - the callback to register
        Returns:
        true if the register succeeded
      • fillable

        public void fillable()
        Call to signal that a read is now possible.
      • isInterested

        public boolean isInterested()
        Returns:
        True if a read callback has been registered
      • isCallbackNonBlocking

        public boolean isCallbackNonBlocking()
      • onFail

        public boolean onFail​(Throwable cause)
        Call to signal a failure to a registered interest
        Parameters:
        cause - the cause of the failure
        Returns:
        true if the cause was passed to a Callback instance
      • onClose

        public void onClose()
      • toStateString

        public String toStateString()
      • needsFillInterest

        protected abstract void needsFillInterest()
                                           throws IOException
        Register the read interest Abstract method to be implemented by the Specific ReadInterest to schedule a future call to fillable() or onFail(Throwable)
        Throws:
        IOException - if unable to fulfill interest in fill