Class AbstractRouter

java.lang.Object
org.distributeme.core.routing.AbstractRouter
All Implemented Interfaces:
Router
Direct Known Subclasses:
AbstractRouterWithFailOverToNextNode, AbstractRouterWithStickyFailOverToNextNode, Failover, FailoverAndReturn, FairRoundRobinRouter, NoOpRouter, ParameterBasedModRouter, RoundRobinRouter, SysOutRouter

public abstract class AbstractRouter extends Object implements Router
Abstract class for Router. Introduced to be able to handle routing statistics centrally.
Since:
21.09.15 00:45
Version:
$Id: $Id
Author:
lrosenberg
  • Constructor Details

    • AbstractRouter

      public AbstractRouter()
  • Method Details

    • customize

      public void customize(String serviceId, String parameter)
      Called shortly after the initialization to customize this router according to the parameter in the annotation.
      Specified by:
      customize in interface Router
      Parameters:
      serviceId - id of the service we are routing.
      parameter - value of the annotation parameter.
    • customize

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

      protected void setServiceId(String serviceId)

      Setter for the field serviceId.

      Parameters:
      serviceId - a String object.
    • getRoutingStats

      protected RoutingStatsCollector getRoutingStats(String serviceId)

      getRoutingStats.

      Parameters:
      serviceId - a String object.
      Returns:
      a RoutingStatsCollector object.