org.mobicents.tools.sip.balancer
Class CallIDAffinityBalancerAlgorithm

java.lang.Object
  extended by org.mobicents.tools.sip.balancer.DefaultBalancerAlgorithm
      extended by org.mobicents.tools.sip.balancer.CallIDAffinityBalancerAlgorithm
All Implemented Interfaces:
BalancerAlgorithm

public class CallIDAffinityBalancerAlgorithm
extends DefaultBalancerAlgorithm


Field Summary
 
Fields inherited from class org.mobicents.tools.sip.balancer.DefaultBalancerAlgorithm
properties
 
Constructor Summary
CallIDAffinityBalancerAlgorithm()
           
 
Method Summary
 void assignToNode(java.lang.String id, SIPNode node)
          Assign callid to node
 void init()
          Lifecycle method.
 void jvmRouteSwitchover(java.lang.String fromJvmRoute, java.lang.String toJvmRoute)
          Move load from one node to another to follow mod_jk/mod_cluster
 SIPNode processExternalRequest(javax.sip.message.Request request)
          When a request comes it is passed to the algorithm.
 void processExternalResponse(javax.sip.message.Response request)
          Allow algorithms to process responses
 void processInternalRequest(javax.sip.message.Request request)
           
 void processInternalResponse(javax.sip.message.Response request)
           
 
Methods inherited from class org.mobicents.tools.sip.balancer.DefaultBalancerAlgorithm
getBalancerContext, getProperties, nodeAdded, nodeRemoved, processAssignedExternalRequest, processHttpRequest, setProperties, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallIDAffinityBalancerAlgorithm

public CallIDAffinityBalancerAlgorithm()
Method Detail

processInternalRequest

public void processInternalRequest(javax.sip.message.Request request)
Specified by:
processInternalRequest in interface BalancerAlgorithm
Overrides:
processInternalRequest in class DefaultBalancerAlgorithm

processInternalResponse

public void processInternalResponse(javax.sip.message.Response request)
Specified by:
processInternalResponse in interface BalancerAlgorithm
Overrides:
processInternalResponse in class DefaultBalancerAlgorithm

processExternalResponse

public void processExternalResponse(javax.sip.message.Response request)
Description copied from interface: BalancerAlgorithm
Allow algorithms to process responses

Specified by:
processExternalResponse in interface BalancerAlgorithm
Overrides:
processExternalResponse in class DefaultBalancerAlgorithm

processExternalRequest

public SIPNode processExternalRequest(javax.sip.message.Request request)
Description copied from interface: BalancerAlgorithm
When a request comes it is passed to the algorithm. The algorithm must add the Route headers to the node or nodes where the request should go. The actual proxying is done at the LB. Allowing the algorithm to add headers allows more flexibility for example when you need to pass some information to the AS or the application to make further LB decisions or multiprotocol cooperative load balancing. It is very little effort for great flexibility.

Returns:

init

public void init()
Description copied from interface: BalancerAlgorithm
Lifecycle method. Notifies the algorithm when it's initialized with properties and balancer context.


assignToNode

public void assignToNode(java.lang.String id,
                         SIPNode node)
Description copied from interface: BalancerAlgorithm
Assign callid to node

Specified by:
assignToNode in interface BalancerAlgorithm
Overrides:
assignToNode in class DefaultBalancerAlgorithm

jvmRouteSwitchover

public void jvmRouteSwitchover(java.lang.String fromJvmRoute,
                               java.lang.String toJvmRoute)
Description copied from interface: BalancerAlgorithm
Move load from one node to another to follow mod_jk/mod_cluster

Specified by:
jvmRouteSwitchover in interface BalancerAlgorithm
Overrides:
jvmRouteSwitchover in class DefaultBalancerAlgorithm


Copyright © 2010. All Rights Reserved.