124 Management Model Specification for JMX™ Technology

124.1 Introduction

The Java Management Extensions (JMX) is the standard API specification for providing a management interface to Java SE and Java EE applications. The JMX specification defines the design patterns, APIs, services and architecture for application management, network management and monitoring in the Java programming language. The need to administer, monitor and manage a container is today recognized as a prerequisite in the enterprise software domain.

While OSGi defines a rich API for controlling all aspects of the framework, this API is not suitable for direct usage in the JMX framework because it was not designed to be remoted. This specification provides an interface adaptation of the existing OSGi framework, which can be used to expose an OSGi Framework manipulation API to any JMX compliant implementation. Interfaces and system semantics for a monitoring system are specified for exposing the underlying artifacts of the OSGi framework such as services and bundles. Additionally, the management of a number of core and compendium services have been standardized in this document.

Finally, a standardized JMX object naming standard is proposed so that management objects are uniformly named across implementations such that any JMX compliant system can find, manipulate and interact with the framework and artifacts that it manages.

This specification requires version 1.2 or later of JMX, which implies the use of Java 5.

124.1.1 Essentials

  • Life Cycle - Must allow support of full life cycle management of bundles.

  • Batch - Support batch oriented operations to minimize the influence of network capacity and latency.

  • Compatible - This specification must work naturally with JMX.

  • Efficient - Minimize the number of registered objects to not overload the MBean Server and communication channels.

  • Open MBean - Support the Open MBean layer of JMX instead of using domain specific objects.

  • Core - Supports all the Framework's operations.

  • Core Services - Support the framework services if registered, except for Conditional Permission Admin.

124.1.2 Entities

  • MBean - A Managed Bean. The core concept of JMX to manage an entity.

  • MBean Server - The MBean Server is the access point for registering MBeans.

  • Manager - The entity that implements the MBeans and registers them with the registered MBean servers.

  • Object Name - A name for an MBean registered with an MBean Server.

  • Bundle State MBean - Provides central access to the state of a bundle in a framework.

  • Framework MBean - Represents the general framework's state and can be used to manage the life cycle of bundles.

  • Bundle Wiring State MBean - Provides access to the wiring state of the framework.

  • Service State MBean - Provides access to the service information in the service registry. It provides both a general MBean interface as well as an Open Type description.

  • Configuration Admin MBean - Can be used to manipulate a Configuration Admin service.

  • Permission Admin MBean - Provides access to the Permission Admin service.

  • Provisioning Service MBean - Provides access to the Provisioning Service.

  • User Admin MBean - Provides access to the User Admin service.

  • Item - A helper class to create Open Types. This class is intended to make the Javadoc easier to navigate and keep definitions close together. This is otherwise hard to do with Open Type. This class has no utility for management applications.

  • Open Type - A JMX metadata standard to describe MBeans.

  • Remote Manager - The entity accessing a MBean Server remotely.

  • JConsole - The default Java Remote Manager.

Figure 124.1 MBeans

MBeans

124.1.3 Synopsis

This specification plays a part in both the OSGi framework as well as in a remote manager.

A JMX OSGi manager bundle obtains one or more MBean servers that are registered as services. The JMX OSGi manager then registers all its managed beans: Framework MBean, Bundle State MBean, Package State MBean, and the Service State MBean under their JMX object names. If a number of optional services are registered, then the JMX OSGi bundle must also register a corresponding MBean with the MBean server for each of the services that it can obtain.

A remote manager can access an MBean Server running in a (remote) VM. The remote manager can then discover any MBeans. These MBeans can be manipulated as dynamic types or as specific types as outlined in this specification.

124.2 JMX Overview

JMX is a specification which defines how arbitrary remote communication protocols and mechanisms can be adapted to interact with the underlying management APIs exposed by JMX compliant implementations. JMX is not a remote communication standard, the actual protocols can vary. The JMX architecture is composed of three levels:

  • Instrumentation - The managed resources of the system are instrumented using managed beans (a.k.a. MBeans) which expose their management interfaces through a JMX agent for remote management and monitoring.

  • Agent - The JMX agent layer is mainly represented by the MBean server. This is the managed object server where the MBeans are registered. The JMX agent includes a set of functions for manipulating the registered MBeans, which directly expose and control the underlying resources, and then make them available to remote managers.

  • Remote Manager - The remote management layer provides the specification for the actual remote communication protocol adapters and defines standard connectors which make the JMX agent accessible to remote managers outside of the Java process that hosts the agent.

The JMX Architecture is depicted in Figure 124.2.

Figure 124.2 JMX Architecture

JMX Architecture

124.2.1 Connectors and Adapters

Connectors are used to connect an agent with a remote JMX-enabled managers. This form of communication involves a connector in the JMX agent and a connector client in the management application. Protocol adapters provide a management view of the JMX agent through a given protocol.

Remote managers that connect to a protocol adapter are usually specific to the given protocol. Remote Managers can be generic consoles (such as JConsole; see [8] Using JConsole to Monitor Applications), or domain-specific monitoring applications. External applications can interact with the MBeans through the use of JMX connectors and protocol adapters.

124.2.2 Object Name

All managed objects in JMX are referenced via JMX Object Names. Object Names are strings which can be resolved within the context of a JMX MBean Server in order. An Object Name consists of two parts:

ObjectName  ::= domain ':' properties
properties  ::= property ( ',' property )*

To avoid collisions between MBeans supplied by different vendors, a recommended convention is to begin the domain name with the reverse DNS name of the organization that specifies the MBeans, followed by a full stop ('.' \u002E) and a string whose interpretation is determined by that organization.

MBeans specified by the OSGi Alliance have domains that start with osgi.

124.2.3 MBeans

Any object can be registered with an MBean Server and manipulated remotely over an MBean Server Connection. An MBean Server Connection can represent the a local MBean Server or a remote MBean Server. An MBean is always identified by an Object Name. The Object Name identifies a remote MBean uniquely within a specific MBean Server Connection.

Standard manipulations of a remote MBean are done through attributes and operations, which are similar to properties and methods for Java beans. Not all methods on the implementation class can be used, the registering party must specifically provide access to the methods that can be called remotely. The registrar can define the exposed operations with the following mechanisms:

  • Design Pattern - Let the registered object implement an MBean interface that has the fully qualified name of the implementation class suffixed with MBean. The MBean server will then limit access to attributes and properties defined in the MBean interface. For example, the com.acme.Resource class should implement the com.acme.ResourceMBean interface. The com.acme.ResourceMBean interface would define the properties and operations.

  • Dynamic MBean - Register a Dynamic MBean, which handles the access to the operations and attributes programmatically. The JMX specification provides the DynamicMBean interface for this purpose. If the MBean registered with an MBean Server implements this interface, then the MBean Server must get the MBean's metadata through the DynamicMBean interface instead of using reflection. Therefore, Dynamic MBeans can provide more rich metadata that describes their operations and attributes.

  • Standard MBean - Register a Standard MBean. A standard MBean works the same as the previous bullet but does not require the implementation class name to map to the MBean interface name.

Attributes map to properties on the registered MBean interface and operations allow the invocation of an arbitrary method on the remote MBean with arbitrary parameters. The following code example shows how to get a the size property of a remote MBean in this way:

void drop( MBeanServerConnection mbs, ObjectNameobjectName) {
  Integer sizeI = (Integer) 
        mbs.getAttribute(objectName, "Size");
  int size = sizeI.intValue();
  if (size > desiredSize) {
    mbs.invoke(objectName,"dropOldest",
        new Integer[] {new Integer(size - desiredSize)},
        new String[] {"int"});
  }
}

In release 1.2 the JMX specification introduced the MBean Server Invocation Handler to simplify the manipulation of the remote MBeans by creating a proxy for an MBean interface that implements all the relevant methods. An MBean interface defines the methods and properties for an MBean. The proxy has a reference to an MBean Server Connection, it can therefore automate the invocation of the appropriate methods from the MBean interface. Therefore, by using an MBean interface, it is possible to simplify the remote manager:

MBeanServer mbs = ...;
CacheControlMBean cacheControl = (CacheControlMBean)
 MbeanServerInvocationHandler.newProxyInstance(
    mbs, objectName, CacheControlMBean.class, false);

int size = cacheControl.getSize();
if (size > desiredSize)
  cacheControl.dropOldest(size - desiredSize);

The creation of the proxy is somewhat verbose, but once it is available, the MBean can be accessed like a local object. The proxy is much easier to use and read, and much less error-prone, than accessing the MBean Server method through invoking operations and getting attributes.

The MBean interface can also ensure a certain amount of type safety. The MBean implementation can implement the MBean interface and the remote manager uses the proxy implementing this interface. However, neither is required. The MBean can directly implement the methods without implementing the interface and the remote manager can directly manipulate the attributes and invocations.

The key advantage is therefore the documentation of the management interface. Using an MBean interface, this can be done very concisely and it allows the usage of standard tools for Java source code and Javadoc.

124.2.4 Open Types

The distributed nature of remote management poses a number of problems for exchanging general objects.

  • Versioning - All participating parties require access to the same version of the object's class.

  • Serialization - Not all objects are easy to serialize.

  • Size - Arbitrary objects can transitively link to large amounts of data.

  • Descriptive - Classes provide little or no support for editing.

  • Limited - Classes are Java specific, making it harder to interact with non-Java environments.

An alternative is to limit the management types to be exchanged to small, well defined set. Open MBeans limit the used data types to small number of types called the basic types. These types are supported by all JMX 1.2 and later implementations. This basic set of types contains:

  • Primitives - boolean, byte, char, short, int, long, float, double.

  • Primitive Arrays - boolean[], byte[], char[], short[], int[], long[], float[], double[].

  • Wrappers - Boolean, Byte, Character, Short, Integer, Long, Float, Double.

  • Scalars - String, BigDecimal, BigInteger, Date, ObjectName.

  • Complex - CompositeData, TabularData, and complex arrays.

  • Return - Void, operation return only.

The Complex types are unique to JMX, they are used to provide access to complex data (like objects) without using classes. The complex types are self describing. The metadata associated with these complex types allow a remote manager to discover the structure and automatically construct a (graphic) user interface for these complex objects.

Open MBeans must be Dynamic MBeans when registered. Furthermore, they must provide Open MBean variations of the Info objects that describe the operations and attributes.

124.3 OSGi JMX Management

The OSGi JMX Management model is based on Open MBeans, see Open Types. This specification declares a number of MBeans for the core Framework, some of the core services, and a number of compendium services. Though Open MBeans are based on Dynamic MBeans, this specification uses the traditional MBean interface to define the management interaction patterns. The implementer of this specification must register an implementation of these interfaces as a Dynamic MBean. An implementation should provide the additional Open MBeans Info objects for the operations and attributes.

This specification defines the following Open MBeans:

  • Core Framework - FrameworkMBean, BundleStateMBean, ServiceStateMBean, BundleWiringStateMBean, and PackageStateMBean.

  • Core Services - PermissionAdminMBean. The Conditional Permission Admin is not included in this specification.

  • Compendium Services - ConfigurationAdminMBean, UserAdminMBean, ProvisioningServiceMBean

124.3.1 Naming

The MBean interfaces have been named after the service they manage. That is the ConfigurationAdminMBean interface manages the Configuration Admin service, which is modelled with the ConfigurationAdmin interface.

Package names are constructed from taking the corresponding resource package and inserting jmx. after org.osgi. For example

org.osgi.framework          org.osgi.jmx.framework
org.osgi.service.cm         org.osgi.jmx.service.cm

It is not possible to use the MBean interface design pattern because the MBean interfaces are in OSGi packages. The design pattern requires the fully qualified name of the implementation suffixed with MBean to match the MBean interface name. This would require that the implementation class resides in an OSGi package, which would extend these packages.

However, the StandardMBean class allows the association of one of the OSGi MBean interfaces with an arbitrary class.

124.3.2 Object Naming

Object Names for OSGi managed MBeans must follow the following structure:

object-name    ::= ( core | compendium ) 
                    ',version=' version 
                    ',framework=' framework
                    ',uuid=' uuid
                   (',' key '=' value )*
core           ::= 'osgi.core:' framework-type
compendium     ::= 'osgi.compendium:' service-type
framework-type ::= ( 'type=' token ) | service-type
service-type   ::= 'service=' token
framework      ::= <Bundle symbolic name of the system bundle>
uuid           ::= <org.osgi.framework.uuid Framework property'svalue>
key            ::= <any jmx supported key>
value          ::= <any jmx supported value>

