org.apache.coyote

## Enum ActionCode

- java.lang.Object
- - java.lang.Enum<ActionCode>
  - - org.apache.coyote.ActionCode

- All Implemented Interfaces:
    Serializable, Comparable<ActionCode>

      public enum ActionCode
      extends Enum<ActionCode>

  ActionCodes represent callbacks from the servlet container to the coyote connector. Actions are implemented by ProtocolHandler, using the ActionHook interface.
  Author:
    Remy Maucherat
  See Also:
    `ProtocolHandler`, `ActionHook`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ACK`
    `ASYNC_COMPLETE` Callback for an async call to `AsyncContext.complete()`.
    `ASYNC_DISPATCH` Callback for an async call to `AsyncContext.dispatch()`.
    `ASYNC_DISPATCHED` Callback to indicate the the actual dispatch has started and that the async state needs change.
    `ASYNC_ERROR` Callback to trigger the error processing.
    `ASYNC_IS_ASYNC` Callback to determine if async processing is in progress.
    `ASYNC_IS_COMPLETING` Call back to determine if async complete is in progress.
    `ASYNC_IS_DISPATCHING` Callback to determine if async dispatch is in progress.
    `ASYNC_IS_ERROR` Callback to determine if async is in error.
    `ASYNC_IS_STARTED` Callback to determine if async dispatch is in progress.
    `ASYNC_IS_TIMINGOUT` Callback to determine if async is timing out.
    `ASYNC_POST_PROCESS` Callback to trigger post processing.
    `ASYNC_RUN` Callback for an async call to `AsyncContext.start(Runnable)`.
    `ASYNC_SETTIMEOUT` Callback for an async call to `AsyncContext.setTimeout(long)`
    `ASYNC_START` Callback for an async request.
    `ASYNC_TIMEOUT` Callback to trigger the processing of an async timeout.
    `AVAILABLE` Callback for getting the amount of available bytes.
    `CLIENT_FLUSH` A flush() operation originated by the client ( i.e. a flush() on the servlet output stream or writer, called by a servlet ).
    `CLOSE`
    `CLOSE_NOW` A serious error occurred from which it is not possible to recover safely.
    `COMET_BEGIN` Callback for begin Comet processing.
    `COMET_CLOSE` Callback for an asynchronous close of the Comet event
    `COMET_END` Callback for end Comet processing.
    `COMET_SETTIMEOUT` Callback for setting the timeout asynchronously
    `COMMIT`
    `CUSTOM`
    `DISABLE_SWALLOW_INPUT` Hook called if swallowing request input should be disabled.
    `END_REQUEST` Trigger end of request processing (remaining input swallowed, write any remaining parts of the response etc.).
    `IS_ERROR` Has the processor been placed into the error state?
    `POST_REQUEST` Hook called after request, but before recycling.
    `REQ_HOST_ADDR_ATTRIBUTE` Callback for lazy evaluation - extract the remote host infos (address, name, port) and local address.
    `REQ_HOST_ATTRIBUTE` Callback for lazy evaluation - extract the remote host address.
    `REQ_LOCAL_ADDR_ATTRIBUTE` Callback for lazy evaluation - local address.
    `REQ_LOCAL_NAME_ATTRIBUTE` Callback for lazy evaluation - local address.
    `REQ_LOCALPORT_ATTRIBUTE` Callback for lazy evaluation - socket local port.
    `REQ_REMOTEPORT_ATTRIBUTE` Callback for lazy evaluation - socket remote port.
    `REQ_SET_BODY_REPLAY` Callback for setting FORM auth body replay
    `REQ_SSL_ATTRIBUTE` Callback for lazy evaluation - extract the SSL-related attributes.
    `REQ_SSL_CERTIFICATE` Callback for lazy evaluation - extract the SSL-certificate (including forcing a re-handshake if necessary)
    `RESET`
    `UPGRADE` Callback to trigger the Servlet 3.1 based HTTP upgrade process.
    `UPGRADE_TOMCAT` Callback to trigger Tomcat's proprietary HTTP upgrade process.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ActionCode` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ActionCode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ACK

          public static final ActionCode ACK

    - #### CLOSE

          public static final ActionCode CLOSE

    - #### COMMIT

          public static final ActionCode COMMIT

    - #### 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.

    - #### CLIENT_FLUSH

          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.

    - #### CUSTOM

          public static final ActionCode CUSTOM

    - #### RESET

          public static final ActionCode RESET

    - #### POST_REQUEST

          public static final ActionCode POST_REQUEST

      Hook called after request, but before recycling. Can be used for logging, to update counters, custom cleanup - the request is still visible

    - #### 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.

    - #### DISABLE_SWALLOW_INPUT

          public static final ActionCode DISABLE_SWALLOW_INPUT

      Hook called if swallowing request input should be disabled. Example: Cancel a large file upload.

    - #### REQ_HOST_ATTRIBUTE

          public static final ActionCode REQ_HOST_ATTRIBUTE

      Callback for lazy evaluation - extract the remote host address.

    - #### REQ_HOST_ADDR_ATTRIBUTE

          public static final ActionCode REQ_HOST_ADDR_ATTRIBUTE

      Callback for lazy evaluation - extract the remote host infos (address, name, port) and local address.

    - #### REQ_SSL_ATTRIBUTE

          public static final ActionCode REQ_SSL_ATTRIBUTE

      Callback for lazy evaluation - extract the SSL-related attributes.

    - #### REQ_SSL_CERTIFICATE

          public static final ActionCode REQ_SSL_CERTIFICATE

      Callback for lazy evaluation - extract the SSL-certificate (including forcing a re-handshake if necessary)

    - #### REQ_REMOTEPORT_ATTRIBUTE

          public static final ActionCode REQ_REMOTEPORT_ATTRIBUTE

      Callback for lazy evaluation - socket remote port.

    - #### REQ_LOCALPORT_ATTRIBUTE

          public static final ActionCode REQ_LOCALPORT_ATTRIBUTE

      Callback for lazy evaluation - socket local port.

    - #### REQ_LOCAL_ADDR_ATTRIBUTE

          public static final ActionCode REQ_LOCAL_ADDR_ATTRIBUTE

      Callback for lazy evaluation - local address.

    - #### REQ_LOCAL_NAME_ATTRIBUTE

          public static final ActionCode REQ_LOCAL_NAME_ATTRIBUTE

      Callback for lazy evaluation - local address.

    - #### REQ_SET_BODY_REPLAY

          public static final ActionCode REQ_SET_BODY_REPLAY

      Callback for setting FORM auth body replay

    - #### COMET_BEGIN

          public static final ActionCode COMET_BEGIN

      Callback for begin Comet processing.

    - #### COMET_END

          public static final ActionCode COMET_END

      Callback for end Comet processing.

    - #### AVAILABLE

          public static final ActionCode AVAILABLE

      Callback for getting the amount of available bytes.

    - #### COMET_CLOSE

          public static final ActionCode COMET_CLOSE

      Callback for an asynchronous close of the Comet event

    - #### COMET_SETTIMEOUT

          public static final ActionCode COMET_SETTIMEOUT

      Callback for setting the timeout asynchronously

    - #### ASYNC_START

          public static final ActionCode ASYNC_START

      Callback for an async request.

    - #### ASYNC_DISPATCH

          public static final ActionCode ASYNC_DISPATCH

      Callback for an async call to `AsyncContext.dispatch()`.

    - #### ASYNC_DISPATCHED

          public static final ActionCode ASYNC_DISPATCHED

      Callback to indicate the the actual dispatch has started and that the async state needs change.

    - #### ASYNC_RUN

          public static final ActionCode ASYNC_RUN

      Callback for an async call to `AsyncContext.start(Runnable)`.

    - #### ASYNC_COMPLETE

          public static final ActionCode ASYNC_COMPLETE

      Callback for an async call to `AsyncContext.complete()`.

    - #### ASYNC_TIMEOUT

          public static final ActionCode ASYNC_TIMEOUT

      Callback to trigger the processing of an async timeout.

    - #### ASYNC_ERROR

          public static final ActionCode ASYNC_ERROR

      Callback to trigger the error processing.

    - #### ASYNC_SETTIMEOUT

          public static final ActionCode ASYNC_SETTIMEOUT

      Callback for an async call to `AsyncContext.setTimeout(long)`

    - #### ASYNC_IS_ASYNC

          public static final ActionCode ASYNC_IS_ASYNC

      Callback to determine if async processing is in progress.

    - #### ASYNC_IS_STARTED

          public static final ActionCode ASYNC_IS_STARTED

      Callback to determine if async dispatch is in progress.

    - #### ASYNC_IS_COMPLETING

          public static final ActionCode ASYNC_IS_COMPLETING

      Call back to determine if async complete is in progress.

    - #### ASYNC_IS_DISPATCHING

          public static final ActionCode ASYNC_IS_DISPATCHING

      Callback to determine if async dispatch is in progress.

    - #### ASYNC_IS_TIMINGOUT

          public static final ActionCode ASYNC_IS_TIMINGOUT

      Callback to determine if async is timing out.

    - #### ASYNC_IS_ERROR

          public static final ActionCode ASYNC_IS_ERROR

      Callback to determine if async is in error.

    - #### UPGRADE_TOMCAT

          public static final ActionCode UPGRADE_TOMCAT

      Callback to trigger Tomcat's proprietary HTTP upgrade process.

    - #### ASYNC_POST_PROCESS

          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 Servlet 3.1 based HTTP upgrade process.

    - #### END_REQUEST

          public static final ActionCode END_REQUEST

      Trigger end of request processing (remaining input swallowed, write any remaining parts of the response etc.).

  - ### 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())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static ActionCode valueOf(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.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.