Class ClientSideSlowDownByPropertyInterceptor
java.lang.Object
org.distributeme.core.interceptor.AbstractClientSideRequestInterceptor
org.distributeme.core.interceptor.availabilitytesting.ClientSideSlowDownInterceptor
org.distributeme.core.interceptor.availabilitytesting.ClientSideSlowDownByPropertyInterceptor
- All Implemented Interfaces:
ClientSideRequestInterceptor
This interceptor slows down a server if the service id is submitted to the process as -DavailabilityTestingServiceId.
This interceptor works on the client side, it slows down the call BEFORE it leaves the vm.
- Version:
- $Id: $Id
- Author:
- lrosenberg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longgetSlowDownTime.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
-
ClientSideSlowDownByPropertyInterceptor
public ClientSideSlowDownByPropertyInterceptor()
-
-
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()getSlowDownTime.
- Specified by:
getSlowDownTimein classClientSideSlowDownInterceptor- Returns:
- a long.
-