org.apache.felix.ipojo.util
Class ServiceReferenceRankingComparator
java.lang.Object
org.apache.felix.ipojo.util.ServiceReferenceRankingComparator
- All Implemented Interfaces:
- Serializable, Comparator
public class ServiceReferenceRankingComparator
- extends Object
- implements Comparator, Serializable
Service Reference Comparator.
This comparator follows OSGi Ranking policy.
- Author:
- Felix Project Team
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceReferenceRankingComparator
public ServiceReferenceRankingComparator()
compare
public int compare(Object ref1,
Object ref2)
- Compares two service reference.
- Specified by:
compare
in interface Comparator
- Parameters:
ref1
- the reference 1ref2
- the reference 2
- Returns:
-1
if the reference 1
is 'higher' than the reference 2, 1
otherwise.
(higher is term of ranking means a lower index)- See Also:
Comparator.compare(java.lang.Object, java.lang.Object)
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.