Interface OutputSink

    • Method Detail

      • notifyCanWrite

        void notifyCanWrite​(WriteHandler handler)
        Instructs the OutputSink to invoke the provided WriteHandler when it is possible to write more bytes (or characters). Note that once the WriteHandler has been notified, it will not be considered for notification again at a later point in time.
        Parameters:
        handler - the WriteHandler that should be notified when it's possible to write more data.
        Throws:
        IllegalStateException - if this method is invoked and a handler from a previous invocation is still present (due to not having yet been notified).
        Since:
        2.3
      • notifyCanWrite

        @Deprecated
        void notifyCanWrite​(WriteHandler handler,
                            int length)
        Deprecated.
        the length parameter will be ignored. Pls. use notifyCanWrite(org.glassfish.grizzly.WriteHandler).
        Instructs the OutputSink to invoke the provided WriteHandler when it is possible to write length bytes (or characters). Note that once the WriteHandler has been notified, it will not be considered for notification again at a later point in time.
        Parameters:
        handler - the WriteHandler that should be notified when it's possible to write length bytes.
        length - the number of bytes or characters that require writing.
        Throws:
        IllegalStateException - if this method is invoked and a handler from a previous invocation is still present (due to not having yet been notified).
      • canWrite

        boolean canWrite()
        Returns:
        true if a write to this OutputSink will succeed, otherwise returns false.
        Since:
        2.3
      • canWrite

        @Deprecated
        boolean canWrite​(int length)
        Deprecated.
        the length parameter will be ignored. Pls. use canWrite().
        Parameters:
        length - specifies the number of bytes (or characters) that require writing
        Returns:
        true if a write to this OutputSink will succeed, otherwise returns false.