public class ApiVersionInterceptor extends Object implements HandlerInterceptor
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterCompletion, 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)
preHandle in interface HandlerInterceptorrequest - response - handler - ServiceBrokerApiVersionException - if the API version header value does not match the version supported
by the broker