Class ServerSideSlowDownByConfigurationInterceptor
java.lang.Object
org.distributeme.core.interceptor.AbstractServerSideRequestInterceptor
org.distributeme.core.interceptor.availabilitytesting.ServerSideSlowDownInterceptor
org.distributeme.core.interceptor.availabilitytesting.ServerSideSlowDownByConfigurationInterceptor
- All Implemented Interfaces:
ServerSideRequestInterceptor
- Direct Known Subclasses:
FlippingServerSideSlowDownByConfigurationInterceptor
This slow down interceptor is acting on server 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(ServerSideCallContext context) Returns true if current call should be slowed down.Methods inherited from class org.distributeme.core.interceptor.availabilitytesting.ServerSideSlowDownInterceptor
beforeServantCallMethods inherited from class org.distributeme.core.interceptor.AbstractServerSideRequestInterceptor
afterServantCall
-
Constructor Details
-
ServerSideSlowDownByConfigurationInterceptor
public ServerSideSlowDownByConfigurationInterceptor()
-
-
Method Details
-
slowDown
Returns true if current call should be slowed down. This decision is mostly based on service id.- Specified by:
slowDownin classServerSideSlowDownInterceptor- Parameters:
context- aServerSideCallContextobject.- Returns:
- a boolean.
-
getSlowDownTime
protected long getSlowDownTime()Returns the amount of time in milliseconds the call should be slowed down.- Specified by:
getSlowDownTimein classServerSideSlowDownInterceptor- Returns:
- a long.
-