There are the following additional constraints:

  • Spaces - Spaces between any of the terminals are not permitted.

  • Version - The version must be limited to a major and minor version part. The given version must identify the package of the corresponding resource. For example, if the Configuration Admin service is on version 1.3.2.200910101250, then the version in the Object Name must be 1.3.

  • Service - The service-type should use the package name of the corresponding service. For example, for Configuration Admin this would be service=cm.

The Object Name must contain the framework bundle symbolic name and its UUID so that multiple instances on the same VM can be discriminated. An example of an Object Name is:

osgi.core:type=framework,version=1.7,framework=org.apache.felix.framework, «
    uuid=f81d4fae-7dec-11d0-a765-00a0c91e6bf6

The advantage of the framework property is that it can be used to simplify the querying for the MBeans using Object Name patterns. Patterns are names have an asterisk ('*' \u002A). For instance, the following query allows a client to find all Framework MBeans for an Apache Felix implementation without having to rely on knowing the UUID:

ObjectName on = new ObjectName(
    "osgi.core:type=framework,"
    +   "version=1.7,framework=org.apache.felix.framework,*");
Set<ObjectInstance> instances = mserver.queryMBeans(on,null);

Furthermore, in many cases, a JMX client may appropriately assume that only a single instance of the OSGi framework exists in the managed system, as in the following example:

ObjectName on = new ObjectName("osgi.core:type=framework,version=1.7,*");
Set<ObjectInstance> instances = mserver.queryMBeans(on,null);

The uuid and framework property keys are only applicable to OSGi JMX Management Model Specification Version 1.1 and above.

To maintain backward compatibility, a OSGi JMX Framework package Version 1.7 may register the first instantiation of an OSGi framework using both the Version 1.0 Object Names as well as the Object Names outlined in this specification. In other words, a JMX client may not specify the uuid and/or framework properties, and still retrieve the MBeans for a OSGi framework instance.

The actual object name prefixes are defined in the MBean interfaces. For example, the Object Name for the Configuration Admin MBean is:

osgi.compendium:service=cm,version=1.3

It is the responsibility of the party registering the MBean to suffix this with the framework and UUID.

In this specification, all management interfaces are specified to return opaque Strings or longs rather than Object Names so that the MBean interfaces contain no JMX specific artifacts and can be used with a variety of remote access protocols such as SNMP, etc. Non JMX use of these APIs can use these Strings as their own opaque identifiers without any change to the interfaces themselves.

124.3.3 The MBean Server

An implementation of this specification must find all MBean Servers services that it has access to. It should then register all MBeans with each server found in the service registry.

A compliant implementation must register all the framework's MBeans: FrameworkMBean, BundleStateMBean, ServiceStateMBean, BundleWiringStateMBean and PackageStateMBean. The registration of the compendium services is optional. However, if they are registered they must implement the behavior as defined in this specification.

124.3.4 Registrations

The OSGi MBeans are designed to minimize the notifications. That is, the objects model a command interface to access the required information. Their registration is not intended to signify anything else than the start of the manager bundle and the availability of the underlying resource.

Implementations must always register only one of each of the Framework MBean types (Framework MBean, Service State MBean, Bundle State MBean, Wiring State MBean, and Package State MBean). All other MBean types depend on the registered services they manage. Each service requires its unique MBean. If no corresponding service is present, then no MBean should be registered. Modified events must be ignored. If a manager supports a specific OSGi MBean for a compendium service then it must register an MBean for each instance of that service.

124.4 MBeans

This specification defines MBean interfaces listed in the following table. The Object Name specified in this table is broken into a number of lines for readability, however, newlines and whitespace is not allowed in the Object Name.

Table 124.1 MBeans

MBean Object Name Description

FrameworkMBean

osgi.core:

type=framework,

version=1.7

Provides access to bundle life cycle methods of the framework including batch install and update operations.

BundleStateMBean

osgi.core:

type=bundleState,

version=1.7

Provides detailed access to the state of one bundle and aggregated state of a group of bundles.

ServiceStateMBean

osgi.core:

type=serviceState,

version=1.7

Provides detailed access to the state of one service and aggregated state of a group of services.

PackageStateMBean

osgi.core:

type=packageState,

version=1.5

Provides detailed access to the state of one package and aggregated state of a group of packages.

PermissionAdminMBean

osgi.core:

service=permissionadmin,

version=1.2

Based on the Permission Admin service.

ConfigurationAdminMBean

osgi.compendium:

service=cm,

version=1.3

Manages a Configuration Admin service.

ProvisioningServiceMBean

osgi.compendium:

service=provisioning,

version=1.2

Manages a Provisioning Service.

UserAdminMBean

osgi.compendium:

service=useradmin,

version=1.1

Manages a User Admin service.

BundleWiringStateMBean

osgi.core:

service=wiringState,

version=1.1

Reflects the Framework's wiring state.


124.5 Item

The MBean interfaces do not only define the Java interface, they also define the Open Types. These types are defined with the Item class in this specification to simplify the definitions; the Item class has no role in a management application. The Item class is used to allow the items used in Composite Types to be encoded in the interface. This is not possible with the standard Open Types because they use exceptions and use parallel arrays. For example, the following code defines a static Open Type without the Item class:

