Package io.gravitee.gateway.api.context
Class SimpleExecutionContext
java.lang.Object
io.gravitee.gateway.api.context.SimpleExecutionContext
- All Implemented Interfaces:
MutableExecutionContext,ExecutionContext
- Author:
- David BRASSELY (david.brassely at graviteesource.com), GraviteeSource Team
-
Field Summary
Fields inherited from interface io.gravitee.gateway.api.ExecutionContext
ATTR_API, ATTR_API_DEPLOYED_AT, ATTR_APPLICATION, ATTR_CLIENT_IDENTIFIER, ATTR_CONTEXT_PATH, ATTR_ENVIRONMENT, ATTR_FAILURE_ATTRIBUTE, ATTR_INVOKER, ATTR_INVOKER_SKIP, ATTR_MAPPED_PATH, ATTR_ORGANIZATION, ATTR_PLAN, ATTR_PREFIX, ATTR_QUOTA_COUNT, ATTR_QUOTA_LIMIT, ATTR_QUOTA_REMAINING, ATTR_QUOTA_RESET_TIME, ATTR_REQUEST_ENDPOINT, ATTR_REQUEST_METHOD, ATTR_RESOLVED_PATH, ATTR_SECURITY_SKIP, ATTR_SUBSCRIPTION_ID, ATTR_USER, ATTR_USER_ROLES, ATTR_VALIDATE_SUBSCRIPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) Returns the value of the named attribute as an Object, ornullif no attribute of the given name exists.Returns an Enumeration containing the names of the attributes available to this request.<T> TgetComponent(Class<T> componentClass) io.gravitee.el.TemplateEnginevoidremoveAttribute(String name) Removes an attribute from this request.request()response()voidsetAttribute(String name, Object value) Stores an attribute in this request.
-
Constructor Details
-
SimpleExecutionContext
-
-
Method Details
-
request
- Specified by:
requestin interfaceMutableExecutionContext
-
response
- Specified by:
responsein interfaceMutableExecutionContext
-
tracer
- Specified by:
tracerin interfaceMutableExecutionContext
-
request
- Specified by:
requestin interfaceExecutionContext
-
response
- Specified by:
responsein interfaceExecutionContext
-
getComponent
- Specified by:
getComponentin interfaceExecutionContext
-
setAttribute
Description copied from interface:ExecutionContextStores an attribute in this request. Attributes are reset between requests.- Specified by:
setAttributein interfaceExecutionContext- Parameters:
name- a String specifying the name of the attributevalue- the Object to be stored
-
removeAttribute
Description copied from interface:ExecutionContextRemoves an attribute from this request. This method is not generally needed as attributes only persist as long as the request is being handled.- Specified by:
removeAttributein interfaceExecutionContext- Parameters:
name- a String specifying the name of the attribute to remove
-
getAttribute
Description copied from interface:ExecutionContextReturns the value of the named attribute as an Object, ornullif no attribute of the given name exists.- Specified by:
getAttributein interfaceExecutionContext- 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
-
getAttributeNames
Description copied from interface:ExecutionContextReturns 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.- Specified by:
getAttributeNamesin interfaceExecutionContext- Returns:
- an Enumeration of strings containing the names of the request's attributes
-
getTemplateEngine
public io.gravitee.el.TemplateEngine getTemplateEngine()- Specified by:
getTemplateEnginein interfaceExecutionContext
-
getTracer
- Specified by:
getTracerin interfaceExecutionContext
-
getAttributes
- Specified by:
getAttributesin interfaceExecutionContext
-