Class ClientSideSlowDownByConfigurationInterceptor
java.lang.Object
org.distributeme.core.interceptor.AbstractClientSideRequestInterceptor
org.distributeme.core.interceptor.availabilitytesting.ClientSideSlowDownInterceptor
org.distributeme.core.interceptor.availabilitytesting.ClientSideSlowDownByConfigurationInterceptor
- All Implemented Interfaces:
ClientSideRequestInterceptor
- Direct Known Subclasses:
FlippingClientSideSlowDownByConfigurationInterceptor
This slow down interceptor is acting on client side and configured by availabilitytesting.json configuration file.
- Version:
- $Id: $Id
- Author:
- lrosenberg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longReturns the amount of time in milliseconds the call should be slowed down.protected booleanslowDown(ClientSideCallContext context) Returns true if current call should be slowed down.Methods inherited from class org.distributeme.core.interceptor.availabilitytesting.ClientSideSlowDownInterceptor
beforeServiceCallMethods inherited from class org.distributeme.core.interceptor.AbstractClientSideRequestInterceptor
afterServiceCall
-
Constructor Details
-
ClientSideSlowDownByConfigurationInterceptor
public ClientSideSlowDownByConfigurationInterceptor()
-
-
Method Details
-
slowDown
Returns true if current call should be slowed down. This decision is mostly based on service id.- Specified by:
slowDownin classClientSideSlowDownInterceptor- Parameters:
context- aClientSideCallContextobject.- Returns:
- a boolean.
-
getSlowDownTime
protected long getSlowDownTime()Returns the amount of time in milliseconds the call should be slowed down.- Specified by:
getSlowDownTimein classClientSideSlowDownInterceptor- Returns:
- a long.
-