static CompositeType HEADER;
static {
   try {
     HEADER = new CompositeType( "HEADER" "This is a header", 
        new String[] {"KEY", "VALUE"},
        new String[] {"A key for a header", "A value for a header"},
        new OpenType[] { SimpleType.STRING, SimpleType.STRING });
   catch(OpenDataException e) {
     ...
   }
}

This code can be replaced with the Item class:

static Item KEY = new Item("KEY", "A key forheader", SimpleType.STRING );
static Item VALUE = new Item("VALUE", "A value for header",SimpleType.STRING );
static CompositeType HEADER = Item.composite( "HEADER", "Thisis a header",
    KEY, VALUE );

The Item class also provides a number of convenience methods to construct the different Open Types. However, the intention is to simplify the specification definitions, not as an aid in management operations.

124.6 Security

Exposing any system remotely opens up a, potentially, devastating security hole in a system. Remote entities should establish their identity and the management system should be able to control the access these entities have over the management system. JMX seamlessly inter operates with the Java Authentication and Authorization Service (JAAS) and Java 2 platform Standard Edition (Java SE) Security Architecture.

The JMX OSGi manager must have access to the services it manages and the operations it invokes. It is likely that this bundle requires All Permission because it needs to invoke operations on the Conditional Permission Admin. It is strongly advised that implementations limit the set of available permissions based on authenticating the remote manager.

124.7 org.osgi.jmx

Version 1.1

OSGi JMX Package Version 1.1.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.jmx; version="[1.1,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.jmx; version="[1.1,1.2)"

124.7.1 Summary

  • Item - The item class enables the definition of open types in the appropriate interfaces.

  • JmxConstants - Constants for OSGi JMX Specification.

124.7.2 public class Item

The item class enables the definition of open types in the appropriate interfaces. This class contains a number of methods that make it possible to create open types for CompositeType, TabularType, and ArrayType. The normal creation throws a checked exception, making it impossible to use them in a static initializer. The constructors are also not very suitable for static construction. An Item instance describes an item in a Composite Type. It groups the triplet of name, description, and Open Type. These Item instances allows the definitions of an item to stay together.

Immutable

124.7.2.1 public Item(String name, String description, OpenType type, String... restrictions)

The name of the item.

The description of the item.

The Open Type of this item.

Ignored, contains list of restrictions

Create a triple of name, description, and type. This triplet is used in the creation of a Composite Type.

124.7.2.2 public static ArrayType arrayType(int dim, OpenType elementType)

The dimension

The element type

Return a new Array Type.

A new Array Type

124.7.2.3 public static CompositeType compositeType(String name, String description, Item... items)

The name of the Tabular Type.

The description of the Tabular Type.

The items that describe the composite type.

Create a Composite Type

a new Composite Type

RuntimeException– when the Tabular Type throws an OpenDataException

124.7.2.4 public static CompositeType extend(CompositeType parent, String name, String description, Item... items)

The parent type, can be null

The name of the type

The description of the type

The items that should be added/override to the parent type

Extend a Composite Type by adding new items. Items can override items in the parent type.

A new Composite Type that extends the parent type

RuntimeException– when an OpenDataException is thrown

124.7.2.5 public static TabularType tabularType(String name, String description, CompositeType rowType, String... index)

The name of the Tabular Type.

The description of the Tabular Type.

The Open Type for a row

The names of the items that form the index .

Create a Tabular Type.

A new Tabular Type composed from the parameters.

RuntimeException– when the Tabular Type throws an OpenDataException

124.7.3 public class JmxConstants

Constants for OSGi JMX Specification. Additionally, this class contains a number of utility types that are used in different places in the specification. These are LONG_ARRAY_TYPE, STRING_ARRAY_TYPE, and PROPERTIES_TYPE.

Immutable

124.7.3.1 public static final String ARRAY_OF = "Array of "

For an encoded array we need to start with ARRAY_OF. This must be followed by one of the names in SCALAR.

124.7.3.2 public static final String BIGDECIMAL = "BigDecimal"

Value for PROPERTY_TYPE value in the case of java.math.BigDecimal

124.7.3.3 public static final String BIGINTEGER = "BigInteger"

Value for PROPERTY_TYPE value in the case of java.math.BigInteger

124.7.3.4 public static final String BOOLEAN = "Boolean"

Value for PROPERTY_TYPE value in the case of java.lang.Boolean

124.7.3.5 public static final String BYTE = "Byte"

Value for PROPERTY_TYPE value in the case of java.lang.Byte

124.7.3.6 public static final String CHARACTER = "Character"

Value for PROPERTY_TYPE value in the case of java.lang.Character

124.7.3.7 public static final String DOUBLE = "Double"

Value for PROPERTY_TYPE value in the case of java.lang.Double

124.7.3.8 public static final String FLOAT = "Float"

Value for PROPERTY_TYPE value in the case of java.lang.Float

124.7.3.9 public static final String INTEGER = "Integer"

Value for PROPERTY_TYPE value in the case of java.lang.Integer

124.7.3.10 public static final String KEY = "Key"

The key KEY.

124.7.3.11 public static final Item KEY_ITEM

The key of a property. The key is KEY and the type is SimpleType.STRING.

124.7.3.12 public static final String LONG = "Long"

Value for PROPERTY_TYPE value in the case of java.lang.Long

124.7.3.13 public static final ArrayType LONG_ARRAY_TYPE

The MBean Open type for an array of longs

124.7.3.14 public static final String OSGI_COMPENDIUM = "osgi.compendium"

The domain name of the selected OSGi compendium MBeans

124.7.3.15 public static final String OSGI_CORE = "osgi.core"

The domain name of the core OSGi MBeans

124.7.3.16 public static final String P_BOOLEAN = "boolean"

Value for PROPERTY_TYPE value in the case of the boolean primitive type.

124.7.3.17 public static final String P_BYTE = "byte"

Value for PROPERTY_TYPE value in the case of the byte primitive type.

124.7.3.18 public static final String P_CHAR = "char"

Value for PROPERTY_TYPE value in the case of the char primitive type.

124.7.3.19 public static final String P_DOUBLE = "double"

Value for PROPERTY_TYPE value in the case of the double primitive type.

124.7.3.20 public static final String P_FLOAT = "float"

Value for PROPERTY_TYPE value in the case of the float primitive type.

124.7.3.21 public static final String P_INT = "int"

Value for PROPERTY_TYPE value in the case of the int primitive type.

124.7.3.22 public static final String P_LONG = "long"

Value for PROPERTY_TYPE value in the case of the long primitive type.

124.7.3.23 public static final String P_SHORT = "short"

Value for PROPERTY_TYPE value in the case of the short primitive type.

124.7.3.24 public static final TabularType PROPERTIES_TYPE

Describes a map with properties. The row type is PROPERTY_TYPE. The index is defined to the KEY of the property.

124.7.3.25 public static final CompositeType PROPERTY_TYPE

A Composite Type describing a a single property. A property consists of the following items KEY_ITEM, VALUE_ITEM, and TYPE_ITEM.

124.7.3.26 public static final List<String> SCALAR

A set of all scalars that can be used in the TYPE property of a PROPERTIES_TYPE. This contains the following names:

124.7.3.27 public static final String SHORT = "Short"

Value for PROPERTY_TYPE value in the case of java.lang.Short

124.7.3.28 public static final String STRING = "String"

Value for PROPERTY_TYPE value in the case of java.lang.String

124.7.3.29 public static final ArrayType STRING_ARRAY_TYPE

The MBean Open type for an array of strings

124.7.3.30 public static final String TYPE = "Type"

The key TYPE.

124.7.3.31 public static final Item TYPE_ITEM

The type of the property. The key is TYPE and the type is SimpleType.STRING. This string must follow the following syntax:

 type      ::= scalar | vector | array
 vector    ::= 'Vector of' scalar
 array     ::= 'Array of' (scalar | primitive)
 scalar    ::= 'String' | 'BigInteger' | 'BigDecimal'
              | 'Byte' | 'Character' | 'Short'
              | 'Integer' | 'Long' | 'Float'
              | 'Double' | 'Version'
 primitive ::= 'byte' | 'char' | 'short'
              | 'int' | 'long' | 'float'
              | 'double'

This encoding does not support arrays in vectors or arrays. Arrays and vectors can only contain scalars. List properties are encoded as arrays. Empty lists, arrays or vectors are not represented. Null is not an allowed value.

For example, the encoding of a byte array byte[] {1,2,3,5,7} would look like:

   type:  'Array of byte'
   value: 1,2,3,5,7

Quoting can be used as follows:

   type:  'Array of String'
   value: 'abc', 'def', '\'quoted\'', "'quoted'", "\\"

124.7.3.32 public static final String VALUE = "Value"

The key VALUE.

124.7.3.33 public static final Item VALUE_ITEM

The value of a property. The key is VALUE and the type is SimpleType.STRING. A value will be encoded by the string given in TYPE. The syntax for this type is given in TYPE_ITEM.

124.7.3.34 public static final String VECTOR_OF = "Vector of "

For an encoded vector we need to start with ARRAY_OF. This must be followed by one of the names in SCALAR.

124.7.3.35 public static final String VERSION = "Version"

Value for PROPERTY_TYPE value in the case of Version

1.1

124.8 org.osgi.jmx.framework

Version 1.7

OSGi JMX Framework Package Version 1.7.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.jmx.framework; version="[1.7,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.jmx.framework; version="[1.7,1.8)"

124.8.1 Summary

124.8.2 public interface BundleStateMBean

This MBean represents the Bundle state of the framework. This MBean also emits events that clients can use to get notified of the changes in the bundle state of the framework.

Thread-safe

124.8.2.1 public static final String ACTIVATION_POLICY_USED = "ActivationPolicyUsed"

The key ACTIVATION_POLICY_USED, used in ACTIVATION_POLICY_USED_ITEM.

124.8.2.2 public static final Item ACTIVATION_POLICY_USED_ITEM

The item containing the indication whether the bundle activation policy must be used in BUNDLE_TYPE. The key is ACTIVATION_POLICY_USED and the type is SimpleType.BOOLEAN.

124.8.2.3 public static final String ACTIVE = "ACTIVE"

Constant ACTIVE for the STATE

124.8.2.4 public static final CompositeType BUNDLE_EVENT_TYPE

The Composite Type that represents a bundle event. This composite consists of:

124.8.2.6 public static final TabularType BUNDLES_TYPE

The Tabular Type for a list of bundles. The row type is BUNDLE_TYPE and the index is IDENTIFIER.

124.8.2.7 public static final String EVENT = "BundleEvent"

The key EVENT, used in EVENT_ITEM.

124.8.2.8 public static final Item EVENT_ITEM

The item containing the event type. The key is EVENT and the type is SimpleType.INTEGER

124.8.2.9 public static final String EXPORTED_PACKAGES = "ExportedPackages"

The key EXPORTED_PACKAGES, used in EXPORTED_PACKAGES_ITEM.

124.8.2.10 public static final Item EXPORTED_PACKAGES_ITEM

The item containing the exported package names in BUNDLE_TYPE .The key is EXPORTED_PACKAGES and the the type is JmxConstants.STRING_ARRAY_TYPE.

124.8.2.11 public static final String FRAGMENT = "Fragment"

The key FRAGMENT, used in FRAGMENT_ITEM.

124.8.2.12 public static final Item FRAGMENT_ITEM

The item containing the fragment status in BUNDLE_TYPE. The key is FRAGMENT and the the type is SimpleType.BOOLEAN.

124.8.2.13 public static final String FRAGMENTS = "Fragments"

The key FRAGMENTS, used in FRAGMENTS_ITEM.

124.8.2.14 public static final Item FRAGMENTS_ITEM

The item containing the list of fragments the bundle is host to in BUNDLE_TYPE. The key is FRAGMENTS and the type is JmxConstants.LONG_ARRAY_TYPE.

124.8.2.15 public static final CompositeType HEADER_TYPE

The Composite Type describing an entry in bundle headers. It consists of KEY_ITEM and VALUE_ITEM.

124.8.2.16 public static final String HEADERS = "Headers"

The key HEADERS, used in HEADERS_ITEM.

124.8.2.17 public static final Item HEADERS_ITEM

The item containing the bundle headers in BUNDLE_TYPE. The key is HEADERS and the the type is HEADERS_TYPE.

124.8.2.18 public static final TabularType HEADERS_TYPE

The Tabular Type describing the type of the Tabular Data value that is returned from getHeaders(long) method. The primary item is KEY_ITEM.

124.8.2.19 public static final String HOSTS = "Hosts"

The key HOSTS, used in HOSTS_ITEM.

124.8.2.20 public static final Item HOSTS_ITEM

The item containing the bundle identifiers representing the hosts in BUNDLE_TYPE. The key is HOSTS and the type is JmxConstants.LONG_ARRAY_TYPE

124.8.2.21 public static final String IDENTIFIER = "Identifier"

The key IDENTIFIER, used in IDENTIFIER_ITEM.

124.8.2.22 public static final Item IDENTIFIER_ITEM

The item containing the bundle identifier in BUNDLE_TYPE. The key is IDENTIFIER and the the type is SimpleType.LONG.

124.8.2.23 public static final String IMPORTED_PACKAGES = "ImportedPackages"

The key IMPORTED_PACKAGES, used in EXPORTED_PACKAGES_ITEM.

124.8.2.24 public static final Item IMPORTED_PACKAGES_ITEM

The item containing the imported package names in BUNDLE_TYPE .The key is IMPORTED_PACKAGES and the the type is JmxConstants.STRING_ARRAY_TYPE.

124.8.2.25 public static final String INSTALLED = "INSTALLED"

Constant INSTALLED for the STATE

124.8.2.26 public static final String KEY = "Key"

The key KEY, used in KEY_ITEM.

124.8.2.27 public static final Item KEY_ITEM

The item describing the key of a bundle header entry. The key is KEY and the type is SimpleType.STRING.

124.8.2.28 public static final String LAST_MODIFIED = "LastModified"

The key LAST_MODIFIED, used in LAST_MODIFIED_ITEM.

124.8.2.29 public static final Item LAST_MODIFIED_ITEM

The item containing the last modified time in the BUNDLE_TYPE. The key is LAST_MODIFIED and the the type is SimpleType.LONG.

124.8.2.30 public static final String LOCATION = "Location"

The key LOCATION, used in LOCATION_ITEM.

124.8.2.31 public static final Item LOCATION_ITEM

The item containing the bundle location in BUNDLE_TYPE. The key is LOCATION and the the type is SimpleType.STRING.

124.8.2.32 public static final String OBJECTNAME = "osgi.core:type=bundleState,version=1.7"

The Object Name prefix for this mbean. The full object name also contains the framework name and uuid as properties.

124.8.2.33 public static final String PERSISTENTLY_STARTED = "PersistentlyStarted"

The key PERSISTENTLY_STARTED, used in PERSISTENTLY_STARTED_ITEM.

124.8.2.34 public static final Item PERSISTENTLY_STARTED_ITEM

The item containing the indication of persistently started in BUNDLE_TYPE. The key is PERSISTENTLY_STARTED and the the type is SimpleType.BOOLEAN.

124.8.2.35 public static final String REGISTERED_SERVICES = "RegisteredServices"

The key REGISTERED_SERVICES, used in REGISTERED_SERVICES_ITEM.

124.8.2.36 public static final Item REGISTERED_SERVICES_ITEM

The item containing the registered services of the bundle in BUNDLE_TYPE. The key is REGISTERED_SERVICES and the the type is JmxConstants.LONG_ARRAY_TYPE.

124.8.2.37 public static final String REMOVAL_PENDING = "RemovalPending"

The key REMOVAL_PENDING, used in REMOVAL_PENDING_ITEM.

124.8.2.38 public static final Item REMOVAL_PENDING_ITEM

The item containing the indication of removal pending in BUNDLE_TYPE. The key is REMOVAL_PENDING and the type is SimpleType.BOOLEAN.

124.8.2.39 public static final String REQUIRED = "Required"

The key REQUIRED, used in REQUIRED_ITEM.

124.8.2.40 public static final String REQUIRED_BUNDLES = "RequiredBundles"

The key REQUIRED_BUNDLES, used in REQUIRED_BUNDLES_ITEM.

124.8.2.41 public static final Item REQUIRED_BUNDLES_ITEM

The item containing the required bundles in BUNDLE_TYPE. The key is REQUIRED_BUNDLES and the type is JmxConstants.LONG_ARRAY_TYPE

124.8.2.42 public static final Item REQUIRED_ITEM

The item containing the required status in BUNDLE_TYPE. The key is REQUIRED and the the type is SimpleType.BOOLEAN.

124.8.2.43 public static final String REQUIRING_BUNDLES = "RequiringBundles"

The key REQUIRING_BUNDLES, used in REQUIRING_BUNDLES_ITEM.

124.8.2.44 public static final Item REQUIRING_BUNDLES_ITEM

The item containing the bundles requiring this bundle in BUNDLE_TYPE. The key is REQUIRING_BUNDLES and the type is JmxConstants.LONG_ARRAY_TYPE

124.8.2.45 public static final String RESOLVED = "RESOLVED"

Constant RESOLVED for the STATE

124.8.2.46 public static final String SERVICES_IN_USE = "ServicesInUse"

The key SERVICES_IN_USE, used in SERVICES_IN_USE_ITEM.

124.8.2.47 public static final Item SERVICES_IN_USE_ITEM

The item containing the services in use by this bundle in BUNDLE_TYPE. The key is SERVICES_IN_USE and the the type is JmxConstants.LONG_ARRAY_TYPE.

124.8.2.48 public static final String START_LEVEL = "StartLevel"

The key START_LEVEL, used in START_LEVEL_ITEM.

124.8.2.49 public static final Item START_LEVEL_ITEM

The item containing the start level in BUNDLE_TYPE. The key is START_LEVEL and the the type is SimpleType.INTEGER.

124.8.2.50 public static final String STARTING = "STARTING"

Constant STARTING for the STATE

124.8.2.51 public static final String STATE = "State"

The key STATE, used in STATE_ITEM.

124.8.2.52 public static final Item STATE_ITEM

The item containing the bundle state in BUNDLE_TYPE. The key is STATE and the the type is SimpleType.STRING. The returned values must be one of the following strings:

124.8.2.53 public static final String STOPPING = "STOPPING"

Constant STOPPING for the STATE

124.8.2.54 public static final String SYMBOLIC_NAME = "SymbolicName"

The key SYMBOLIC_NAME, used in SYMBOLIC_NAME_ITEM.

124.8.2.55 public static final Item SYMBOLIC_NAME_ITEM

The item containing the symbolic name in BUNDLE_TYPE. The key is SYMBOLIC_NAME and the the type is SimpleType.STRING.

124.8.2.56 public static final String UNINSTALLED = "UNINSTALLED"

Constant UNINSTALLED for the STATE

124.8.2.57 public static final String UNKNOWN = "UNKNOWN"

Constant UNKNOWN for the STATE

124.8.2.58 public static final String VALUE = "Value"

The key VALUE, used in VALUE_ITEM.

124.8.2.59 public static final Item VALUE_ITEM

The item describing the value of a bundle header entry. The key is VALUE and the type is SimpleType.STRING.

124.8.2.60 public static final String VERSION = "Version"

The key VERSION, used in VERSION_ITEM.

124.8.2.61 public static final Item VERSION_ITEM

The item containing the symbolic name in BUNDLE_TYPE. The key is SYMBOLIC_NAME and the the type is SimpleType.STRING.

124.8.2.62 public CompositeData getBundle(long bundleIdentifier) throws IOException

the bundle identifier of the requested bundle

Obtain the information regarding a single bundle. The result is defined by the BUNDLE_TYPE CompositeType.

A CompositeData object with the bundle information

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.63 public long[] getBundleIds() throws IOException

List all bundle IDs in the framework.

all the bundle ids in the framework.

IOException– if the operation fails

124.8.2.64 public String[] getExportedPackages(long bundleId) throws IOException

Answer the list of exported packages for this bundle.

the array of package names, combined with their version in the format <packageName;version>

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.65 public long[] getFragments(long bundleId) throws IOException

Answer the list of the bundle ids of the fragments associated with this bundle

the array of bundle identifiers

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.66 public String getHeader(long bundleId, String key) throws IOException

the unique identifier of the bundle

the key of the header to look up

Retrieve a single header from the bundle headers.

the value of associated header

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.67 public String getHeader(long bundleId, String key, String locale) throws IOException

the unique identifier of the bundle

the key of the header to look up

the locale name into which the header value is to be localized. The value of this parameter follows the same rules as the locale parameter in Bundle.getHeaders(String locale)

Retrieve a single header from the bundle headers.

This method performs the same function as getHeaders(long bundleId) except the manifest header values are localized to the specified locale.

the value of associated header

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.68 public TabularData getHeaders(long bundleId) throws IOException

the unique identifier of the bundle

Answer the headers for the bundle uniquely identified by the bundle id. The Tabular Data is typed by the HEADERS_TYPE.

the table of associated header key and values

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.69 public TabularData getHeaders(long bundleId, String locale) throws IOException

the unique identifier of the bundle

the locale name into which the header values are to be localized. The value of this parameter follows the same rules as the locale parameter in Bundle.getHeaders(String locale)

Answer the headers for the bundle uniquely identified by the bundle id. The Tabular Data is typed by the HEADERS_TYPE.

This method performs the same function as getHeaders(long bundleId) except the manifest header values are localized to the specified locale.

the table of associated header key and values

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.70 public long[] getHosts(long fragment) throws IOException

the bundle id of the fragment

Answer the list of bundle ids of the bundles which host a fragment

the array of bundle identifiers

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.71 public String[] getImportedPackages(long bundleId) throws IOException

the bundle identifier

Answer the array of the packages imported by this bundle

the array of package names, combined with their version in the format <packageName;version>

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.72 public long getLastModified(long bundleId) throws IOException

the unique identifier of a bundle

Answer the last modified time of a bundle

the last modified time

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.73 public String getLocation(long bundleId) throws IOException

the identifier of the bundle

Answer the location of the bundle.

The location string of this bundle

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.74 public long[] getRegisteredServices(long bundleId) throws IOException

the bundle identifier

Answer the list of service identifiers representing the services this bundle exports

the list of service identifiers

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.75 public long[] getRequiredBundles(long bundleIdentifier) throws IOException

the bundle identifier to find the dependencies for

Answer an array of ids of bundles the given bundle depends on.

the bundle identifiers of the dependencies

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.76 public long[] getRequiringBundles(long bundleIdentifier) throws IOException

the bundle identifier

Answer the list of identifiers of the bundles which require this bundle

the list of bundle identifiers

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.77 public long[] getServicesInUse(long bundleIdentifier) throws IOException

the bundle identifier

Answer the list of service identifiers which refer to the the services this bundle is using

the list of service identifiers

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.78 public int getStartLevel(long bundleId) throws IOException

the identifier of the bundle

Answer the start level of the bundle

the start level

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.79 public String getState(long bundleId) throws IOException

the identifier of the bundle

Answer the symbolic name of the state of the bundle

the string name of the bundle state

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.80 public String getSymbolicName(long bundleId) throws IOException

the identifier of the bundle

Answer the symbolic name of the bundle

the symbolic name

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.81 public String getVersion(long bundleId) throws IOException

the identifier of the bundle

Answer the location of the bundle.

The location string of this bundle

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.82 public boolean isActivationPolicyUsed(long bundleId) throws IOException

the identifier of the bundle

Answer whether the specified bundle's autostart setting indicates that the activation policy declared in the bundle's manifest must be used.

true if the bundle's autostart setting indicates the activation policy declared in the manifest must be used. false if the bundle must be eagerly activated.

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.83 public boolean isFragment(long bundleId) throws IOException

the identifier of the bundle

Answer whether the bundle is a fragment or not

true if the bundle is a fragment

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.84 public boolean isPersistentlyStarted(long bundleId) throws IOException

the identifier of the bundle

Answer if the bundle is persistently started when its start level is reached

true if the bundle is persistently started

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.85 public boolean isRemovalPending(long bundleId) throws IOException

the identifier of the bundle

Answer true if the bundle is pending removal

true if the bundle is pending removal

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.86 public boolean isRequired(long bundleId) throws IOException

the identifier of the bundle

Answer true if the bundle is required by another bundle

true if the bundle is required by another bundle

IOException– if the operation fails

IllegalArgumentException– if the bundle indicated does not exist

124.8.2.87 public TabularData listBundles() throws IOException

Answer the bundle state of the system in tabular form. Each row of the returned table represents a single bundle. The Tabular Data consists of Composite Data that is type by BUNDLES_TYPE.

the tabular representation of the bundle state

IOException– if the operation fails

124.8.2.88 public TabularData listBundles(String... items) throws IOException

The names of the items to include in the result.

Answer the bundle state of the system in tabular form. Each row of the returned table represents a single bundle. The Tabular Data consists of Composite Data that is type by BUNDLES_TYPE. This method supports specifying the items that are included in the result. Note that the IDENTIFIER item is always returns as this the key in the TabularData structure.

the tabular representation of the bundle state

IOException– if the operation fails

124.8.3 public interface FrameworkMBean

The FrameworkMbean provides mechanisms to exert control over the framework. For many operations, it provides a batch mechanism to avoid excessive message passing when interacting remotely.

Thread-safe

124.8.3.1 public static final CompositeType BATCH_ACTION_RESULT_TYPE

The Composite Type for a batch action result. refreshBundle(long) and refreshBundles(long[]). Notice that a batch action result returns uses an id for the BUNDLE_IN_ERROR while the BATCH_INSTALL_RESULT_TYPE uses a location. This Composite Type consists of the following items:

124.8.3.2 public static final CompositeType BATCH_INSTALL_RESULT_TYPE

The Composite Type which represents the result of a batch install operation. It is used in installBundles(String[]) and installBundlesFromURL(String[], String[]). This Composite Type consists of the following items:

124.8.3.3 public static final CompositeType BATCH_RESOLVE_RESULT_TYPE

The Composite Type which represents the result of a batch resolve operation. It is used in refreshBundlesAndWait(long[]) and resolve(long[]). This Composite Type consists of the following items:

124.8.3.4 public static final String BUNDLE_IN_ERROR = "BundleInError"

The key for BUNDLE_IN_ERROR. This key is used with two different items: BUNDLE_IN_ERROR_ID_ITEM and BUNDLE_IN_ERROR_LOCATION_ITEM that each have a different type for this key. It is used in BATCH_ACTION_RESULT_TYPE and BATCH_INSTALL_RESULT_TYPE.

124.8.3.5 public static final Item BUNDLE_IN_ERROR_ID_ITEM

The item containing the bundle which caused the error during the batch operation. This item describes the bundle in error as an id. The key is BUNDLE_IN_ERROR and the type is SimpleType.LONG. It is used in BATCH_ACTION_RESULT_TYPE.

BUNDLE_IN_ERROR_LOCATION_ITEM for the item that has a location for the bundle in error.

124.8.3.6 public static final Item BUNDLE_IN_ERROR_LOCATION_ITEM

The item containing the bundle which caused the error during the batch operation. This item describes the bundle in error as a location. The key is BUNDLE_IN_ERROR and the type is SimpleType.STRING. It is used in BATCH_INSTALL_RESULT_TYPE.

BUNDLE_IN_ERROR_ID_ITEM for the item that has the id for the bundle in error.

124.8.3.7 public static final String COMPLETED = "Completed"

The key COMPLETED, used in COMPLETED_ITEM.

124.8.3.8 public static final Item COMPLETED_ITEM

The item containing the list of bundles completing the batch operation. The key is COMPLETED and the type is JmxConstants.LONG_ARRAY_TYPE. It is used in BATCH_ACTION_RESULT_TYPE and BATCH_INSTALL_RESULT_TYPE.

124.8.3.9 public static final String ERROR = "Error"

The key ERROR, used in ERROR_ITEM.

124.8.3.10 public static final Item ERROR_ITEM

The item containing the error message of the batch operation. The key is ERROR and the type is SimpleType.STRING. It is used in BATCH_ACTION_RESULT_TYPE and BATCH_INSTALL_RESULT_TYPE.

124.8.3.11 public static final String OBJECTNAME = "osgi.core:type=framework,version=1.7"

The Object Name prefix for this mbean. The full object name also contains the framework name and uuid as properties.

124.8.3.12 public static final String REMAINING = "Remaining"

The key REMAINING, used in REMAINING_ID_ITEM and REMAINING_LOCATION_ITEM.

124.8.3.13 public static final Item REMAINING_ID_ITEM

The item containing the list of remaining bundles unprocessed by the failing batch operation. The key is REMAINING and the type is JmxConstants.LONG_ARRAY_TYPE. It is used in BATCH_ACTION_RESULT_TYPE and BATCH_INSTALL_RESULT_TYPE.

124.8.3.14 public static final Item REMAINING_LOCATION_ITEM

The item containing the list of remaining bundles unprocessed by the failing batch operation. The key is REMAINING and the type is JmxConstants.STRING_ARRAY_TYPE. It is used in BATCH_ACTION_RESULT_TYPE and BATCH_INSTALL_RESULT_TYPE.

124.8.3.15 public static final String SUCCESS = "Success"

The SUCCESS, used in SUCCESS_ITEM.

124.8.3.16 public static final Item SUCCESS_ITEM

The item that indicates if this operation was successful. The key is SUCCESS and the type is SimpleType.BOOLEAN. It is used in BATCH_ACTION_RESULT_TYPE and BATCH_INSTALL_RESULT_TYPE.

124.8.3.17 public long[] getDependencyClosure(long[] bundles) throws IOException

The initial bundles IDs for which to generate the dependency closure.

Returns the dependency closure for the specified bundles.

A graph of bundles is computed starting with the specified bundles. The graph is expanded by adding any bundle that is either wired to a package that is currently exported by a bundle in the graph or requires a bundle in the graph. The graph is fully constructed when there is no bundle outside the graph that is wired to a bundle in the graph. The graph may contain UNINSTALLED bundles that are removal pending.

A bundle ID array containing a snapshot of the dependency closure of the specified bundles, or an empty array if there were no specified bundles.

IOException– if the operation failed

IllegalArgumentException– if a bundle indicated does not exist

124.8.3.18 public int getFrameworkStartLevel() throws IOException

Retrieve the framework start level

the framework start level

IOException– if the operation failed

124.8.3.19 public int getInitialBundleStartLevel() throws IOException

Answer the initial start level assigned to a bundle when it is first started

the start level

IOException– if the operation failed

124.8.3.20 public String getProperty(String key) throws IOException

The name of the requested property.

Returns the value of the specified property. If the key is not found in the Framework properties, the system properties are then searched. The method returns null if the property is not found.

The value of the requested property, or null if the property is undefined.

IOException– if the operation failed

124.8.3.21 public long[] getRemovalPendingBundles() throws IOException

Returns the bundles IDs that have non-current, in use bundle wirings. This is typically the bundles which have been updated or uninstalled since the last call to refreshBundles(long[]).

A bundle ID array containing a snapshot of the bundles which have non-current, in use bundle wirings, or an empty array if there are no such bundles.

IOException– if the operation failed

124.8.3.22 public long installBundle(String location) throws IOException

the location of the bundle to install

Install the bundle indicated by the bundleLocations

the bundle id the installed bundle

IOException– if the operation does not succeed

124.8.3.23 public long installBundleFromURL(String location, String url) throws IOException

the location to assign to the bundle

the URL which will supply the bytes for the bundle

Install the bundle indicated by the bundleLocations

the bundle id the installed bundle

IOException– if the operation does not succeed

124.8.3.24 public CompositeData installBundles(String[] locations) throws IOException

the array of locations of the bundles to install

Batch install the bundles indicated by the list of bundleLocationUrls

the resulting state from executing the operation

IOException– if the operation does not succeed

BATCH_INSTALL_RESULT_TYPE for the precise specification of the CompositeData type representing the returned result.

124.8.3.25 public CompositeData installBundlesFromURL(String[] locations, String[] urls) throws IOException

the array of locations to assign to the installed bundles

the array of urls which supply the bundle bytes

Batch install the bundles indicated by the list of bundleLocationUrls

the resulting state from executing the operation

IOException– if the operation does not succeed

for the precise specification of the CompositeData type representing the returned result.

124.8.3.26 public void refreshBundle(long bundleIdentifier) throws IOException

the bundle identifier

Force the update, replacement or removal of the packages identified by the specified bundle.

IOException– if the operation failed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.27 public boolean refreshBundleAndWait(long bundleIdentifier) throws IOException

the bundle identifier

Force the update, replacement or removal of the packages identified by the specified bundle and wait until completed.

whether the bundle was successfully resolved after being refreshed.

IOException– if the operation failed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.28 public void refreshBundles(long[] bundleIdentifiers) throws IOException

The identifiers of the bundles to refresh, or null for all bundles with packages pending removal.

Force the update, replacement or removal of the packages identified by the list of bundles.

IOException– if the operation failed

IllegalArgumentException– if a bundle indicated does not exist

124.8.3.29 public CompositeData refreshBundlesAndWait(long[] bundleIdentifiers) throws IOException

The identifiers of the bundles to refresh, or null for all bundles with packages pending removal.

Force the update, replacement or removal of the packages identified by the list of bundles and wait until completed.

the result of the refresh operation

IOException– if the operation failed

IllegalArgumentException– if a bundle indicated does not exist

for the precise specification of the CompositeData type representing the returned result.

124.8.3.30 public CompositeData resolve(long[] bundleIdentifiers) throws IOException

The identifiers of the bundles to resolve, or null to resolve all unresolved bundles.

Same as resolveBundles(long[]) but with a more detailed return type.

the resulting state from executing the operation

IOException– if the operation failed

IllegalArgumentException– if a bundle indicated does not exist

for the precise specification of the CompositeData type representing the returned result.

124.8.3.31 public boolean resolveBundle(long bundleIdentifier) throws IOException

the bundle identifier

Resolve the bundle indicated by the unique symbolic name and version

true if the bundle was resolved, false otherwise

IOException– if the operation does not succeed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.32 public boolean resolveBundles(long[] bundleIdentifiers) throws IOException

The identifiers of the bundles to resolve, or null to resolve all unresolved bundles.

Batch resolve the bundles indicated by the list of bundle identifiers

true if the bundles were resolved, false otherwise

IOException– if the operation does not succeed

IllegalArgumentException– if a bundle indicated does not exist

124.8.3.33 public void restartFramework() throws IOException

Restart the framework by updating the system bundle

IOException– if the operation failed

124.8.3.34 public void setBundleStartLevel(long bundleIdentifier, int newlevel) throws IOException

the bundle identifier

the new start level for the bundle

Set the start level for the bundle identifier

IOException– if the operation failed

124.8.3.35 public CompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels) throws IOException

