org.apache.sling.commons.osgi
Class ServiceUtil

java.lang.Object
  extended by org.apache.sling.commons.osgi.ServiceUtil

public class ServiceUtil
extends java.lang.Object

The ServiceUtil is a utility class providing some usefull utility methods for service handling.

Since:
2.1

Constructor Summary
ServiceUtil()
           
 
Method Summary
static java.lang.Comparable<java.lang.Object> getComparableForServiceRanking(java.util.Map<java.lang.String,java.lang.Object> props)
          Create a comparable object out of the service properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceUtil

public ServiceUtil()
Method Detail

getComparableForServiceRanking

public static java.lang.Comparable<java.lang.Object> getComparableForServiceRanking(java.util.Map<java.lang.String,java.lang.Object> props)
Create a comparable object out of the service properties. With the result it is possible to compare service properties based on the service ranking of a service. Therefore this object acts like ServiceReference.compareTo(Object).

Parameters:
props - The service properties.
Returns:
A comparable for the ranking of the service


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.