Interface ServiceStateMBean


  • public interface ServiceStateMBean
    This MBean represents the Service state of the framework. This MBean also emits events that clients can use to get notified of the changes in the service state of the framework.
    • Method Detail

      • getObjectClass

        java.lang.String[] getObjectClass​(long serviceId)
                                   throws java.io.IOException
        Answer the list of interfaces that this service implements
        Parameters:
        serviceId - the identifier of the service
        Returns:
        the list of interfaces
        Throws:
        java.io.IOException - if the operation fails
        java.lang.IllegalArgumentException - if the service indicated does not exist
      • getBundleIdentifier

        long getBundleIdentifier​(long serviceId)
                          throws java.io.IOException
        Answer the bundle identifier of the bundle which registered the service
        Parameters:
        serviceId - the identifier of the service
        Returns:
        the identifier for the bundle
        Throws:
        java.io.IOException - if the operation fails
        java.lang.IllegalArgumentException - if the service indicated does not exist
      • getService

        javax.management.openmbean.CompositeData getService​(long serviceId)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getProperties

        javax.management.openmbean.TabularData getProperties​(long serviceId)
                                                      throws java.io.IOException
        Answer the map of properties associated with this service
        Parameters:
        serviceId - the identifier of the service
        Returns:
        the table of properties. These include the standard mandatory service.id and objectClass properties as defined in the org.osgi.framework.Constants interface
        Throws:
        java.io.IOException - if the operation fails
        java.lang.IllegalArgumentException - if the service indicated does not exist
        See Also:
        for the details of the TabularType
      • getProperty

        javax.management.openmbean.CompositeData getProperty​(long serviceId,
                                                             java.lang.String key)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getServiceIds

        long[] getServiceIds()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • listServices

        javax.management.openmbean.TabularData listServices()
                                                     throws java.io.IOException
        Answer the service state of the system in tabular form.
        Returns:
        the tabular representation of the service state
        Throws:
        java.io.IOException - If the operation fails
        java.lang.IllegalArgumentException - if the service indicated does not exist
        See Also:
        for the details of the TabularType
      • listServices

        javax.management.openmbean.TabularData listServices​(java.lang.String clazz,
                                                            java.lang.String filter)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • listServices

        javax.management.openmbean.TabularData listServices​(java.lang.String clazz,
                                                            java.lang.String filter,
                                                            java.lang.String... serviceTypeItems)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getUsingBundles

        long[] getUsingBundles​(long serviceId)
                        throws java.io.IOException
        Answer the list of identifiers of the bundles that use the service
        Parameters:
        serviceId - the identifier of the service
        Returns:
        the list of bundle identifiers
        Throws:
        java.io.IOException - if the operation fails
        java.lang.IllegalArgumentException - if the service indicated does not exist