the array of bundle identifiers

the array of new start level for the bundles

Set the start levels for the list of bundles.

the resulting state from executing the operation

IOException– if the operation failed

for the precise specification of the CompositeData type representing the returned result.

124.8.3.36 public void setFrameworkStartLevel(int newlevel) throws IOException

the new start level

Set the start level for the framework

IOException– if the operation failed

124.8.3.37 public void setInitialBundleStartLevel(int newlevel) throws IOException

the new start level

Set the initial start level assigned to a bundle when it is first started

IOException– if the operation failed

124.8.3.38 public void shutdownFramework() throws IOException

Shutdown the framework by stopping the system bundle

IOException– if the operation failed

124.8.3.39 public void startBundle(long bundleIdentifier) throws IOException

the bundle identifier

Start the bundle indicated by the bundle identifier

IOException– if the operation does not succeed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.40 public CompositeData startBundles(long[] bundleIdentifiers) throws IOException

the array of bundle identifiers

Batch start the bundles indicated by the list of bundle identifier

the resulting state from executing the operation

IOException– if the operation does not succeed

for the precise specification of the CompositeData type representing the returned result.

124.8.3.41 public void stopBundle(long bundleIdentifier) throws IOException

the bundle identifier

Stop the bundle indicated by the bundle identifier

