Interface ExecutionContext

    • Method Detail

      • interrupt

        io.reactivex.Completable interrupt()
        Interrupted the current execution while indicating that the response can be sent "as is" to the downstream. This has direct impact on how the remaining execution flow will behave (ex: remaining policies in a policy chain won't be executed).
      • interruptWith

        io.reactivex.Completable interruptWith​(ExecutionFailure failure)
        Same as interrupt() but with an ExecutionFailure object that indicates that the execution has failed. The ExecutionFailure can be processed in order to build a proper response (ex: based on templating, with appropriate accept-encoding, ...).
      • getComponent

        <T> T getComponent​(Class<T> componentClass)
      • setAttribute

        void setAttribute​(String name,
                          Object value)
        Parameters:
        name - a String specifying the name of the attribute.
        value - the Object to be stored.
      • putAttribute

        void putAttribute​(String name,
                          Object value)
        Stores an attribute in this request. Attributes are reset between requests. Note: prefer use of putInternalAttribute(String, Object) in case the attribute is not set by the user itself.
        Parameters:
        name - a String specifying the name of the attribute.
        value - the Object to be stored.
      • removeAttribute

        void removeAttribute​(String name)
        Removes an attribute from this request. This method is not generally needed as attributes only persist as long as the request is being handled.
        Parameters:
        name - the name of the attribute to remove.
      • getAttribute

        <T> T getAttribute​(String name)
        Returns the value of the attribute cast in the expected type T, or null if no attribute for the given name exists.
        Type Parameters:
        T - the expected type of the attribute value. Specify Object if you expect value of any type.
        Parameters:
        name - the name of the attribute.
        Returns:
        an Object containing the value of the attribute, or null if the attribute does not exist.
      • getAttributeNames

        Set<String> getAttributeNames()
        Returns an Enumeration containing the names of the attributes available to this request. This method returns an empty Enumeration if the request has no attributes available to it.
        Returns:
        a set of strings containing the names of the request's attributes.
      • getAttributes

        <T> Map<String,​T> getAttributes()
        Get all attributes available.
        Type Parameters:
        T - the expected type of the attribute values. Specify Object if you expect values of any types.
        Returns:
        the list of all the attributes.
      • putInternalAttribute

        void putInternalAttribute​(String name,
                                  Object value)
        Stores an internal attribute in this request. Attributes are reset between requests. Internal attributes can be used to avoid mixin with attribute set by the user during the request processing.
        Parameters:
        name - the name of the attribute.
        value - the Object to be stored.
      • removeInternalAttribute

        void removeInternalAttribute​(String name)
        Removes an internal attribute from this request.
        Parameters:
        name - the name of the internal attribute to remove.
      • getInternalAttribute

        <T> T getInternalAttribute​(String name)
        Returns the value of the internal attribute cast in the expected type T, or null if no attribute for the given name exists.
        Type Parameters:
        T - the expected type of the attribute value. Specify Object if you expect value of any type.
        Parameters:
        name - a String specifying the name of the attribute.
        Returns:
        an Object containing the value of the attribute, or null if the attribute does not exist
      • getInternalAttributes

        <T> Map<String,​T> getInternalAttributes()
        Get all internal attributes available. Internal attributes are intended to not be manipulated by end-users. You can safely use internal attribute to temporary store useful objects required during different phases of the execution.
        Type Parameters:
        T - the expected type of the values. Specify Object if you expect values of any types.
        Returns:
        the list of all the internal attributes.
      • getTemplateEngine

        io.gravitee.el.TemplateEngine getTemplateEngine()
        Get the TemplateEngine that can be used to evaluate EL expressions.
        Returns:
        the El TemplateEngine.