public interface ServiceStateMBean
Modifier and Type | Field and Description |
---|---|
static String |
BUNDLE_IDENTIFIER
The key BUNDLE_IDENTIFIER, used in
BUNDLE_IDENTIFIER_ITEM . |
static Item |
BUNDLE_IDENTIFIER_ITEM
The item containing the bundle identifier in
SERVICE_TYPE . |
static String |
BUNDLE_LOCATION
The key BUNDLE_LOCATION, used in
SERVICE_EVENT_TYPE . |
static Item |
BUNDLE_LOCATION_ITEM
The item containing the bundle location in
EVENT_ITEM . |
static String |
BUNDLE_SYMBOLIC_NAME
The key BUNDLE_SYMBOLIC_NAME, used in
SERVICE_EVENT_TYPE . |
static Item |
BUNDLE_SYMBOLIC_NAME_ITEM
The item containing the symbolic name in
EVENT . |
static String |
EVENT
The key EVENT, used in
EVENT_ITEM . |
static Item |
EVENT_ITEM
The item containing the event type.
|
static String |
IDENTIFIER
The key IDENTIFIER, used
IDENTIFIER_ITEM . |
static Item |
IDENTIFIER_ITEM
The item containing the service identifier in
SERVICE_TYPE . |
static String |
OBJECT_CLASS
The key OBJECT_CLASS, used
OBJECT_CLASS_ITEM . |
static Item |
OBJECT_CLASS_ITEM
The item containing the interfaces of the service in
SERVICE_TYPE . |
static String |
OBJECTNAME
The Object Name prefix for this mbean.
|
static String |
PROPERTIES
The key PROPERTIES, used in
PROPERTIES_ITEM . |
static Item |
PROPERTIES_ITEM
The item containing service properties in
SERVICE_TYPE . |
static CompositeType |
SERVICE_EVENT_TYPE
The Composite Type that represents a service event.
|
static CompositeType |
SERVICE_TYPE
The Composite Type for a CompositeData representing a service.
|
static TabularType |
SERVICES_TYPE
The Tabular Type for a Service table.
|
static String |
USING_BUNDLES
The key USING_BUNDLES, used in
USING_BUNDLES_ITEM . |
static Item |
USING_BUNDLES_ITEM
The item containing the bundles using the service in
SERVICE_TYPE . |
Modifier and Type | Method and Description |
---|---|
long |
getBundleIdentifier(long serviceId)
Answer the bundle identifier of the bundle which registered the service
|
String[] |
getObjectClass(long serviceId)
Answer the list of interfaces that this service implements
|
TabularData |
getProperties(long serviceId)
Answer the map of properties associated with this service.
|
CompositeData |
getProperty(long serviceId,
String key)
Return a single property from the specified service.
|
CompositeData |
getService(long serviceId)
Obtain information about a given service.
|
long[] |
getServiceIds()
List all service IDs in the framework.
|
long[] |
getUsingBundles(long serviceId)
Answer the list of identifiers of the bundles that use the service
|
TabularData |
listServices()
Answer the service state of the system in tabular form.
|
TabularData |
listServices(String clazz,
String filter)
Answer the service state of the system in tabular form.
|
TabularData |
listServices(String clazz,
String filter,
String... serviceTypeItems)
Answer the service state of the system in tabular form.
|
static final String OBJECTNAME
static final String BUNDLE_IDENTIFIER
BUNDLE_IDENTIFIER_ITEM
.static final Item BUNDLE_IDENTIFIER_ITEM
SERVICE_TYPE
. The
key is BUNDLE_IDENTIFIER
and the type is SimpleType.LONG
.static final String OBJECT_CLASS
OBJECT_CLASS_ITEM
.static final Item OBJECT_CLASS_ITEM
SERVICE_TYPE
. The key is OBJECT_CLASS
and the type is
JmxConstants.STRING_ARRAY_TYPE
.static final String IDENTIFIER
IDENTIFIER_ITEM
.static final Item IDENTIFIER_ITEM
SERVICE_TYPE
. The
key is IDENTIFIER
and the type is SimpleType.LONG
.static final String PROPERTIES
PROPERTIES_ITEM
.static final Item PROPERTIES_ITEM
SERVICE_TYPE
. The key
is PROPERTIES
and the type is
JmxConstants.PROPERTIES_TYPE
.static final String USING_BUNDLES
USING_BUNDLES_ITEM
.static final Item USING_BUNDLES_ITEM
SERVICE_TYPE
. The key is USING_BUNDLES
and the type is
JmxConstants.LONG_ARRAY_TYPE
.static final CompositeType SERVICE_TYPE
static final TabularType SERVICES_TYPE
SERVICE_TYPE
Composite Data and the index is IDENTIFIER
.static final String BUNDLE_LOCATION
SERVICE_EVENT_TYPE
.static final Item BUNDLE_LOCATION_ITEM
EVENT_ITEM
. The key
is BUNDLE_LOCATION
and the the type is SimpleType.STRING
.static final String BUNDLE_SYMBOLIC_NAME
SERVICE_EVENT_TYPE
.static final Item BUNDLE_SYMBOLIC_NAME_ITEM
EVENT
. The key is
BUNDLE_SYMBOLIC_NAME
and the the type is
SimpleType.STRING
.static final String EVENT
EVENT_ITEM
.static final Item EVENT_ITEM
EVENT
and the
type is SimpleType.INTEGER
static final CompositeType SERVICE_EVENT_TYPE
String[] getObjectClass(long serviceId) throws IOException
serviceId
- the identifier of the serviceIOException
- if the operation failsIllegalArgumentException
- if the service indicated does not existlong getBundleIdentifier(long serviceId) throws IOException
serviceId
- the identifier of the serviceIOException
- if the operation failsIllegalArgumentException
- if the service indicated does not existCompositeData getService(long serviceId) throws IOException
SERVICE_TYPE
.serviceId
- the ID of the service to look upIOException
- if the operation failsIllegalArgumentException
- if the service indicated does not existTabularData getProperties(long serviceId) throws IOException
serviceId
- the identifier of the serviceorg.osgi.framework.Constants
interfaceIOException
- if the operation failsIllegalArgumentException
- if the service indicated does not existfor the details of the TabularType
CompositeData getProperty(long serviceId, String key) throws IOException
serviceId
- the identifier of the servicekey
- the property keyIOException
- if the operation failsfor the details of the CompositeType.
long[] getServiceIds() throws IOException
IOException
- if the operation failsTabularData listServices() throws IOException
IOException
- If the operation failsIllegalArgumentException
- if the service indicated does not existfor the details of the TabularType
TabularData listServices(String clazz, String filter) throws IOException
clazz
- The class name with which the services were registered or
null
for any class name.filter
- A filter expression to match the services or null
for no additional filter.IOException
- If the operation failsIllegalArgumentException
- if the service indicated does not existfor the details of the TabularType
TabularData listServices(String clazz, String filter, String... serviceTypeItems) throws IOException
SERVICE_TYPE
items to be included in the result. Selecting only
the relevant Service Type items may save bandwidth and improve
performance over a remote connection.clazz
- The class name with which the services were registered or
null
for any class name.filter
- A filter expression to match the services or null
for no additional filter.serviceTypeItems
- The names of the SERVICE_TYPE
items to
include in the result. For example "objectClass" or "Properties".
Note that the result always returns the "Identifier" item since
this serves as the key in the resulting table.IOException
- If the operation failsIllegalArgumentException
- if the service indicated does not existfor the details of the TabularType
long[] getUsingBundles(long serviceId) throws IOException
serviceId
- the identifier of the serviceIOException
- if the operation failsIllegalArgumentException
- if the service indicated does not existCopyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0