Considerations for Creating an HTTP Interceptor
You need to consider the following when creating an HTTP interceptor:
An HTTP interceptor class must implement the
com.softwareag.is.interceptor.HttpInterceptorIFC interface for inbound messages and the
com.softwareag.is.interceptor.HttpOutboundInterceptorIFC for outbound messages.
You can register only one HTTP interceptor class of each type.
The HTTP interceptor class must provide implementations of the
preProcess and
postProces methods. For more information, see the
webMethods Integration Server Java API Reference.
Using an HTTP interceptor delays the processing of a request. Any logic that the
preProcess method executes to determine whether or not to continue with request processing needs to be done synchronously. However, if the
preProcess method includes logic that can be done asynchronously by spawning another thread, regular processing can proceed without a delay.
Using an HTTP interceptor also delays the processing of responses.
An HTTP interceptor cannot modify the content of the HTTP request or response.
Integration Server passes a byte array representation of the input stream in the case of an inbound interceptor (or output stream in the case of an outbound interceptor).
Note:
Ensure that you have sufficient system resources for the payloads that need be processed by the outbound interceptor.
Unless an HTTP interceptor throws an
HttpInterceptorException to reject a request,
Integration Server continues with the normal processing of the original input (or output) stream.