public interface EndpointInterceptor extends InterceptorRequester
InterceptorRequester
interface, and provides the ability
to be invoked before and after the call to an API endpoint by an API requester call.
When more than one interceptor is configured, the order of execution is determined by a sequence number. See
Interceptor.getSequence()
.
The postEndpointInvoke methods of interceptors are processed in the opposite order to that in which the preEndpointInvoke methods were called. If interceptors specify invalid sequence numbers or the same sequence numbers, the processing order is undefined.
If an API requester is invoked while a refresh is in progress, interceptor calls might not occur as expected. For example, you change the server.xml file to add an interceptor, and issue the refresh command. While the refresh occurs, an API requester is invoked. The preEndpointInvoke does not occur because the refresh has not finished. After the refresh is complete, the postEndpointInvoke for the API is called because it now exists.
This interface is available from z/OS Connect EE V3.0.39.0.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
copyright_notice |
CFG_AD_SEQUENCE_ALIAS, DEFAULT_SEQUENCE_NUMBER
Modifier and Type | Method and Description |
---|---|
void |
postEndpointInvoke(java.util.Map<java.lang.Object,java.lang.Object> requestStateMap,
DataRequester data)
Runs implementor specific logic.
|
void |
preEndpointInvoke(java.util.Map<java.lang.Object,java.lang.Object> requestStateMap,
DataRequester data)
Runs implementor specific logic.
|
postInvokeRequester, preInvokeRequester
getName, getSequence, postInvoke, preInvoke
static final java.lang.String copyright_notice
void preEndpointInvoke(java.util.Map<java.lang.Object,java.lang.Object> requestStateMap, DataRequester data)
401
HTTP response code and the request is retried with a fresh access token. In
this event the REQUEST_RETRIED flag is set on the second attempt.requestStateMap
- A map object that holds implementor data that can be retrieved and/or updated by artifacts
that have a reference to it (e.g. InterceptorRequester.preInvokeRequester(),
InteceptorRequester.postInvokeRequester()). z/OS Connect EE creates a new map and makes it available
to the consuming artifacts per request. Prefix key strings with your own unique identifier to avoid
clashes with those created by other interceptor providers. Key string entries starting with
"IBM_ZOS_CONNECT" are reserved for z/OS Connect EE use.data
- Common request specific data.void postEndpointInvoke(java.util.Map<java.lang.Object,java.lang.Object> requestStateMap, DataRequester data)
requestStateMap
- A map object that holds implementor data that can be retrieved and/or updated by artifacts
that have a reference to it (e.g. InterceptorRequester.preInvokeRequester(),
InteceptorRequester.postInvokeRequester()). z/OS Connect EE creates a new map and makes it available
to the consuming artifacts per request. Prefix key strings with your own unique identifier to avoid
clashes with those created by other interceptor providers. Key string entries starting with
"IBM_ZOS_CONNECT" are reserved for z/OS Connect EE use.data
- Common response specific data.