Package org.distributeme.core.routing
Class ParameterBasedModRouter
java.lang.Object
org.distributeme.core.routing.AbstractRouter
org.distributeme.core.routing.ParameterBasedModRouter
- All Implemented Interfaces:
Router
This router is based on numeric parameters and their mod value.
- Version:
- $Id: $Id
- Author:
- lrosenberg.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis is old style customize.intgetMod()Getter for the fieldmod.protected longReturns parameter value converted to Long actually.intGetter for the fieldparameterPosition.getServiceIdForCall(ClientSideCallContext callContext) Returns the serviceId for this particular call to route to.Methods inherited from class org.distributeme.core.routing.AbstractRouter
customize, getRoutingStats, setServiceId
-
Constructor Details
-
ParameterBasedModRouter
public ParameterBasedModRouter()
-
-
Method Details
-
getServiceIdForCall
Returns the serviceId for this particular call to route to.- Specified by:
getServiceIdForCallin interfaceRouter- Parameters:
callContext- context of the call with all call related data.- Returns:
- a
Stringobject.
-
getModableValue
Returns parameter value converted to Long actually. For further mod operation.- Parameters:
o- object to convert- Returns:
- long value
-
customize
This is old style customize. It is called by the 'new' customize.- Overrides:
customizein classAbstractRouter- Parameters:
parameter- aStringobject.
-
getMod
public int getMod()Getter for the field
mod.- Returns:
- a int.
-
getParameterPosition
public int getParameterPosition()Getter for the field
parameterPosition.- Returns:
- a int.
-