Class ServerSideSlowDownByPropertyInterceptor
java.lang.Object
org.distributeme.core.interceptor.AbstractServerSideRequestInterceptor
org.distributeme.core.interceptor.availabilitytesting.ServerSideSlowDownInterceptor
org.distributeme.core.interceptor.availabilitytesting.ServerSideSlowDownByPropertyInterceptor
- All Implemented Interfaces:
ServerSideRequestInterceptor
This interceptor slows down a server if the service id is submitted to the process as -DavailabilityTestingServiceId.
- 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
-
ServerSideSlowDownByPropertyInterceptor
public ServerSideSlowDownByPropertyInterceptor()
-
-
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.
-