org.ow2.jonas.lib.service.manager
Class ServiceUtil

java.lang.Object
  extended by org.ow2.jonas.lib.service.manager.ServiceUtil

public final class ServiceUtil
extends Object

This class provides facilities for managing the JOnAS services implemented as OSGI services.

Author:
Adriana Danes

Field Summary
static String SERVICE_NAME_PROP
          OSGI service property defined for all the JOnAS services, giving the service name for JOnAS management support.
 
Method Summary
static String getJOnASService(org.osgi.framework.ServiceReference serviceReference)
          If the given ServiceReference has the "jonas.service" property set, returns its value which represents the JOnAS service name.
static List<String> getRunningServices(org.osgi.framework.BundleContext bc)
          Returns the names of the JOnAS services that are running on the OSGi platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME_PROP

public static final String SERVICE_NAME_PROP
OSGI service property defined for all the JOnAS services, giving the service name for JOnAS management support.

See Also:
Constant Field Values
Method Detail

getJOnASService

public static String getJOnASService(org.osgi.framework.ServiceReference serviceReference)
If the given ServiceReference has the "jonas.service" property set, returns its value which represents the JOnAS service name.

Parameters:
serviceReference - the ServiceReference
Returns:
"jonas.service" service property value if set, null otherwise.

getRunningServices

public static List<String> getRunningServices(org.osgi.framework.BundleContext bc)
                                       throws org.osgi.framework.InvalidSyntaxException
Returns the names of the JOnAS services that are running on the OSGi platform.

Parameters:
bc - The BundleContext
Returns:
The running service names
Throws:
org.osgi.framework.InvalidSyntaxException - Cannot get the OSGi services


Copyright © 2010 OW2 Consortium. All Rights Reserved.