com.multisoftgroup.jerry.webchat.managers.balancer
Class FirstAvailableOperator

java.lang.Object
  extended by com.multisoftgroup.jerry.webchat.managers.balancer.OperatorBalancer
      extended by com.multisoftgroup.jerry.webchat.managers.balancer.FirstAvailableOperator

public class FirstAvailableOperator
extends OperatorBalancer

This is simple Operator Balancer. It returns a first available operator from the specified account according to a number of operator order. The operator order is defined in jerry.xml configuration file.

This balancer may be helpful for ranked support. If an operator A (with order = 1) is online, he/she receives the all chat requests. Operator B (with order = 2) receives nothing.
If the operator A is offline, the operator B receives the all requests.

Author:
Pavel Savin

Constructor Summary
FirstAvailableOperator()
           
 
Method Summary
 Operator nextAvailableOperator(JerryAccount account)
          The implementation of this method should return next available operator for the specified account.
 
Methods inherited from class com.multisoftgroup.jerry.webchat.managers.balancer.OperatorBalancer
getLoading, isOperatorAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstAvailableOperator

public FirstAvailableOperator()
Method Detail

nextAvailableOperator

public Operator nextAvailableOperator(JerryAccount account)
Description copied from class: OperatorBalancer
The implementation of this method should return next available operator for the specified account.

Specified by:
nextAvailableOperator in class OperatorBalancer
Parameters:
account - Jerry account in which the chat is created
Returns:
available operator