IOException– if the operation does not succeed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.42 public CompositeData stopBundles(long[] bundleIdentifiers) throws IOException

the array of bundle identifiers

Batch stop the bundles indicated by the list of bundle identifier

the resulting state from executing the operation

IOException– if the operation does not succeed

BATCH_ACTION_RESULT_TYPE for the precise specification of the CompositeData type representing the returned result.

124.8.3.43 public void uninstallBundle(long bundleIdentifier) throws IOException

the bundle identifier

Uninstall the bundle indicated by the bundle identifier

IOException– if the operation does not succeed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.44 public CompositeData uninstallBundles(long[] bundleIdentifiers) throws IOException

the array of bundle identifiers

Batch uninstall the bundles indicated by the list of bundle identifiers

the resulting state from executing the operation

IOException– if the operation does not succeed

BATCH_ACTION_RESULT_TYPE for the precise specification of the CompositeData type representing the returned result.

124.8.3.45 public void updateBundle(long bundleIdentifier) throws IOException

the bundle identifier

Update the bundle indicated by the bundle identifier

IOException– if the operation does not succeed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.46 public void updateBundleFromURL(long bundleIdentifier, String url) throws IOException

the bundle identifier

the URL to use to update the bundle

Update the bundle identified by the bundle identifier

IOException– if the operation does not succeed

IllegalArgumentException– if the bundle indicated does not exist

124.8.3.47 public CompositeData updateBundles(long[] bundleIdentifiers) throws IOException

the array of bundle identifiers

Batch update the bundles indicated by the list of bundle identifier.

the resulting state from executing the operation

IOException– if the operation does not succeed

BATCH_ACTION_RESULT_TYPE for the precise specification of the CompositeData type representing the returned result.

124.8.3.48 public CompositeData updateBundlesFromURL(long[] bundleIdentifiers, String[] urls) throws IOException

the array of bundle identifiers

the array of URLs to use to update the bundles

Update the bundle uniquely identified by the bundle symbolic name and version using the contents of the supplied urls.

the resulting state from executing the operation

IOException– if the operation does not succeed

IllegalArgumentException– if the bundle indicated does not exist

BATCH_ACTION_RESULT_TYPE for the precise specification of the CompositeData type representing the returned result.

124.8.3.49 public void updateFramework() throws IOException

Update the framework by updating the system bundle.

IOException– if the operation failed

124.8.4 public interface PackageStateMBean

This MBean provides information about the package state of the framework.

Thread-safe

124.8.4.1 public static final String EXPORTING_BUNDLES = "ExportingBundles"

The key EXPORTING_BUNDLE, used in EXPORTING_BUNDLES_ITEM.

124.8.4.2 public static final Item EXPORTING_BUNDLES_ITEM

The item containing the bundle identifier in PACKAGE_TYPE. The key is EXPORTING_BUNDLES and the type is JmxConstants.LONG_ARRAY_TYPE.

124.8.4.3 public static final String IMPORTING_BUNDLES = "ImportingBundles"

The key IMPORTING_BUNDLES, used in IMPORTING_BUNDLES_ITEM.

124.8.4.4 public static final Item IMPORTING_BUNDLES_ITEM

The item containing the bundle identifier in PACKAGE_TYPE. The key is IMPORTING_BUNDLES and the type is JmxConstants.LONG_ARRAY_TYPE.

124.8.4.5 public static final String NAME = "Name"

The key NAME, used in NAME_ITEM.

124.8.4.6 public static final Item NAME_ITEM

The item containing the name of the package in PACKAGE_TYPE. The key is NAME and the type is SimpleType.LONG.

124.8.4.7 public static final String OBJECTNAME = "osgi.core:type=packageState,version=1.5"

The fully qualified object name of this MBean.

124.8.4.8 public static final CompositeType PACKAGE_TYPE

The Composite Type for a CompositeData representing a package. This type consists of:

The key is defined as NAME and EXPORTING_BUNDLES

124.8.4.9 public static final TabularType PACKAGES_TYPE

The Tabular Type used in listPackages(). They key is NAME, VERSION, and EXPORTING_BUNDLES.

124.8.4.10 public static final String REMOVAL_PENDING = "RemovalPending"

The name of the item containing the pending removal status of the package in the CompositeData. Used

124.8.4.11 public static final Item REMOVAL_PENDING_ITEM

The item representing the removal pending status of a package. The key is REMOVAL_PENDING and the type is SimpleType.BOOLEAN.

124.8.4.12 public static final String VERSION = "Version"

The name of the item containing the package version in the CompositeData. Used in VERSION_ITEM.

124.8.4.13 public static final Item VERSION_ITEM

The item containing the version of the package in PACKAGE_TYPE. The key is VERSION and the type is SimpleType.STRING.

124.8.4.14 public long[] getExportingBundles(String packageName, String version) throws IOException

- the package name

- the version of the package

Answer the identifier of the bundle exporting the package

the bundle identifiers exporting such a package

IOException– if the operation fails

IllegalArgumentException– if the package indicated does not exist

124.8.4.15 public long[] getImportingBundles(String packageName, String version, long exportingBundle) throws IOException

The package name

The version of the package

The exporting bundle for the given package

Answer the list of identifiers of the bundles importing the package

the list of bundle identifiers

IOException– if the operation fails

IllegalArgumentException– if the package indicated does not exist

124.8.4.16 public boolean isRemovalPending(String packageName, String version, long exportingBundle) throws IOException

The package name

The version of the package

The bundle exporting the package

Answer if this package is exported by a bundle which has been updated or uninstalled

true if this package is being exported by a bundle that has been updated or uninstalled.

IOException– if the operation fails

IllegalArgumentException– if the package indicated does not exist

124.8.4.17 public TabularData listPackages() throws IOException

Answer the package state of the system in tabular form The Tabular Data is typed by PACKAGES_TYPE, which has PACKAGE_TYPE as its Composite Type.

the tabular representation of the package state

IOException– When fails

124.8.5 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.

Thread-safe

124.8.5.1 public static final String BUNDLE_IDENTIFIER = "BundleIdentifier"

The key BUNDLE_IDENTIFIER, used in BUNDLE_IDENTIFIER_ITEM.

124.8.5.2 public static final Item BUNDLE_IDENTIFIER_ITEM

The item containing the bundle identifier in SERVICE_TYPE. The key is BUNDLE_IDENTIFIER and the type is SimpleType.LONG .

124.8.5.3 public static final String BUNDLE_LOCATION = "BundleLocation"

The key BUNDLE_LOCATION, used in SERVICE_EVENT_TYPE.

124.8.5.4 public static final Item BUNDLE_LOCATION_ITEM

The item containing the bundle location in EVENT_ITEM. The key is BUNDLE_LOCATION and the the type is SimpleType.STRING .

124.8.5.5 public static final String BUNDLE_SYMBOLIC_NAME = "BundleSymbolicName"

The key BUNDLE_SYMBOLIC_NAME, used in SERVICE_EVENT_TYPE.

124.8.5.6 public static final Item BUNDLE_SYMBOLIC_NAME_ITEM

The item containing the symbolic name in EVENT. The key is BUNDLE_SYMBOLIC_NAME and the the type is SimpleType.STRING.

124.8.5.7 public static final String EVENT = "ServiceEvent"

The key EVENT, used in EVENT_ITEM.

124.8.5.8 public static final Item EVENT_ITEM

The item containing the event type. The key is EVENT and the type is SimpleType.INTEGER

124.8.5.9 public static final String IDENTIFIER = "Identifier"

The key IDENTIFIER, used IDENTIFIER_ITEM.

124.8.5.10 public static final Item IDENTIFIER_ITEM

The item containing the service identifier in SERVICE_TYPE. The key is IDENTIFIER and the type is SimpleType.LONG.

124.8.5.11 public static final String OBJECT_CLASS = "objectClass"

The key OBJECT_CLASS, used OBJECT_CLASS_ITEM.

124.8.5.12 public static final Item OBJECT_CLASS_ITEM

The item containing the interfaces of the service in SERVICE_TYPE. The key is OBJECT_CLASS and the type is JmxConstants.STRING_ARRAY_TYPE.

