Class ParameterBasedModRouter

java.lang.Object
org.distributeme.core.routing.AbstractRouter
org.distributeme.core.routing.ParameterBasedModRouter
All Implemented Interfaces:
Router

public class ParameterBasedModRouter extends AbstractRouter implements Router
This router is based on numeric parameters and their mod value.
Version:
$Id: $Id
Author:
lrosenberg.
  • Constructor Details

    • ParameterBasedModRouter

      public ParameterBasedModRouter()
  • Method Details

    • getServiceIdForCall

      public String getServiceIdForCall(ClientSideCallContext callContext)
      Returns the serviceId for this particular call to route to.
      Specified by:
      getServiceIdForCall in interface Router
      Parameters:
      callContext - context of the call with all call related data.
      Returns:
      a String object.
    • getModableValue

      protected long getModableValue(Object o)
      Returns parameter value converted to Long actually. For further mod operation.
      Parameters:
      o - object to convert
      Returns:
      long value
    • customize

      public void customize(String parameter)
      This is old style customize. It is called by the 'new' customize.
      Overrides:
      customize in class AbstractRouter
      Parameters:
      parameter - a String object.
    • getMod

      public int getMod()

      Getter for the field mod.

      Returns:
      a int.
    • getParameterPosition

      public int getParameterPosition()

      Getter for the field parameterPosition.

      Returns:
      a int.