org.echarts.servlet.sip.appRouter.DFCRouterImpl
Class TerminatingPrecedenceComparator

java.lang.Object
  extended by org.echarts.servlet.sip.appRouter.DFCRouterImpl.TerminatingPrecedenceComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<Application>

public class TerminatingPrecedenceComparator
extends java.lang.Object
implements java.io.Serializable, java.util.Comparator<Application>

This class provides a comparator for comparing two terminating region applications. Since comparators must provide a total ordering consistent with equals, this comparator provides more ordering than the partial ordering needed by DFC.

Author:
khp
See Also:
Serialized Form

Constructor Summary
TerminatingPrecedenceComparator()
           
 
Method Summary
 int compare(Application a1, Application a2)
          Compare two objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

TerminatingPrecedenceComparator

public TerminatingPrecedenceComparator()
Method Detail

compare

public int compare(Application a1,
                   Application a2)
Compare two objects.

Specified by:
compare in interface java.util.Comparator<Application>
Returns:
integer which is greater than, less than or equal to 0 depending on the relative terminating region precedence of the two applications being compared.
Throws:
java.lang.ClassCastException - if object is not an application object