124.8.5.13 public static final String OBJECTNAME = "osgi.core:type=serviceState,version=1.7"

The Object Name prefix for this mbean. The full object name also contains the framework name and uuid as properties.

124.8.5.14 public static final String PROPERTIES = "Properties"

The key PROPERTIES, used in PROPERTIES_ITEM.

124.8.5.15 public static final Item PROPERTIES_ITEM

The item containing service properties in SERVICE_TYPE. The key is PROPERTIES and the type is JmxConstants.PROPERTIES_TYPE.

124.8.5.16 public static final CompositeType SERVICE_EVENT_TYPE

The Composite Type that represents a service event. This composite consists of:

124.8.5.17 public static final CompositeType SERVICE_TYPE

The Composite Type for a CompositeData representing a service. This type consists of:

124.8.5.18 public static final TabularType SERVICES_TYPE

The Tabular Type for a Service table. The rows consists of SERVICE_TYPE Composite Data and the index is IDENTIFIER .

124.8.5.19 public static final String USING_BUNDLES = "UsingBundles"

The key USING_BUNDLES, used in USING_BUNDLES_ITEM.

124.8.5.20 public static final Item USING_BUNDLES_ITEM

The item containing the bundles using the service in SERVICE_TYPE. The key is USING_BUNDLES and the type is JmxConstants.LONG_ARRAY_TYPE.

124.8.5.21 public long getBundleIdentifier(long serviceId) throws IOException

the identifier of the service

Answer the bundle identifier of the bundle which registered the service

the identifier for the bundle

IOException– if the operation fails

IllegalArgumentException– if the service indicated does not exist

124.8.5.22 public String[] getObjectClass(long serviceId) throws IOException

the identifier of the service

Answer the list of interfaces that this service implements

the list of interfaces

IOException– if the operation fails

IllegalArgumentException– if the service indicated does not exist

124.8.5.23 public TabularData getProperties(long serviceId) throws IOException

the identifier of the service

Answer the map of properties associated with this service.

the table of properties. These include the standard mandatory service.id and objectClass properties as defined in the org.osgi.framework.Constants interface

IOException– if the operation fails

IllegalArgumentException– if the service indicated does not exist

for the details of the TabularType

124.8.5.24 public CompositeData getProperty(long serviceId, String key) throws IOException

the identifier of the service

the property key

Return a single property from the specified service.

a CompositeData object holding the value and data type of the property.

IOException– if the operation fails

for the details of the CompositeType.

124.8.5.25 public CompositeData getService(long serviceId) throws IOException

the ID of the service to look up

Obtain information about a given service. The result is defined by the CompositeType SERVICE_TYPE.

A CompositeData object with the service information

IOException– if the operation fails

IllegalArgumentException– if the service indicated does not exist

124.8.5.26 public long[] getServiceIds() throws IOException

List all service IDs in the framework.

all the service ids in the framework.

IOException– if the operation fails

124.8.5.27 public long[] getUsingBundles(long serviceId) throws IOException

the identifier of the service

Answer the list of identifiers of the bundles that use the service

the list of bundle identifiers

IOException– if the operation fails

IllegalArgumentException– if the service indicated does not exist

124.8.5.28 public TabularData listServices() throws IOException

Answer the service state of the system in tabular form.

the tabular representation of the service state

IOException– If the operation fails

IllegalArgumentException– if the service indicated does not exist

for the details of the TabularType

124.8.5.29 public TabularData listServices(String clazz, String filter) throws IOException

The class name with which the services were registered or null for any class name.

A filter expression to match the services or null for no additional filter.

Answer the service state of the system in tabular form. This method allows the specification of a class name and a filter to select services to be provided.

the tabular representation of the service state

IOException– If the operation fails

IllegalArgumentException– if the service indicated does not exist

for the details of the TabularType

124.8.5.30 public TabularData listServices(String clazz, String filter, String... serviceTypeItems) throws IOException

The class name with which the services were registered or null for any class name.

A filter expression to match the services or null for no additional filter.

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.

Answer the service state of the system in tabular form. Apart from class name and filter, this method allows the specification of a subset of the 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.

the tabular representation of the service state

IOException– If the operation fails

IllegalArgumentException– if the service indicated does not exist

for the details of the TabularType

124.9 org.osgi.jmx.service.cm

Version 1.3

OSGi JMX Configuration Admin Package Version 1.3.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.jmx.service.cm; version="[1.3,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.jmx.service.cm; version="[1.3,1.4)"

124.9.1 Summary

124.9.2 public interface ConfigurationAdminMBean

This MBean provides the management interface to the OSGi Configuration Administration Service.

Thread-safe

124.9.2.1 public static final String OBJECTNAME = "osgi.compendium:service=cm,version=1.3"

The object name for this mbean.

124.9.2.2 public String createFactoryConfiguration(String factoryPid) throws IOException

the persistent id of the factory

Create a new configuration instance for the supplied persistent id of the factory, answering the PID of the created configuration

the PID of the created configuration

IOException– if the operation failed

124.9.2.3 public String createFactoryConfigurationForLocation(String factoryPid, String location) throws IOException

the persistent id of the factory

the bundle location

Create a factory configuration for the supplied persistent id of the factory and the bundle location bound to bind the created configuration to, answering the PID of the created configuration

the pid of the created configuation

IOException– if the operation failed

124.9.2.4 public void delete(String pid) throws IOException

the persistent identifier of the configuration

Delete the configuration

IOException– if the operation fails

124.9.2.5 public void deleteConfigurations(String filter) throws IOException

the string representation of the org.osgi.framework.Filter

Delete the configurations matching the filter specification.

IOException– if the operation failed

IllegalArgumentException– if the filter is invalid

124.9.2.6 public void deleteForLocation(String pid, String location) throws IOException

the persistent identifier of the configuration

the bundle location

Delete the configuration

IOException– if the operation fails

124.9.2.7 public String getBundleLocation(String pid) throws IOException

the persistent identifier of the configuration

Answer the bundle location the configuration is bound to

the bundle location

IOException– if the operation fails

124.9.2.8 public String[][] getConfigurations(String filter) throws IOException

the string representation of the org.osgi.framework.Filter

Answer the list of PID/Location pairs of the configurations managed by this service

the list of configuration PID/Location pairs

IOException– if the operation failed

IllegalArgumentException– if the filter is invalid

124.9.2.9 public String getFactoryPid(String pid) throws IOException

the persistent identifier of the configuration

Answer the factory PID if the configuration is a factory configuration, null otherwise.

the factory PID

IOException– if the operation fails

124.9.2.10 public String getFactoryPidForLocation(String pid, String location) throws IOException

the persistent identifier of the configuration

the bundle location

Answer the factory PID if the configuration is a factory configuration, null otherwise.

the factory PID

IOException– if the operation fails

124.9.2.11 public TabularData getProperties(String pid) throws IOException

the persistent identifier of the configuration

Answer the contents of the configuration.

the table of contents

IOException– if the operation fails

JmxConstants.PROPERTIES_TYPE for the details of the TabularType

124.9.2.12 public TabularData getPropertiesForLocation(String pid, String location) throws IOException

the persistent identifier of the configuration

the bundle location

Answer the contents of the configuration.

the table of contents

IOException– if the operation fails

JmxConstants.PROPERTIES_TYPE for the details of the TabularType

124.9.2.13 public void setBundleLocation(String pid, String location) throws IOException

the persistent identifier of the configuration

the bundle location

Set the bundle location the configuration is bound to

IOException– if the operation fails

124.9.2.14 public void update(String pid, TabularData properties) throws IOException

the persistent identifier of the configuration

the table of properties

Update the configuration with the supplied properties For each property entry, the following row is supplied.

IOException– if the operation fails

JmxConstants.PROPERTIES_TYPE for the details of the TabularType

124.9.2.15 public void updateForLocation(String pid, String location, TabularData properties) throws IOException

the persistent identifier of the configuration

the bundle location

the table of properties

Update the configuration with the supplied properties For each property entry, the following row is supplied.

IOException– if the operation fails

JmxConstants.PROPERTIES_TYPE for the details of the TabularType

124.10 org.osgi.jmx.service.permissionadmin

Version 1.2

OSGi JMX Permission Admin Package Version 1.2.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.jmx.service.permissionadmin; version="[1.2,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.jmx.service.permissionadmin; version="[1.2,1.3)"

124.10.1 Summary

124.10.2 public interface PermissionAdminMBean

This MBean represents the OSGi Permission Manager Service

Thread-safe

124.10.2.1 public static final String OBJECTNAME = "osgi.core:service=permissionadmin,version=1.2"

Permission Admin MBean object name.

124.10.2.2 public String[] getPermissions(String location) throws IOException

location identifying the bundle

Answer the list of encoded permissions of the bundle specified by the bundle location

the array of String encoded permissions

IOException– if the operation fails

124.10.2.3 public String[] listDefaultPermissions() throws IOException

Answer the list of encoded permissions representing the default permissions assigned to bundle locations that have no assigned permissions

the array of String encoded permissions

IOException– if the operation fails

124.10.2.4 public String[] listLocations() throws IOException

Answer the bundle locations that have permissions assigned to them

the bundle locations

IOException– if the operation fails

124.10.2.5 public void setDefaultPermissions(String[] encodedPermissions) throws IOException

the string encoded permissions

Set the default permissions assigned to bundle locations that have no assigned permissions

IOException– if the operation fails

124.10.2.6 public void setPermissions(String location, String[] encodedPermissions) throws IOException

the location of the bundle

the string encoded permissions to set

Set the permissions on the bundle specified by the bundle location

IOException– if the operation fails

124.11 org.osgi.jmx.service.provisioning

Version 1.2

OSGi JMX Initial Provisioning Package Version 1.2.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.jmx.service.provisioning; version="[1.2,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.jmx.service.provisioning; version="[1.2,1.3)"

124.11.1 Summary

124.11.2 public interface ProvisioningServiceMBean

This MBean represents the management interface to the OSGi Initial Provisioning Service

Thread-safe

124.11.2.1 public static final String OBJECTNAME = "osgi.compendium:service=provisioning,version=1.2"

Provisioning MBean object name.

124.11.2.2 public void addInformation(TabularData info) throws IOException

the set of Provisioning Information key/value pairs to add to the Provisioning Information dictionary. Any keys are values that are of an invalid type will be silently ignored.

Adds the key/value pairs contained in info to the Provisioning Information dictionary. This method causes the PROVISIONING_UPDATE_COUNT to be incremented.

IOException– if the operation fails

JmxConstants.PROPERTIES_TYPE for details of the Tabular Data

124.11.2.3 public void addInformationFromZip(String zipURL) throws IOException

the String form of the URL that will be resolved into a ZipInputStream which will be used to add key/value pairs to the Provisioning Information dictionary and install and start bundles. If a ZipEntry does not have an Extra field that corresponds to one of the four defined MIME types ( MIME_STRING, MIME_BYTE_ARRAY,MIME_BUNDLE, and MIME_BUNDLE_URL) in will be silently ignored.

Processes the ZipInputStream contents of the provided zipURL and extracts information to add to the Provisioning Information dictionary, as well as, install/update and start bundles. This method causes the PROVISIONING_UPDATE_COUNT to be incremented.

IOException– if an error occurs while processing the ZipInputStream of the URL. No additions will be made to the Provisioning Information dictionary and no bundles must be started or installed.

124.11.2.4 public TabularData listInformation() throws IOException

Returns a table representing the Provisioning Information Dictionary.

The table representing the manager dictionary.

IOException– if the operation fails

JmxConstants.PROPERTIES_TYPE for details of the Tabular Data

124.11.2.5 public void setInformation(TabularData info) throws IOException

the new set of Provisioning Information key/value pairs. Any keys are values that are of an invalid type will be silently ignored.

Replaces the Provisioning Information dictionary with the entries of the supplied table. This method causes the PROVISIONING_UPDATE_COUNT to be incremented.

IOException– if the operation fails

JmxConstants.PROPERTIES_TYPE for details of the Tabular Data

124.12 org.osgi.jmx.service.useradmin

Version 1.1

OSGi JMX User Admin Package Version 1.1.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.jmx.service.useradmin; version="[1.1,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.jmx.service.useradmin; version="[1.1,1.2)"

124.12.1 Summary

  • UserAdminMBean - This MBean provides the management interface to the OSGi User Manager Service

