Package org.osgi.jmx.framework
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key BUNDLE_IDENTIFIER, used inBUNDLE_IDENTIFIER_ITEM.static final ItemThe item containing the bundle identifier inSERVICE_TYPE.static final StringThe key BUNDLE_LOCATION, used inSERVICE_EVENT_TYPE.static final ItemThe item containing the bundle location inEVENT_ITEM.static final StringThe key BUNDLE_SYMBOLIC_NAME, used inSERVICE_EVENT_TYPE.static final ItemThe item containing the symbolic name inEVENT.static final StringThe key EVENT, used inEVENT_ITEM.static final ItemThe item containing the event type.static final StringThe key IDENTIFIER, usedIDENTIFIER_ITEM.static final ItemThe item containing the service identifier inSERVICE_TYPE.static final StringThe key OBJECT_CLASS, usedOBJECT_CLASS_ITEM.static final ItemThe item containing the interfaces of the service inSERVICE_TYPE.static final StringThe fully qualified object name of this mbean.static final StringThe key PROPERTIES, used inPROPERTIES_ITEM.static final ItemThe item containing service properties inSERVICE_TYPE.static final CompositeTypeThe Composite Type that represents a service event.static final CompositeTypeThe Composite Type for a CompositeData representing a service.static final TabularTypeThe Tabular Type for a Service table.static final StringThe key USING_BUNDLES, used inUSING_BUNDLES_ITEM.static final ItemThe item containing the bundles using the service inSERVICE_TYPE. -
Method Summary
Modifier and TypeMethodDescriptionlonggetBundleIdentifier(long serviceId) Answer the bundle identifier of the bundle which registered the serviceString[]getObjectClass(long serviceId) Answer the list of interfaces that this service implementsgetProperties(long serviceId) Answer the map of properties associated with this servicegetProperty(long serviceId, String key) getService(long serviceId) long[]long[]getUsingBundles(long serviceId) Answer the list of identifiers of the bundles that use the serviceAnswer the service state of the system in tabular form.listServices(String clazz, String filter) listServices(String clazz, String filter, String... serviceTypeItems)
-
Field Details
-
OBJECTNAME
The fully qualified object name of this mbean.- See Also:
-
BUNDLE_IDENTIFIER
The key BUNDLE_IDENTIFIER, used inBUNDLE_IDENTIFIER_ITEM.- See Also:
-
BUNDLE_IDENTIFIER_ITEM
The item containing the bundle identifier inSERVICE_TYPE. The key isBUNDLE_IDENTIFIERand the type isSimpleType.LONG. -
OBJECT_CLASS
The key OBJECT_CLASS, usedOBJECT_CLASS_ITEM.- See Also:
-
OBJECT_CLASS_ITEM
The item containing the interfaces of the service inSERVICE_TYPE. The key isOBJECT_CLASSand the type isJmxConstants.STRING_ARRAY_TYPE. -
IDENTIFIER
The key IDENTIFIER, usedIDENTIFIER_ITEM.- See Also:
-
IDENTIFIER_ITEM
The item containing the service identifier inSERVICE_TYPE. The key isIDENTIFIERand the type isSimpleType.LONG. -
PROPERTIES
The key PROPERTIES, used inPROPERTIES_ITEM.- See Also:
-
PROPERTIES_ITEM
The item containing service properties inSERVICE_TYPE. The key isPROPERTIESand the type isJmxConstants.PROPERTIES_TYPE. -
USING_BUNDLES
The key USING_BUNDLES, used inUSING_BUNDLES_ITEM.- See Also:
-
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
The Composite Type for a CompositeData representing a service. This type consists of: -
SERVICES_TYPE
The Tabular Type for a Service table. The rows consists ofSERVICE_TYPEComposite Data and the index isIDENTIFIER. -
BUNDLE_LOCATION
The key BUNDLE_LOCATION, used inSERVICE_EVENT_TYPE.- See Also:
-
BUNDLE_LOCATION_ITEM
The item containing the bundle location inEVENT_ITEM. The key isBUNDLE_LOCATIONand the the type isSimpleType.STRING. -
BUNDLE_SYMBOLIC_NAME
The key BUNDLE_SYMBOLIC_NAME, used inSERVICE_EVENT_TYPE.- See Also:
-
BUNDLE_SYMBOLIC_NAME_ITEM
The item containing the symbolic name inEVENT. The key isBUNDLE_SYMBOLIC_NAMEand the the type isSimpleType.STRING. -
EVENT
The key EVENT, used inEVENT_ITEM.- See Also:
-
EVENT_ITEM
The item containing the event type. The key isEVENTand the type isSimpleType.INTEGER -
SERVICE_EVENT_TYPE
The Composite Type that represents a service event. This composite consists of:
-
-
Method Details
-
getObjectClass
Answer the list of interfaces that this service implements- Parameters:
serviceId- the identifier of the service- Returns:
- the list of interfaces
- Throws:
IOException- if the operation failsIllegalArgumentException- if the service indicated does not exist
-
getBundleIdentifier
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:
IOException- if the operation failsIllegalArgumentException- if the service indicated does not exist
-
getService
- Throws:
IOException
-
getProperties
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.Constantsinterface - Throws:
IOException- if the operation failsIllegalArgumentException- if the service indicated does not exist- See Also:
-
getProperty
- Throws:
IOException
-
getServiceIds
- Throws:
IOException
-
listServices
Answer the service state of the system in tabular form.- Returns:
- the tabular representation of the service state
- Throws:
IOException- If the operation failsIllegalArgumentException- if the service indicated does not exist- See Also:
-
listServices
- Throws:
IOException
-
listServices
TabularData listServices(String clazz, String filter, String... serviceTypeItems) throws IOException - Throws:
IOException
-
getUsingBundles
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:
IOException- if the operation failsIllegalArgumentException- if the service indicated does not exist
-