Enum ActionCode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ActionCode>

    public enum ActionCode
    extends java.lang.Enum<ActionCode>
    ActionCodes represent callbacks from the servlet container to the coyote connector. Actions are implemented by ProtocolHandler, using the ActionHook interface.
    Remy Maucherat
    See Also:
    ProtocolHandler, ActionHook
    • Enum Constant Detail

      • CLOSE_NOW

        public static final ActionCode CLOSE_NOW
        A serious error occurred from which it is not possible to recover safely. Further attempts to write to the response should be ignored and the connection needs to be closed as soon as possible. This can also be used to forcibly close a connection if an error occurs after the response has been committed.

        public static final ActionCode CLIENT_FLUSH
        A flush() operation originated by the client ( i.e. a flush() on the servlet output stream or writer, called by a servlet ). Argument is the Response.
      • IS_ERROR

        public static final ActionCode IS_ERROR
        Has the processor been placed into the error state? Note that the response may not have an appropriate error code set.

        public static final ActionCode IS_IO_ALLOWED
        The processor may have been placed into an error state and some error states do not permit any further I/O. Is I/O currently allowed?

        public static final ActionCode DISABLE_SWALLOW_INPUT
        Hook called if swallowing request input should be disabled. Example: Cancel a large file upload.

        public static final ActionCode REQ_HOST_ATTRIBUTE
        Callback for lazy evaluation - extract the remote host name and address.

        public static final ActionCode REQ_HOST_ADDR_ATTRIBUTE
        Callback for lazy evaluation - extract the remote host address.

        public static final ActionCode REQ_PEER_ADDR_ATTRIBUTE
        Callback for lazy evaluation - extract the connection peer address.

        public static final ActionCode REQ_SSL_ATTRIBUTE
        Callback for lazy evaluation - extract the SSL-related attributes including the client certificate if present.

        public static final ActionCode REQ_SSL_CERTIFICATE
        Force a TLS re-handshake and make the resulting client certificate (if any) available as a request attribute.

        public static final ActionCode REQ_REMOTEPORT_ATTRIBUTE
        Callback for lazy evaluation - socket remote port.

        public static final ActionCode REQ_LOCALPORT_ATTRIBUTE
        Callback for lazy evaluation - socket local port.

        public static final ActionCode REQ_LOCAL_ADDR_ATTRIBUTE
        Callback for lazy evaluation - local address.

        public static final ActionCode REQ_LOCAL_NAME_ATTRIBUTE
        Callback for lazy evaluation - local address.

        public static final ActionCode REQ_SET_BODY_REPLAY
        Callback for setting FORM auth body replay

        public static final ActionCode AVAILABLE
        Callback for getting the amount of available bytes.

        public static final ActionCode ASYNC_START
        Callback for an async request.

        public static final ActionCode ASYNC_DISPATCHED
        Callback to indicate the the actual dispatch has started and that the async state needs change.

        public static final ActionCode ASYNC_TIMEOUT
        Callback to trigger the processing of an async timeout.

        public static final ActionCode ASYNC_ERROR
        Callback to trigger the error processing.

        public static final ActionCode ASYNC_IS_ASYNC
        Callback to determine if async processing is in progress.

        public static final ActionCode ASYNC_IS_STARTED
        Callback to determine if async dispatch is in progress.

        public static final ActionCode ASYNC_IS_COMPLETING
        Call back to determine if async complete is in progress.

        public static final ActionCode ASYNC_IS_DISPATCHING
        Callback to determine if async dispatch is in progress.

        public static final ActionCode ASYNC_IS_TIMINGOUT
        Callback to determine if async is timing out.

        public static final ActionCode ASYNC_IS_ERROR
        Callback to determine if async is in error.

        public static final ActionCode ASYNC_POST_PROCESS
        Callback to trigger post processing. Typically only used during error handling to trigger essential processing that otherwise would be skipped.
      • UPGRADE

        public static final ActionCode UPGRADE
        Callback to trigger the HTTP upgrade process.

        public static final ActionCode NB_READ_INTEREST
        Indicator that Servlet is interested in being notified when data is available to be read.

        public static final ActionCode NB_WRITE_INTEREST
        Used with non-blocking writes to determine if a write is currently allowed (sets passed parameter to true) or not (sets passed parameter to false). If a write is not allowed then callback will be triggered at some future point when write becomes possible again.

        public static final ActionCode REQUEST_BODY_FULLY_READ
        Indicates if the request body has been fully read.

        public static final ActionCode DISPATCH_READ
        Indicates that the container needs to trigger a call to onDataAvailable() for the registered non-blocking read listener.

        public static final ActionCode DISPATCH_WRITE
        Indicates that the container needs to trigger a call to onWritePossible() for the registered non-blocking write listener.

        public static final ActionCode DISPATCH_EXECUTE
        Execute any non-blocking dispatches that have been registered via DISPATCH_READ or DISPATCH_WRITE. Typically required when the non-blocking listeners are configured on a thread where the processing wasn't triggered by a read or write event on the socket.

        public static final ActionCode IS_PUSH_SUPPORTED
        Is server push supported and allowed for the current request?

        public static final ActionCode PUSH_REQUEST
        Push a request on behalf of the client of the current request.

        public static final ActionCode CONNECTION_ID
        Obtain the connection identifier for the request. Used with multiplexing protocols such as HTTP/2.
      • STREAM_ID

        public static final ActionCode STREAM_ID
        Obtain the stream identifier for the request. Used with multiplexing protocols such as HTTP/2.
    • Method Detail

      • values

        public static ActionCode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ActionCode c : ActionCode.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ActionCode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null