Class ServiceUnavailableInterceptor
java.lang.Object
org.distributeme.core.interceptor.AbstractClientSideRequestInterceptor
org.distributeme.core.interceptor.availabilitytesting.ServiceUnavailableInterceptor
- All Implemented Interfaces:
ClientSideRequestInterceptor
- Direct Known Subclasses:
ServiceUnavailableByConfigurationInterceptor,ServiceUnavailableByPropertyInterceptor
Base interceptor class for service unavailable interceptors. This kind of interceptors throw
a ServiceUnavailableException as if the service would be down.
- Version:
- $Id: $Id
- Author:
- lrosenberg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanabortCall(ClientSideCallContext context) Returns true if current call should be aborted.beforeServiceCall(ClientSideCallContext context, InterceptionContext iContext) Called after client side processing but before the actual call is performed.Methods inherited from class org.distributeme.core.interceptor.AbstractClientSideRequestInterceptor
afterServiceCall
-
Constructor Details
-
ServiceUnavailableInterceptor
public ServiceUnavailableInterceptor()
-
-
Method Details
-
beforeServiceCall
public InterceptorResponse beforeServiceCall(ClientSideCallContext context, InterceptionContext iContext) Called after client side processing but before the actual call is performed.- Specified by:
beforeServiceCallin interfaceClientSideRequestInterceptor- Overrides:
beforeServiceCallin classAbstractClientSideRequestInterceptor- Parameters:
context- aClientSideCallContextobject.iContext- aInterceptionContextobject.- Returns:
- a
InterceptorResponseobject.
-
abortCall
Returns true if current call should be aborted.- Parameters:
context- aClientSideCallContextobject.- Returns:
- a boolean.
-