Enum Class ExecutionPhase

java.lang.Object
java.lang.Enum<ExecutionPhase>
io.gravitee.gateway.reactive.api.ExecutionPhase
All Implemented Interfaces:
Serializable, Comparable<ExecutionPhase>, Constable

public enum ExecutionPhase extends Enum<ExecutionPhase>
An execution phase allows knowing in which phase of the whole request processing a given action occurs. The execution phase is mainly useful during the flow and policy chain executions.
                                          ____________________________________________________
      ______________       request       |                       GATEWAY                      |      request        ______________
     |              |   ------------->   |                                                    |   ------------->   |              |
     |  DOWNSTREAM  |                    |  ----------- REQUEST / ASYNC_REQUEST  -----------> |                    |   UPSTREAM   |
     |   (client)   |   <-------------   |  <---------- RESPONSE / ASYNC_RESPONSE ----------- |   <-------------   |  (endpoint)  |
     |______________|      response      |                                                    |      response      |______________|
                                         |____________________________________________________|
 
Author:
Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com), GraviteeSource Team
  • Enum Constant Details

    • REQUEST

      public static final ExecutionPhase REQUEST
      This phase represents the actions occurring from the downstream to the upstream in a sync execution context.
                                                ______________________________
            ______________                     |            GATEWAY           |                     ______________
           |              |      request       |                              |      request       |              |
           |  DOWNSTREAM  |   ------------->   |  -------- REQUEST ---------> |   ------------->   |   UPSTREAM   |
           |   (client)   |                    |                              |                    |  (endpoint)  |
           |______________|                    |______________________________|                    |______________|
      
       
      For an HTTP request, it represents the policies executed before the endpoint is invoked by the gateway.
    • MESSAGE_REQUEST

      public static final ExecutionPhase MESSAGE_REQUEST
      This phase represents the actions occurring from the downstream to the upstream in an async execution context.
                                                ______________________________
            ______________                     |            GATEWAY           |                     ______________
           |              |      request       |                              |      request       |              |
           |  DOWNSTREAM  |   ------------->   |  ----- MESSAGE_REQUEST ----> |   ------------->   |   UPSTREAM   |
           |   (client)   |                    |                              |                    |  (endpoint)  |
           |______________|                    |______________________________|                    |______________|
      
       
    • RESPONSE

      public static final ExecutionPhase RESPONSE
      This phase represents the actions occurring from the upstream to the downstream in a message execution context.
                                                ______________________________
            ______________                     |            GATEWAY           |                     ______________
           |              |      response      |                              |      response      |              |
           |  DOWNSTREAM  |   <-------------   |  <------- RESPONSE --------- |   <-------------   |   UPSTREAM   |
           |   (client)   |                    |                              |                    |  (endpoint)  |
           |______________|                    |______________________________|                    |______________|
      
       
      For an HTTP request, it represents the policies executed after the endpoint has been invoked by the gateway.
    • MESSAGE_RESPONSE

      public static final ExecutionPhase MESSAGE_RESPONSE
      This phase represents the actions occurring from the upstream to the downstream in a message execution context.
                                                ______________________________
            ______________                     |            GATEWAY           |                     ______________
           |              |      response      |                              |      response      |              |
           |  DOWNSTREAM  |   <-------------   |  <---- MESSAGE_RESPONSE----- |   <-------------   |   UPSTREAM   |
           |   (client)   |                    |                              |                    |  (endpoint)  |
           |______________|                    |______________________________|                    |______________|
      
       
  • Method Details

    • values

      public static ExecutionPhase[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ExecutionPhase valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ExecutionPhase>