public class ApiVersionInterceptor extends HandlerInterceptorAdapter
HandlerInterceptor that inspects the service broker API version passed in all request headers
and compares it to the API version supported by the broker.| Constructor and Description |
|---|
ApiVersionInterceptor()
Construct an interceptor that disables API version validation.
|
ApiVersionInterceptor(BrokerApiVersion version)
Construct an interceptor that validates the API version passed in request headers to the
configured version.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
Compares the service broker API version header to the supported version.
|
afterCompletion, afterConcurrentHandlingStarted, postHandlepublic ApiVersionInterceptor()
public ApiVersionInterceptor(BrokerApiVersion version)
version - the API version supported by the broker.public boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
throws ServiceBrokerApiVersionException
preHandle in interface HandlerInterceptorpreHandle in class HandlerInterceptorAdapterrequest - response - handler - ServiceBrokerApiVersionException - if the API version header value does not match the version
supported by the broker