124.12.2 public interface UserAdminMBean

This MBean provides the management interface to the OSGi User Manager Service

Thread-safe

124.12.2.1 public static final CompositeType AUTORIZATION_TYPE

The Composite Type for an Authorization object. It consists of the NAME_ITEM and ROLES_ITEM items.

124.12.2.2 public static final String CREDENTIALS = "Credentials"

The CREDENTIALS key, used in CREDENTIALS_ITEM.

124.12.2.3 public static final Item CREDENTIALS_ITEM

The item containing the credentials of a user. The key is CREDENTIALS and the type is JmxConstants.PROPERTIES_TYPE .

124.12.2.4 public static final CompositeType GROUP_TYPE

The Composite Type for a Group. It extends USER_TYPE and adds MEMBERS_ITEM, and REQUIRED_MEMBERS_ITEM. This type extends the USER_TYPE. It adds:

If there are no members or required members an empty array is returned in the respective items.

124.12.2.5 public static final String MEMBERS = "Members"

The MEMBERS key, used in MEMBERS_ITEM.

124.12.2.6 public static final Item MEMBERS_ITEM

The item containing the members of a group. The key is MEMBERS and the type is JmxConstants.STRING_ARRAY_TYPE. It is used in GROUP_TYPE.

124.12.2.7 public static final String NAME = "Name"

The key NAME, used in NAME_ITEM.

124.12.2.8 public static final Item NAME_ITEM

The item for the user name for an authorization object. The key is NAME and the type is SimpleType.STRING.

124.12.2.9 public static final String OBJECTNAME = "osgi.compendium:service=useradmin,version=1.1"

User Admin MBean object name.

124.12.2.10 public static final String PROPERTIES = "Properties"

The PROPERTIES key, used in PROPERTIES_ITEM.

124.12.2.11 public static final Item PROPERTIES_ITEM

The item containing the properties of a Role. The key is PROPERTIES and the type is JmxConstants.PROPERTIES_TYPE.

124.12.2.12 public static final String REQUIRED_MEMBERS = "RequiredMembers"

The REQUIRED_MEMBERS key, used in REQUIRED_MEMBERS_ITEM.

124.12.2.13 public static final Item REQUIRED_MEMBERS_ITEM

The item containing the required members of a group. The key is REQUIRED_MEMBERS and the type is JmxConstants.STRING_ARRAY_TYPE. It is used in GROUP_TYPE .

124.12.2.14 public static final CompositeType ROLE_TYPE

The Composite Type for a Role. It contains the following items:

124.12.2.15 public static final String ROLES = "Roles"

The key ROLES, used in ROLES_ITEM.

124.12.2.16 public static final Item ROLES_ITEM

The item containing the roles for this authorization object. The key is ROLES. and the type is JmxConstants.STRING_ARRAY_TYPE.

124.12.2.17 public static final String TYPE = "Type"

The Role TYPE key, used in TYPE_ITEM.

124.12.2.18 public static final Item TYPE_ITEM

The item containing the type of the roles encapsulated by this authorization object. The key is TYPE and the type is SimpleType.INTEGER.

124.12.2.19 public static final CompositeType USER_TYPE

A Composite Type for a User. A User contains its Role description and adds the credentials. It extends ROLE_TYPE and adds CREDENTIALS_ITEM. This type extends the ROLE_TYPE. It adds:

124.12.2.20 public void addCredential(String key, byte[] value, String username) throws IOException

The key of the credential to add

The value of the credential to add

The name of the user that gets the credential.

Add credentials to a user, associated with the supplied key

IOException– if the operation fails

IllegalArgumentException– if the username is not a User

124.12.2.21 public void addCredentialString(String key, String value, String username) throws IOException

The key of the credential to add

The value of the credential to add

The name of the user that gets the credential.

Add credentials to a user, associated with the supplied key

IOException– if the operation fails

IllegalArgumentException– if the username is not a User

124.12.2.22 public boolean addMember(String groupname, String rolename) throws IOException

The group name that receives the rolename as member.

The rolename (User or Group) that must be added.

Add a member to the group.

true if the role was added to the group

IOException– if the operation fails

IllegalArgumentException– if an invalid group name or role name is specified

124.12.2.23 public void addProperty(String key, byte[] value, String rolename) throws IOException

The added property key

The added byte[] property value

The role name that receives the property

Add or update a property on a role.

IOException– if the operation fails

IllegalArgumentException– if an invalid role name is specified

124.12.2.24 public void addPropertyString(String key, String value, String rolename) throws IOException

The key of the property to add

The value of the property to add (String)

The role name

Add or update a property on a role

IOException– if the operation fails

IllegalArgumentException– if an invalid role name is specified

124.12.2.25 public boolean addRequiredMember(String groupname, String rolename) throws IOException

The group name that is addded

The role that

Add a required member to the group

true if the role was added to the group

IOException– if the operation fails

IllegalArgumentException– if an invalid group name or role name is specified

124.12.2.26 public void createGroup(String name) throws IOException

Name of the group to create

Create a Group

IOException– if the operation fails

124.12.2.27 public void createRole(String name) throws IOException

Ignored.

This method was specified in error and must not be used.

IOException– This method will throw an exception if called.

This method was specified in error. It does not function and must not be used. Use either createUser(String) or createGroup(String).

124.12.2.28 public void createUser(String name) throws IOException

Name of the user to create

Create a User

IOException– if the operation fails

124.12.2.29 public CompositeData getAuthorization(String user) throws IOException

The user name

Answer the authorization for the user name. The Composite Data is typed by AUTORIZATION_TYPE.

the Authorization typed by AUTORIZATION_TYPE.

IOException– if the operation fails

IllegalArgumentException– if the user name is not a User

124.12.2.30 public TabularData getCredentials(String username) throws IOException

The user name

Answer the credentials associated with a user. The returned Tabular Data is typed by JmxConstants.PROPERTIES_TYPE.

the credentials associated with the user, see JmxConstants.PROPERTIES_TYPE

IOException– if the operation fails

IllegalArgumentException– if the user name is not a User

124.12.2.31 public CompositeData getGroup(String groupname) throws IOException

The group name

Answer the Group associated with the group name. The returned Composite Data is typed by GROUP_TYPE

the Group, see GROUP_TYPE

IOException– if the operation fails

IllegalArgumentException– if the group name is not a Group

124.12.2.32 public String[] getGroups(String filter) throws IOException

The filter to apply

Answer the list of group names

The list of group names

IOException– if the operation fails

124.12.2.33 public String[] getImpliedRoles(String username) throws IOException

The name of the user that has the implied roles

Answer the list of implied roles for a user

The list of role names

IOException– if the operation fails

IllegalArgumentException– if the username is not a User

124.12.2.34 public String[] getMembers(String groupname) throws IOException

The name of the group to get the members from

Answer the the user names which are members of the group

The list of user names

IOException– if the operation fails

IllegalArgumentException– if the groupname is not a Group

124.12.2.35 public TabularData getProperties(String rolename) throws IOException

The name of the role to get properties from

Answer the properties associated with a role. The returned Tabular Data is typed by JmxConstants.PROPERTIES_TYPE.

the properties associated with the role, see JmxConstants.PROPERTIES_TYPE

IOException– if the operation fails

IllegalArgumentException– if the rolename is not a role

124.12.2.36 public String[] getRequiredMembers(String groupname) throws IOException

The name of the group to get the required members from

Answer the list of user names which are required members of this group

The list of user names

IOException– if the operation fails

IllegalArgumentException– if the group name is not a Group

124.12.2.37 public CompositeData getRole(String name) throws IOException

The name of the role to get the data from

Answer the role associated with a name. The returned Composite Data is typed by ROLE_TYPE.

the Role, see ROLE_TYPE

IOException– if the operation fails

IllegalArgumentException– if the name is not a role

124.12.2.38 public String[] getRoles(String filter) throws IOException

The string representation of the org.osgi.framework.Filter that is used to filter the roles by applying to the properties, if null all roles are returned.

Answer the list of role names which match the supplied filter

The list the role names

IOException– if the operation fails

124.12.2.39 public CompositeData getUser(String username) throws IOException

The name of the requested user

Answer the User associated with the user name. The returned Composite Data is typed by USER_TYPE.

The User, see USER_TYPE

IOException– if the operation fails

IllegalArgumentException– if the username is not a User

124.12.2.40 public String[] getUsers(String filter) throws IOException

The filter to apply

Answer the list of user names in the User Admin database

The list of user names

IOException– if the operation fails

124.12.2.41 public String getUserWithProperty(String key, String value) throws IOException

The key to compare

The value to compare

Answer the user name with the given property key-value pair from the User Admin service database.

The User

IOException– if the operation fails

124.12.2.42 public String[] listGroups() throws IOException

Answer the list of group names

The list of group names

IOException– if the operation fails

124.12.2.43 public String[] listRoles() throws IOException

Answer the list of role names in the User Admin database

The list of role names

IOException– if the operation fails

124.12.2.44 public String[] listUsers() throws IOException

Answer the list of user names in the User Admin database

The list of user names

IOException– if the operation fails

124.12.2.45 public void removeCredential(String key, String username) throws IOException

The key of the credential to remove

The name of the user for which the credential must be removed

Remove the credential associated with the given user

IOException– if the operation fails

IllegalArgumentException– if the username is not a User

124.12.2.46 public boolean removeGroup(String name) throws IOException

Remove the Group associated with the name

true if the remove succeeded

IOException– if the operation fails

IllegalArgumentException– if the name is not a Group

124.12.2.47 public boolean removeMember(String groupname, String rolename) throws IOException

The group name

Remove a role from the group

true if the role was removed from the group

IOException– if the operation fails

IllegalArgumentException– if the groupname is not a Group

124.12.2.48 public void removeProperty(String key, String rolename) throws IOException

Remove a property from a role

IOException– if the operation fails

IllegalArgumentException– if the rolename is not a role

124.12.2.49 public boolean removeRole(String name) throws IOException

Remove the Role associated with the name

true if the remove succeeded

IOException– if the operation fails

IllegalArgumentException– if the name is not a role

124.12.2.50 public boolean removeUser(String name) throws IOException

Remove the User associated with the name

true if the remove succeeded

IOException– if the operation fails

IllegalArgumentException– if the name is not a User

124.13 org.osgi.jmx.framework.wiring

Version 1.1

OSGi JMX Framework Wiring Package Version 1.1.

Bundles wishing to use this package must list the package in the Import-Package header of the bundle's manifest. This package has two types of users: the consumers that use the API in this package and the providers that implement the API in this package.

Example import for consumers using the API in this package:

Import-Package: org.osgi.jmx.framework.wiring; version="[1.1,2.0)"

Example import for providers implementing the API in this package:

Import-Package: org.osgi.jmx.framework.wiring; version="[1.1,1.2)"

124.13.1 Summary

124.13.2 public interface BundleWiringStateMBean

This MBean represents the bundle wiring state.

It can be used to retrieve the declared capabilities, declared requirements, and wiring for the current and past revisions of bundles.

Thread-safe

124.13.2.1 public static final String ATTRIBUTES = "Attributes"

The key of ATTRIBUTES_ITEM.

124.13.2.2 public static final Item ATTRIBUTES_ITEM

The item containing the attributes of a capability or requirement. Used in BUNDLE_REQUIREMENT_TYPE and BUNDLE_CAPABILITY_TYPE. The key is ATTRIBUTES and the type is ATTRIBUTES_TYPE.

124.13.2.3 public static final TabularType ATTRIBUTES_TYPE

The Tabular Type that holds the attributes for a capability or requirements. The row type is JmxConstants.PROPERTY_TYPE and the index is JmxConstants.KEY.

124.13.2.4 public static final String BUNDLE_CAPABILITY = "BundleCapability"

The key of BUNDLE_CAPABILITY_ITEM.

124.13.2.5 public static final Item BUNDLE_CAPABILITY_ITEM

The item containing a capability for a bundle in BUNDLE_WIRE_TYPE. The key is BUNDLE_CAPABILITY and the type is BUNDLE_CAPABILITY_TYPE.

124.13.2.6 public static final CompositeType BUNDLE_CAPABILITY_TYPE

The Composite Type that represents the capability of a bundle. The composite consists of:

124.13.2.7 public static final String BUNDLE_ID = "BundleId"

The key of BUNDLE_ID_ITEM.

124.13.2.8 public static final Item BUNDLE_ID_ITEM

