Package org.osgi.jmx.framework
Interface ServiceStateMBean
-
public interface ServiceStateMBeanThis 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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_IDENTIFIERThe key BUNDLE_IDENTIFIER, used inBUNDLE_IDENTIFIER_ITEM.static ItemBUNDLE_IDENTIFIER_ITEMThe item containing the bundle identifier inSERVICE_TYPE.static java.lang.StringBUNDLE_LOCATIONThe key BUNDLE_LOCATION, used inSERVICE_EVENT_TYPE.static ItemBUNDLE_LOCATION_ITEMThe item containing the bundle location inEVENT_ITEM.static java.lang.StringBUNDLE_SYMBOLIC_NAMEThe key BUNDLE_SYMBOLIC_NAME, used inSERVICE_EVENT_TYPE.static ItemBUNDLE_SYMBOLIC_NAME_ITEMThe item containing the symbolic name inEVENT.static java.lang.StringEVENTThe key EVENT, used inEVENT_ITEM.static ItemEVENT_ITEMThe item containing the event type.static java.lang.StringIDENTIFIERThe key IDENTIFIER, usedIDENTIFIER_ITEM.static ItemIDENTIFIER_ITEMThe item containing the service identifier inSERVICE_TYPE.static java.lang.StringOBJECT_CLASSThe key OBJECT_CLASS, usedOBJECT_CLASS_ITEM.static ItemOBJECT_CLASS_ITEMThe item containing the interfaces of the service inSERVICE_TYPE.static java.lang.StringOBJECTNAMEThe fully qualified object name of this mbean.static java.lang.StringPROPERTIESThe key PROPERTIES, used inPROPERTIES_ITEM.static ItemPROPERTIES_ITEMThe item containing service properties inSERVICE_TYPE.static javax.management.openmbean.CompositeTypeSERVICE_EVENT_TYPEThe Composite Type that represents a service event.static javax.management.openmbean.CompositeTypeSERVICE_TYPEThe Composite Type for a CompositeData representing a service.static javax.management.openmbean.TabularTypeSERVICES_TYPEThe Tabular Type for a Service table.static java.lang.StringUSING_BUNDLESThe key USING_BUNDLES, used inUSING_BUNDLES_ITEM.static ItemUSING_BUNDLES_ITEMThe item containing the bundles using the service inSERVICE_TYPE.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetBundleIdentifier(long serviceId)Answer the bundle identifier of the bundle which registered the servicejava.lang.String[]getObjectClass(long serviceId)Answer the list of interfaces that this service implementsjavax.management.openmbean.TabularDatagetProperties(long serviceId)Answer the map of properties associated with this servicejavax.management.openmbean.CompositeDatagetProperty(long serviceId, java.lang.String key)javax.management.openmbean.CompositeDatagetService(long serviceId)long[]getServiceIds()long[]getUsingBundles(long serviceId)Answer the list of identifiers of the bundles that use the servicejavax.management.openmbean.TabularDatalistServices()Answer the service state of the system in tabular form.javax.management.openmbean.TabularDatalistServices(java.lang.String clazz, java.lang.String filter)javax.management.openmbean.TabularDatalistServices(java.lang.String clazz, java.lang.String filter, java.lang.String... serviceTypeItems)
-
-
-
Field Detail
-
OBJECTNAME
static final java.lang.String OBJECTNAME
The fully qualified object name of this mbean.- See Also:
- Constant Field Values
-
BUNDLE_IDENTIFIER
static final java.lang.String BUNDLE_IDENTIFIER
The key BUNDLE_IDENTIFIER, used inBUNDLE_IDENTIFIER_ITEM.- See Also:
- Constant Field Values
-
BUNDLE_IDENTIFIER_ITEM
static final Item BUNDLE_IDENTIFIER_ITEM
The item containing the bundle identifier inSERVICE_TYPE. The key isBUNDLE_IDENTIFIERand the type isSimpleType.LONG.
-
OBJECT_CLASS
static final java.lang.String OBJECT_CLASS
The key OBJECT_CLASS, usedOBJECT_CLASS_ITEM.- See Also:
- Constant Field Values
-
OBJECT_CLASS_ITEM
static final Item OBJECT_CLASS_ITEM
The item containing the interfaces of the service inSERVICE_TYPE. The key isOBJECT_CLASSand the type isJmxConstants.STRING_ARRAY_TYPE.
-
IDENTIFIER
static final java.lang.String IDENTIFIER
The key IDENTIFIER, usedIDENTIFIER_ITEM.- See Also:
- Constant Field Values
-
IDENTIFIER_ITEM
static final Item IDENTIFIER_ITEM
The item containing the service identifier inSERVICE_TYPE. The key isIDENTIFIERand the type isSimpleType.LONG.
-
PROPERTIES
static final java.lang.String PROPERTIES
The key PROPERTIES, used inPROPERTIES_ITEM.- See Also:
- Constant Field Values
-
PROPERTIES_ITEM
static final Item PROPERTIES_ITEM
The item containing service properties inSERVICE_TYPE. The key isPROPERTIESand the type isJmxConstants.PROPERTIES_TYPE.
-
USING_BUNDLES
static final java.lang.String USING_BUNDLES
The key USING_BUNDLES, used inUSING_BUNDLES_ITEM.- See Also:
- Constant Field Values
-
USING_BUNDLES_ITEM
static final Item USING_BUNDLES_ITEM
The item containing the bundles using the service inSERVICE_TYPE. The key isUSING_BUNDLESand the type isJmxConstants.LONG_ARRAY_TYPE.
-
SERVICE_TYPE
static final javax.management.openmbean.CompositeType SERVICE_TYPE
The Composite Type for a CompositeData representing a service. This type consists of:
-
SERVICES_TYPE
static final javax.management.openmbean.TabularType SERVICES_TYPE
The Tabular Type for a Service table. The rows consists ofSERVICE_TYPEComposite Data and the index isIDENTIFIER.
-
BUNDLE_LOCATION
static final java.lang.String BUNDLE_LOCATION
The key BUNDLE_LOCATION, used inSERVICE_EVENT_TYPE.- See Also:
- Constant Field Values
-
BUNDLE_LOCATION_ITEM
static final Item BUNDLE_LOCATION_ITEM
The item containing the bundle location inEVENT_ITEM. The key isBUNDLE_LOCATIONand the the type isSimpleType.STRING.
-
BUNDLE_SYMBOLIC_NAME
static final java.lang.String BUNDLE_SYMBOLIC_NAME
The key BUNDLE_SYMBOLIC_NAME, used inSERVICE_EVENT_TYPE.- See Also:
- Constant Field Values
-
BUNDLE_SYMBOLIC_NAME_ITEM
static final Item BUNDLE_SYMBOLIC_NAME_ITEM
The item containing the symbolic name inEVENT. The key isBUNDLE_SYMBOLIC_NAMEand the the type isSimpleType.STRING.
-
EVENT
static final java.lang.String EVENT
The key EVENT, used inEVENT_ITEM.- See Also:
- Constant Field Values
-
EVENT_ITEM
static final Item EVENT_ITEM
The item containing the event type. The key isEVENTand the type isSimpleType.INTEGER
-
SERVICE_EVENT_TYPE
static final javax.management.openmbean.CompositeType SERVICE_EVENT_TYPE
The Composite Type that represents a service event. This composite consists of:
-
-
Method Detail
-
getObjectClass
java.lang.String[] getObjectClass(long serviceId) throws java.io.IOExceptionAnswer 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 failsjava.lang.IllegalArgumentException- if the service indicated does not exist
-
getBundleIdentifier
long getBundleIdentifier(long serviceId) throws java.io.IOExceptionAnswer 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 failsjava.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.IOExceptionAnswer 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.Constantsinterface - Throws:
java.io.IOException- if the operation failsjava.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.IOExceptionAnswer the service state of the system in tabular form.- Returns:
- the tabular representation of the service state
- Throws:
java.io.IOException- If the operation failsjava.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.IOExceptionAnswer 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 failsjava.lang.IllegalArgumentException- if the service indicated does not exist
-
-