The item containing a bundle ID. They key is BUNDLE_ID and the type is a long.

124.13.2.9 public static final String BUNDLE_REQUIREMENT = "BundleRequirement"

The key of BUNDLE_REQUIREMENT_ITEM.

124.13.2.10 public static final Item BUNDLE_REQUIREMENT_ITEM

The item containing a requirement for a bundle in BUNDLE_WIRE_TYPE. The key is BUNDLE_REQUIREMENT and the type is BUNDLE_REQUIREMENT_TYPE.

124.13.2.11 public static final CompositeType BUNDLE_REQUIREMENT_TYPE

The Composite Type that represents the requirement of a bundle. The composite consists of:

124.13.2.12 public static final String BUNDLE_REVISION_ID = "BundleRevisionId"

The key of BUNDLE_REVISION_ID_ITEM.

124.13.2.13 public static final Item BUNDLE_REVISION_ID_ITEM

The item containing a bundle revision ID. A bundle revision ID is always local to the result of a JMX invocation and do not have a defined meaning across invocation calls. They are used where a result can potentially contain multiple revisions of the same bundle. The key is BUNDLE_REVISION_ID and the type is an integer.

124.13.2.14 public static final CompositeType BUNDLE_WIRE_TYPE

The Composite type that represents a bundle wire describing the live association between a provider of a capability and a requirer of the corresponding requirement.

The composite consists of:

124.13.2.15 public static final ArrayType BUNDLE_WIRES_TYPE_ARRAY

An array of BUNDLE_WIRE_TYPEs.

124.13.2.16 public static final CompositeType BUNDLE_WIRING_TYPE

The Composite Type that represents a bundle wiring. The composite consists of:

124.13.2.17 public static final TabularType BUNDLES_WIRING_TYPE

The Tabular Type to hold the wiring of a number of bundles. The row type is BUNDLE_WIRING_TYPE and the index is the combination of the BUNDLE_ID and the BUNDLE_REVISION_ID.

124.13.2.18 public static final String CAPABILITIES = "Capabilities"

The key of CAPABILITIES_ITEM.

124.13.2.19 public static final Item CAPABILITIES_ITEM

The item containing the capabilities in REVISION_CAPABILITIES_TYPE and BUNDLE_WIRING_TYPE. The key is CAPABILITIES and the type is CAPABILITY_TYPE_ARRAY.

124.13.2.20 public static final ArrayType CAPABILITY_TYPE_ARRAY

An array of BUNDLE_CAPABILITY_TYPEs.

124.13.2.21 public static final CompositeType DIRECTIVE_TYPE

The Composite Type that represents a directive for a capability or requirement. The composite consists of:

124.13.2.22 public static final String DIRECTIVES = "Directives"

The key of DIRECTIVES_ITEM.

124.13.2.23 public static final Item DIRECTIVES_ITEM

The item containing the directives of a capability or requirement. Used in BUNDLE_REQUIREMENT_TYPE and BUNDLE_CAPABILITY_TYPE. The key is DIRECTIVES and the type is DIRECTIVES_TYPE.

124.13.2.24 public static final TabularType DIRECTIVES_TYPE

The Tabular Type that holds the directives for a capability or requirement. The row type is DIRECTIVE_TYPE and the index is KEY.

124.13.2.25 public static final String KEY = "Key"

The key of KEY_ITEM.

124.13.2.26 public static final Item KEY_ITEM

The item containing the key of a capability or requirement directive. Used in DIRECTIVE_TYPE. The key is KEY and the type is a String.

124.13.2.27 public static final String NAMESPACE = "Namespace"

The key of NAMESPACE_ITEM.

124.13.2.28 public static final Item NAMESPACE_ITEM

The item containing the namespace for a capability or requirement. Used in BUNDLE_REQUIREMENT_TYPE and BUNDLE_CAPABILITY_TYPE. The key is NAMESPACE and the type is a String.

124.13.2.29 public static final String OBJECTNAME = "osgi.core:type=wiringState,version=1.1"

The Object Name prefix for this mbean. The full object name also contains the framework name and uuid as properties.

124.13.2.30 public static final String PROVIDED_WIRES = "ProvidedWires"

The key of PROVIDED_WIRES_ITEM.

124.13.2.31 public static final Item PROVIDED_WIRES_ITEM

The item containing the provided wires in BUNDLE_WIRING_TYPE. The key is PROVIDED_WIRES and the type is BUNDLE_WIRES_TYPE_ARRAY.

124.13.2.32 public static final String PROVIDER_BUNDLE_ID = "ProviderBundleId"

The key of PROVIDER_BUNDLE_ID_ITEM.

124.13.2.33 public static final Item PROVIDER_BUNDLE_ID_ITEM

The item containing the provider bundle ID in BUNDLE_WIRE_TYPE. The key is PROVIDER_BUNDLE_ID and the type is a long.

124.13.2.34 public static final String PROVIDER_BUNDLE_REVISION_ID = "ProviderBundleRevisionId"

The key of PROVIDER_BUNDLE_REVISION_ID_ITEM.

124.13.2.35 public static final Item PROVIDER_BUNDLE_REVISION_ID_ITEM

The local ID of a provider revision in BUNDLE_WIRE_TYPE. This ID is local to the result where it resides and has no defined meaning across multiple invocations. The key is PROVIDER_BUNDLE_REVISION_ID and the type is an int.

124.13.2.36 public static final String REQUIRED_WIRES = "RequiredWires"

The key of REQUIRED_WIRES_ITEM.

124.13.2.37 public static final Item REQUIRED_WIRES_ITEM

The item containing the required wires in BUNDLE_WIRING_TYPE. The key is REQUIRED_WIRES and the type is BUNDLE_WIRES_TYPE_ARRAY.

124.13.2.38 public static final ArrayType REQUIREMENT_TYPE_ARRAY

An array of BUNDLE_REQUIREMENT_TYPEs.

124.13.2.39 public static final String REQUIREMENTS = "Requirements"

The key of REQUIREMENTS_ITEM.

124.13.2.40 public static final Item REQUIREMENTS_ITEM

The item containing the requirements in REVISION_REQUIREMENTS_TYPE and BUNDLE_WIRING_TYPE. The key is REQUIREMENTS and the type is REQUIREMENT_TYPE_ARRAY.

124.13.2.41 public static final String REQUIRER_BUNDLE_ID = "RequirerBundleId"

The key of REQUIRER_BUNDLE_ID_ITEM.

124.13.2.42 public static final Item REQUIRER_BUNDLE_ID_ITEM

The item containing the requirer bundle ID in BUNDLE_WIRE_TYPE. The key is REQUIRER_BUNDLE_ID and the type is long.

124.13.2.43 public static final String REQUIRER_BUNDLE_REVISION_ID = "RequirerBundleRevisionId"

The key of REQUIRER_BUNDLE_REVISION_ID_ITEM.

124.13.2.44 public static final Item REQUIRER_BUNDLE_REVISION_ID_ITEM

The local ID of a requirer revision in BUNDLE_WIRE_TYPE. This ID is local to the result where it resides and has no defined meaning across multiple invocations. The key is REQUIRER_BUNDLE_REVISION_ID and the type is an int.

124.13.2.45 public static final CompositeType REVISION_CAPABILITIES_TYPE

The Composite Type that represents the capabilities for a revision. The composite consists of:

124.13.2.46 public static final CompositeType REVISION_REQUIREMENTS_TYPE

The Composite Type that represents the requirements of a revision. The composite consists of:

124.13.2.47 public static final TabularType REVISIONS_CAPABILITIES_TYPE

The Tabular Type that holds the capabilities of a revision. The row type is REVISION_CAPABILITIES_TYPE and the index is BUNDLE_REVISION_ID.

124.13.2.48 public static final TabularType REVISIONS_REQUIREMENTS_TYPE

The Tabular Type that hold the requirements of a revision. The row type is REVISION_REQUIREMENTS_TYPE and the index is BUNDLE_REVISION_ID.

124.13.2.49 public static final String VALUE = "Value"

The key of VALUE.

124.13.2.50 public static final Item VALUE_ITEM

The item containing the value of a capability or requirement directive. Used in DIRECTIVE_TYPE. They key is VALUE and the type is a String.

124.13.2.51 public CompositeData[] getCurrentRevisionDeclaredCapabilities(long bundleId, String namespace) throws IOException, JMException

The bundle ID.

The namespace of the capabilities to be returned by this operation.

Returns the capabilities for the current bundle revision.

the declared capabilities for the current revision of bundleId and namespace.

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of the CompositeData.

124.13.2.52 public CompositeData[] getCurrentRevisionDeclaredRequirements(long bundleId, String namespace) throws IOException, JMException

The bundle ID.

The namespace of the requirements to be returned by this operation.

Returns the requirements for the current bundle revision.

the declared requirements for the current revision of bundleId and namespace.

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of the CompositeData.

124.13.2.53 public CompositeData getCurrentWiring(long bundleId, String namespace) throws IOException, JMException

The bundle ID.

The namespace of the requirements and capabilities for which to return information.

Returns the bundle wiring for the current bundle revision.

the wiring information for the current revision of bundleId and namespace.

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of the CompositeData.

124.13.2.54 public TabularData getCurrentWiringClosure(long rootBundleId, String namespace) throws IOException, JMException

the root bundle of the closure.

The namespace of the requirements and capabilities for which to return information.

Returns the bundle wiring closure for the current revision of the specified bundle. The wiring closure contains all the wirings from the root bundle revision to all bundle revisions it is wired to and all their transitive wirings.

a tabular representation of all the wirings in the closure. The bundle revision IDs only have meaning in the context of the current result. The revision of the rootBundle is set to 0. Therefore the root bundle of the closure can be looked up in the table by its bundle ID and revision 0.

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of the TabularData.

124.13.2.55 public TabularData getRevisionsDeclaredCapabilities(long bundleId, String namespace) throws IOException, JMException

The bundle ID.

The namespace of the capabilities to be returned by this operation.

Returns the capabilities for all revisions of the bundle.

the declared capabilities for all revisions of bundleId

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of TabularData. The capabilities are in no particular order, and may change in subsequent calls to this operation.

124.13.2.56 public TabularData getRevisionsDeclaredRequirements(long bundleId, String namespace) throws IOException, JMException

The bundle ID.

The namespace of the requirements to be returned by this operation.

Returns the requirements for all revisions of the bundle.

the declared requirements for all revisions of bundleId.

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of TabularData. The requirements are in no particular order, and may change in subsequent calls to this operation.

124.13.2.57 public TabularData getRevisionsWiring(long bundleId, String namespace) throws IOException, JMException

The bundle ID.

The namespace of the requirements and capabilities for which to return information.

Returns the bundle wirings for all revisions of the bundle.

the wiring information for all revisions of bundleId and namespace.

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of TabularData. The bundle wirings are in no particular order, and may change in subsequent calls to this operations.

124.13.2.58 public TabularData getRevisionsWiringClosure(long rootBundleId, String namespace) throws IOException, JMException

The root bundle ID.

The namespace of the requirements and capabilities for which to return information.

Returns the bundle wiring closure for all revisions of the specified bundle. The wiring closure contains all the wirings from the root bundle revision to all bundle revisions it is wired to and all their transitive wirings.

a tabular representation of all the wirings in the closure. The bundle revision IDs only have meaning in the context of the current result.

JMException– if there is a JMX problem.

IOException– if the connection could not be made because of a communication problem.

for the details of TabularData. The bundle wirings are in no particular order, and may change in subsequent calls to this operation. Furthermore, the bundle revision IDs are local and cannot be reused across invocations.

124.14 References

[2]Java Management Extensions (JMX) Technology Overviewhttp://docs.oracle.com/javase/1.5.0/docs/guide/jmx/overview/JMXoverviewTOC.html

[3]JSR 3: Java Management Extensions (JMX) Specificationhttp://www.jcp.org/en/jsr/detailid=3

[4]JSR 255: Java Management Extensions (JMX) Specification, version 2.0http://www.jcp.org/en/jsr/detailid=255

[5]JSR 160: JavaTM Management Extensions (JMX) Remote APIhttp://www.jcp.org/en/jsr/detailid=160

[6]JSR 262: Web Services Connector for Java Management Extensions (JMX) Agentshttp://www.jcp.org/en/jsr/detailid=262

[7]JavaTM Management Extensions (JMXTM)API Specificationhttp://docs.oracle.com/javase/1.5.0/docs/guide/jmx/spec.html