124 Management Model Specification for JMX™ Technology - OSGi Enterprise 7
OSGi Enterprise Release 7
Prev
Next
124
Management Model Specification for JMX™ Technology
Version 1.1
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
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
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 ::=
uuid ::=
key ::=
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 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 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.
Concurrency
Immutable
124.7.2.1
public Item(String name, String description, OpenType type, String... restrictions)
name
The name of the item.
description
The description of the item.
type
The Open Type of this item.
restrictions
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)
dim
The dimension
elementType
The element type
Return a new Array Type.
Returns
A new Array Type
124.7.2.3
public static CompositeType compositeType(String name, String description, Item... items)
name
The name of the Tabular Type.
description
The description of the Tabular Type.
items
The items that describe the composite type.
Create a Composite Type
Returns
a new Composite Type
Throws
RuntimeException
– when the Tabular Type throws an
OpenDataException
124.7.2.4
public static CompositeType extend(CompositeType parent, String name, String description, Item... items)
parent
The parent type, can be
null
name
The name of the type
description
The description of the type
items
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.
Returns
A new Composite Type that extends the parent type
Throws
RuntimeException
– when an OpenDataException is thrown
124.7.2.5
public static TabularType tabularType(String name, String description, CompositeType rowType, String... index)
name
The name of the Tabular Type.
description
The description of the Tabular Type.
rowType
The Open Type for a row
index
The names of the items that form the index .
Create a Tabular Type.
Returns
A new Tabular Type composed from the parameters.
Throws
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
Concurrency
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 SCALAR
A set of all scalars that can be used in the
TYPE
property of a
PROPERTIES_TYPE
. This contains the following names:
BIGDECIMAL
BIGINTEGER
BOOLEAN
BYTE
CHARACTER
DOUBLE
FLOAT
INTEGER
LONG
SHORT
STRING
VERSION
P_BYTE
P_CHAR
P_DOUBLE
P_FLOAT
P_INT
P_LONG
P_SHORT
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
Since
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
BundleStateMBean
This MBean represents the Bundle state of the framework.
FrameworkMBean
The FrameworkMbean provides mechanisms to exert control over the framework.
PackageStateMBean
This MBean provides information about the package state of the framework.
ServiceStateMBean
This MBean represents the Service state of the framework.
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.
Concurrency
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:
IDENTIFIER
LOCATION
SYMBOLIC_NAME
EVENT
124.8.2.5
public static final CompositeType BUNDLE_TYPE
The Composite Type that represents a bundle. This composite consist of:
EXPORTED_PACKAGES
FRAGMENT
FRAGMENTS
HEADERS
HOSTS
IDENTIFIER
IMPORTED_PACKAGES
LAST_MODIFIED
LOCATION
ACTIVATION_POLICY_USED
PERSISTENTLY_STARTED
REGISTERED_SERVICES
REMOVAL_PENDING
REQUIRED
REQUIRED_BUNDLES
REQUIRING_BUNDLES
START_LEVEL
STATE
SERVICES_IN_USE
SYMBOLIC_NAME
VERSION
It is used by
BUNDLES_TYPE
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:
INSTALLED
RESOLVED
STARTING
ACTIVE
STOPPING
UNINSTALLED
UNKNOWN
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
bundleIdentifier
the bundle identifier of the requested bundle
Obtain the information regarding a single bundle.

The result is defined by the
BUNDLE_TYPE
CompositeType.
Returns
A CompositeData object with the bundle information
Throws
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.
Returns
all the bundle ids in the framework.
Throws
IOException
– if the operation fails
124.8.2.64
public String[] getExportedPackages(long bundleId) throws IOException
bundleId
Answer the list of exported packages for this bundle.
Returns
the array of package names, combined with their version in the
format
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.65
public long[] getFragments(long bundleId) throws IOException
bundleId
Answer the list of the bundle ids of the fragments associated with this
bundle
Returns
the array of bundle identifiers
Throws
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
bundleId
the unique identifier of the bundle
key
the key of the header to look up
Retrieve a single header from the bundle headers.
Returns
the value of associated header
Throws
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
bundleId
the unique identifier of the bundle
key
the key of the header to look up
locale
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.
Returns
the value of associated header
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.68
public TabularData getHeaders(long bundleId) throws IOException
bundleId
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
Returns
the table of associated header key and values
Throws
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
bundleId
the unique identifier of the bundle
locale
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.
Returns
the table of associated header key and values
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.70
public long[] getHosts(long fragment) throws IOException
fragment
the bundle id of the fragment
Answer the list of bundle ids of the bundles which host a fragment
Returns
the array of bundle identifiers
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.71
public String[] getImportedPackages(long bundleId) throws IOException
bundleId
the bundle identifier
Answer the array of the packages imported by this bundle
Returns
the array of package names, combined with their version in the
format
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.72
public long getLastModified(long bundleId) throws IOException
bundleId
the unique identifier of a bundle
Answer the last modified time of a bundle
Returns
the last modified time
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.73
public String getLocation(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer the location of the bundle.
Returns
The location string of this bundle
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.74
public long[] getRegisteredServices(long bundleId) throws IOException
bundleId
the bundle identifier
Answer the list of service identifiers representing the services this
bundle exports
Returns
the list of service identifiers
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.75
public long[] getRequiredBundles(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier to find the dependencies
for
Answer an array of ids of bundles the given bundle depends on.
Returns
the bundle identifiers of the dependencies
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.76
public long[] getRequiringBundles(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier
Answer the list of identifiers of the bundles which require this bundle
Returns
the list of bundle identifiers
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.77
public long[] getServicesInUse(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier
Answer the list of service identifiers which refer to the the services
this bundle is using
Returns
the list of service identifiers
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.78
public int getStartLevel(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer the start level of the bundle
Returns
the start level
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.79
public String getState(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer the symbolic name of the state of the bundle
Returns
the string name of the bundle state
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.80
public String getSymbolicName(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer the symbolic name of the bundle
Returns
the symbolic name
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.81
public String getVersion(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer the location of the bundle.
Returns
The location string of this bundle
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.82
public boolean isActivationPolicyUsed(long bundleId) throws IOException
bundleId
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.
Returns
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.
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.83
public boolean isFragment(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer whether the bundle is a fragment or not
Returns
true if the bundle is a fragment
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.84
public boolean isPersistentlyStarted(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer if the bundle is persistently started when its start level is
reached
Returns
true if the bundle is persistently started
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.85
public boolean isRemovalPending(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer true if the bundle is pending removal
Returns
true if the bundle is pending removal
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the bundle indicated does not exist
124.8.2.86
public boolean isRequired(long bundleId) throws IOException
bundleId
the identifier of the bundle
Answer true if the bundle is required by another bundle
Returns
true if the bundle is required by another bundle
Throws
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
Returns
the tabular representation of the bundle state
Throws
IOException
– if the operation fails
124.8.2.88
public TabularData listBundles(String... items) throws IOException
items
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.
Returns
the tabular representation of the bundle state
Throws
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.
Concurrency
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:
BUNDLE_IN_ERROR_ID_ITEM
COMPLETED_ITEM
ERROR_ITEM
REMAINING_ID_ITEM
SUCCESS_ITEM
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:
BUNDLE_IN_ERROR_LOCATION_ITEM
COMPLETED_ITEM
ERROR_ITEM
REMAINING_LOCATION_ITEM
SUCCESS_ITEM
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:
COMPLETED_ITEM
SUCCESS_ITEM
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
See Also
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
See Also
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
bundles
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
Returns
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.
Throws
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
Returns
the framework start level
Throws
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
Returns
the start level
Throws
IOException
– if the operation failed
124.8.3.20
public String getProperty(String key) throws IOException
key
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.
Returns
The value of the requested property, or
null
if the
property is undefined.
Throws
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[])
Returns
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.
Throws
IOException
– if the operation failed
124.8.3.22
public long installBundle(String location) throws IOException
location
the location of the bundle to install
Install the bundle indicated by the bundleLocations
Returns
the bundle id the installed bundle
Throws
IOException
– if the operation does not succeed
124.8.3.23
public long installBundleFromURL(String location, String url) throws IOException
location
the location to assign to the bundle
url
the URL which will supply the bytes for the bundle
Install the bundle indicated by the bundleLocations
Returns
the bundle id the installed bundle
Throws
IOException
– if the operation does not succeed
124.8.3.24
public CompositeData installBundles(String[] locations) throws IOException
locations
the array of locations of the bundles to install
Batch install the bundles indicated by the list of bundleLocationUrls
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation does not succeed
See Also
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
locations
the array of locations to assign to the installed
bundles
urls
the array of urls which supply the bundle bytes
Batch install the bundles indicated by the list of bundleLocationUrls
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation does not succeed
See Also
for the precise specification of the
CompositeData type representing the returned result.
124.8.3.26
public void refreshBundle(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier
Force the update, replacement or removal of the packages identified by
the specified bundle.
Throws
IOException
– if the operation failed
IllegalArgumentException
– if the bundle indicated does not exist
124.8.3.27
public boolean refreshBundleAndWait(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier
Force the update, replacement or removal of the packages identified by
the specified bundle and wait until completed.
Returns
whether the bundle was successfully resolved after being
refreshed.
Throws
IOException
– if the operation failed
IllegalArgumentException
– if the bundle indicated does not exist
124.8.3.28
public void refreshBundles(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
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.
Throws
IOException
– if the operation failed
IllegalArgumentException
– if a bundle indicated does not exist
124.8.3.29
public CompositeData refreshBundlesAndWait(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
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.
Returns
the result of the refresh operation
Throws
IOException
– if the operation failed
IllegalArgumentException
– if a bundle indicated does not exist
See Also
for the precise specification of the
CompositeData type representing the returned result.
124.8.3.30
public CompositeData resolve(long[] bundleIdentifiers) throws IOException
bundleIdentifiers
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.
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation failed
IllegalArgumentException
– if a bundle indicated does not exist
See Also
for the precise specification of the
CompositeData type representing the returned result.
124.8.3.31
public boolean resolveBundle(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier
Resolve the bundle indicated by the unique symbolic name and version
Returns
true
if the bundle was resolved, false otherwise
Throws
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
bundleIdentifiers
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
Returns
true
if the bundles were resolved, false otherwise
Throws
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
Throws
IOException
– if the operation failed
124.8.3.34
public void setBundleStartLevel(long bundleIdentifier, int newlevel) throws IOException
bundleIdentifier
the bundle identifier
newlevel
the new start level for the bundle
Set the start level for the bundle identifier
Throws
IOException
– if the operation failed
124.8.3.35
public CompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels) throws IOException
bundleIdentifiers
the array of bundle identifiers
newlevels
the array of new start level for the bundles
Set the start levels for the list of bundles.
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation failed
See Also
for the precise specification of the
CompositeData type representing the returned result.
124.8.3.36
public void setFrameworkStartLevel(int newlevel) throws IOException
newlevel
the new start level
Set the start level for the framework
Throws
IOException
– if the operation failed
124.8.3.37
public void setInitialBundleStartLevel(int newlevel) throws IOException
newlevel
the new start level
Set the initial start level assigned to a bundle when it is first started
Throws
IOException
– if the operation failed
124.8.3.38
public void shutdownFramework() throws IOException
Shutdown the framework by stopping the system bundle
Throws
IOException
– if the operation failed
124.8.3.39
public void startBundle(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier
Start the bundle indicated by the bundle identifier
Throws
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
bundleIdentifiers
the array of bundle identifiers
Batch start the bundles indicated by the list of bundle identifier
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation does not succeed
See Also
for the precise specification of the
CompositeData type representing the returned result.
124.8.3.41
public void stopBundle(long bundleIdentifier) throws IOException
bundleIdentifier
the bundle identifier
Stop the bundle indicated by the bundle identifier
Throws
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
bundleIdentifiers
the array of bundle identifiers
Batch stop the bundles indicated by the list of bundle identifier
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation does not succeed
See Also
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
bundleIdentifier
the bundle identifier
Uninstall the bundle indicated by the bundle identifier
Throws
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
bundleIdentifiers
the array of bundle identifiers
Batch uninstall the bundles indicated by the list of bundle identifiers
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation does not succeed
See Also
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
bundleIdentifier
the bundle identifier
Update the bundle indicated by the bundle identifier
Throws
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
bundleIdentifier
the bundle identifier
url
the URL to use to update the bundle
Update the bundle identified by the bundle identifier
Throws
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
bundleIdentifiers
the array of bundle identifiers
Batch update the bundles indicated by the list of bundle identifier.
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation does not succeed
See Also
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
bundleIdentifiers
the array of bundle identifiers
urls
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.
Returns
the resulting state from executing the operation
Throws
IOException
– if the operation does not succeed
IllegalArgumentException
– if the bundle indicated does not exist
See Also
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.
Throws
IOException
– if the operation failed
124.8.4
public interface PackageStateMBean
This MBean provides information about the package state of the framework.
Concurrency
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:
EXPORTING_BUNDLES_ITEM
IMPORTING_BUNDLES_ITEM
NAME_ITEM
REMOVAL_PENDING_ITEM
VERSION_ITEM
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
packageName
- the package name
version
- the version of the package
Answer the identifier of the bundle exporting the package
Returns
the bundle identifiers exporting such a package
Throws
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
packageName
The package name
version
The version of the package
exportingBundle
The exporting bundle for the given package
Answer the list of identifiers of the bundles importing the package
Returns
the list of bundle identifiers
Throws
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
packageName
The package name
version
The version of the package
exportingBundle
The bundle exporting the package
Answer if this package is exported by a bundle which has been updated or
uninstalled
Returns
true if this package is being exported by a bundle that has been
updated or uninstalled.
Throws
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.
Returns
the tabular representation of the package state
Throws
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.
Concurrency
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:
IDENTIFIER
OBJECT_CLASS
BUNDLE_LOCATION
BUNDLE_SYMBOLIC_NAME
EVENT
124.8.5.17
public static final CompositeType SERVICE_TYPE
The Composite Type for a CompositeData representing a service. This type
consists of:
BUNDLE_IDENTIFIER
IDENTIFIER
OBJECT_CLASS
PROPERTIES
USING_BUNDLES
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
serviceId
the identifier of the service
Answer the bundle identifier of the bundle which registered the service
Returns
the identifier for the bundle
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the service indicated does not exist
124.8.5.22
public String[] getObjectClass(long serviceId) throws IOException
serviceId
the identifier of the service
Answer the list of interfaces that this service implements
Returns
the list of interfaces
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the service indicated does not exist
124.8.5.23
public TabularData getProperties(long serviceId) throws IOException
serviceId
the identifier of the service
Answer the map of properties associated with this service.
Returns
the table of properties. These include the standard mandatory
service.id and objectClass properties as defined in the
org.osgi.framework.Constants
interface
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the service indicated does not exist
See Also
for the details of the TabularType
124.8.5.24
public CompositeData getProperty(long serviceId, String key) throws IOException
serviceId
the identifier of the service
key
the property key
Return a single property from the specified service.
Returns
a CompositeData object holding the value and data type of the
property.
Throws
IOException
– if the operation fails
See Also
for the details of the CompositeType.
124.8.5.25
public CompositeData getService(long serviceId) throws IOException
serviceId
the ID of the service to look up
Obtain information about a given service.

The result is defined by the CompositeType
SERVICE_TYPE
Returns
A CompositeData object with the service information
Throws
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.
Returns
all the service ids in the framework.
Throws
IOException
– if the operation fails
124.8.5.27
public long[] getUsingBundles(long serviceId) throws IOException
serviceId
the identifier of the service
Answer the list of identifiers of the bundles that use the service
Returns
the list of bundle identifiers
Throws
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.
Returns
the tabular representation of the service state
Throws
IOException
– If the operation fails
IllegalArgumentException
– if the service indicated does not exist
See Also
for the details of the TabularType
124.8.5.29
public TabularData listServices(String clazz, String filter) throws IOException
clazz
The class name with which the services were registered or
null
for any class name.
filter
A filter expression to match the services or
null
for no additional filter.
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.
Returns
the tabular representation of the service state
Throws
IOException
– If the operation fails
IllegalArgumentException
– if the service indicated does not exist
See Also
for the details of the TabularType
124.8.5.30
public TabularData listServices(String clazz, String filter, String... serviceTypeItems) throws IOException
clazz
The class name with which the services were registered or
null
for any class name.
filter
A filter expression to match the services or
null
for no additional filter.
serviceTypeItems
The names of the
SERVICE_TYPE
items to
include in the result. For example "objectClass" or "Properties".
Note that the result always returns the "Identifier" item since
this serves as the key in the resulting table.
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.
Returns
the tabular representation of the service state
Throws
IOException
– If the operation fails
IllegalArgumentException
– if the service indicated does not exist
See Also
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
ConfigurationAdminMBean
This MBean provides the management interface to the OSGi Configuration
Administration Service.
124.9.2
public interface ConfigurationAdminMBean
This MBean provides the management interface to the OSGi Configuration
Administration Service.
Concurrency
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
factoryPid
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
Returns
the PID of the created configuration
Throws
IOException
– if the operation failed
124.9.2.3
public String createFactoryConfigurationForLocation(String factoryPid, String location) throws IOException
factoryPid
the persistent id of the factory
location
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
Returns
the pid of the created configuation
Throws
IOException
– if the operation failed
124.9.2.4
public void delete(String pid) throws IOException
pid
the persistent identifier of the configuration
Delete the configuration
Throws
IOException
– if the operation fails
124.9.2.5
public void deleteConfigurations(String filter) throws IOException
filter
the string representation of the
org.osgi.framework.Filter
Delete the configurations matching the filter specification.
Throws
IOException
– if the operation failed
IllegalArgumentException
– if the filter is invalid
124.9.2.6
public void deleteForLocation(String pid, String location) throws IOException
pid
the persistent identifier of the configuration
location
the bundle location
Delete the configuration
Throws
IOException
– if the operation fails
124.9.2.7
public String getBundleLocation(String pid) throws IOException
pid
the persistent identifier of the configuration
Answer the bundle location the configuration is bound to
Returns
the bundle location
Throws
IOException
– if the operation fails
124.9.2.8
public String[][] getConfigurations(String filter) throws IOException
filter
the string representation of the
org.osgi.framework.Filter
Answer the list of PID/Location pairs of the configurations managed by
this service
Returns
the list of configuration PID/Location pairs
Throws
IOException
– if the operation failed
IllegalArgumentException
– if the filter is invalid
124.9.2.9
public String getFactoryPid(String pid) throws IOException
pid
the persistent identifier of the configuration
Answer the factory PID if the configuration is a factory configuration,
null otherwise.
Returns
the factory PID
Throws
IOException
– if the operation fails
124.9.2.10
public String getFactoryPidForLocation(String pid, String location) throws IOException
pid
the persistent identifier of the configuration
location
the bundle location
Answer the factory PID if the configuration is a factory configuration,
null otherwise.
Returns
the factory PID
Throws
IOException
– if the operation fails
124.9.2.11
public TabularData getProperties(String pid) throws IOException
pid
the persistent identifier of the configuration
Answer the contents of the configuration.
Returns
the table of contents
Throws
IOException
– if the operation fails
See Also
JmxConstants.PROPERTIES_TYPE for the
details of the TabularType
124.9.2.12
public TabularData getPropertiesForLocation(String pid, String location) throws IOException
pid
the persistent identifier of the configuration
location
the bundle location
Answer the contents of the configuration.
Returns
the table of contents
Throws
IOException
– if the operation fails
See Also
JmxConstants.PROPERTIES_TYPE for the
details of the TabularType
124.9.2.13
public void setBundleLocation(String pid, String location) throws IOException
pid
the persistent identifier of the configuration
location
the bundle location
Set the bundle location the configuration is bound to
Throws
IOException
– if the operation fails
124.9.2.14
public void update(String pid, TabularData properties) throws IOException
pid
the persistent identifier of the configuration
properties
the table of properties
Update the configuration with the supplied properties For each property
entry, the following row is supplied.
Throws
IOException
– if the operation fails
See Also
JmxConstants.PROPERTIES_TYPE for the
details of the TabularType
124.9.2.15
public void updateForLocation(String pid, String location, TabularData properties) throws IOException
pid
the persistent identifier of the configuration
location
the bundle location
properties
the table of properties
Update the configuration with the supplied properties For each property
entry, the following row is supplied.
Throws
IOException
– if the operation fails
See Also
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
PermissionAdminMBean
This MBean represents the OSGi Permission Manager Service
124.10.2
public interface PermissionAdminMBean
This MBean represents the OSGi Permission Manager Service
Concurrency
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
location identifying the bundle
Answer the list of encoded permissions of the bundle specified by the
bundle location
Returns
the array of String encoded permissions
Throws
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
Returns
the array of String encoded permissions
Throws
IOException
– if the operation fails
124.10.2.4
public String[] listLocations() throws IOException
Answer the bundle locations that have permissions assigned to them
Returns
the bundle locations
Throws
IOException
– if the operation fails
124.10.2.5
public void setDefaultPermissions(String[] encodedPermissions) throws IOException
encodedPermissions
the string encoded permissions
Set the default permissions assigned to bundle locations that have no
assigned permissions
Throws
IOException
– if the operation fails
124.10.2.6
public void setPermissions(String location, String[] encodedPermissions) throws IOException
location
the location of the bundle
encodedPermissions
the string encoded permissions to set
Set the permissions on the bundle specified by the bundle location
Throws
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
ProvisioningServiceMBean
This MBean represents the management interface to the OSGi Initial
Provisioning Service
124.11.2
public interface ProvisioningServiceMBean
This MBean represents the management interface to the OSGi Initial
Provisioning Service
Concurrency
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
info
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.
Throws
IOException
– if the operation fails
See Also
JmxConstants.PROPERTIES_TYPE for
details of the Tabular Data
124.11.2.3
public void addInformationFromZip(String zipURL) throws IOException
zipURL
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.
Throws
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.
Returns
The table representing the manager dictionary.
Throws
IOException
– if the operation fails
See Also
JmxConstants.PROPERTIES_TYPE for
details of the Tabular Data
124.11.2.5
public void setInformation(TabularData info) throws IOException
info
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.
Throws
IOException
– if the operation fails
See Also
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
Concurrency
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:
MEMBERS
REQUIRED_MEMBERS
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:
NAME
TYPE
PROPERTIES
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:
CREDENTIALS
124.12.2.20
public void addCredential(String key, byte[] value, String username) throws IOException
key
The key of the credential to add
value
The value of the credential to add
username
The name of the user that gets the credential.
Add credentials to a user, associated with the supplied key
Throws
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
key
The key of the credential to add
value
The value of the credential to add
username
The name of the user that gets the credential.
Add credentials to a user, associated with the supplied key
Throws
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
groupname
The group name that receives the
rolename
as
member.
rolename
The
rolename
(User or Group) that must be added.
Add a member to the group.
Returns
true
if the role was added to the group
Throws
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
key
The added property key
value
The added byte[] property value
rolename
The role name that receives the property
Add or update a property on a role.
Throws
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
key
The key of the property to add
value
The value of the property to add (
String
rolename
The role name
Add or update a property on a role
Throws
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
groupname
The group name that is addded
rolename
The role that
Add a required member to the group
Returns
true if the role was added to the group
Throws
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
Name of the group to create
Create a Group
Throws
IOException
– if the operation fails
124.12.2.27
public void createRole(String name) throws IOException
name
Ignored.
This method was specified in error and must not be used.
Throws
IOException
– This method will throw an exception if called.
Deprecated
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
Name of the user to create
Create a User
Throws
IOException
– if the operation fails
124.12.2.29
public CompositeData getAuthorization(String user) throws IOException
user
The user name
Answer the authorization for the user name.

The Composite Data is typed by
AUTORIZATION_TYPE
Returns
the Authorization typed by
AUTORIZATION_TYPE
Throws
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
username
The user name
Answer the credentials associated with a user.

The returned Tabular Data is typed by
JmxConstants.PROPERTIES_TYPE
Returns
the credentials associated with the user, see
JmxConstants.PROPERTIES_TYPE
Throws
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
groupname
The group name
Answer the Group associated with the group name.

The returned Composite Data is typed by
GROUP_TYPE
Returns
the Group, see
GROUP_TYPE
Throws
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
filter
The filter to apply
Answer the list of group names
Returns
The list of group names
Throws
IOException
– if the operation fails
124.12.2.33
public String[] getImpliedRoles(String username) throws IOException
username
The name of the user that has the implied roles
Answer the list of implied roles for a user
Returns
The list of role names
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the username is not a User
124.12.2.34
public String[] getMembers(String groupname) throws IOException
groupname
The name of the group to get the members from
Answer the the user names which are members of the group
Returns
The list of user names
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the groupname is not a Group
124.12.2.35
public TabularData getProperties(String rolename) throws IOException
rolename
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
Returns
the properties associated with the role, see
JmxConstants.PROPERTIES_TYPE
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the rolename is not a role
124.12.2.36
public String[] getRequiredMembers(String groupname) throws IOException
groupname
The name of the group to get the required members from
Answer the list of user names which are required members of this group
Returns
The list of user names
Throws
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
name
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
Returns
the Role, see
ROLE_TYPE
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the name is not a role
124.12.2.38
public String[] getRoles(String filter) throws IOException
filter
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
Returns
The list the role names
Throws
IOException
– if the operation fails
124.12.2.39
public CompositeData getUser(String username) throws IOException
username
The name of the requested user
Answer the User associated with the user name.

The returned Composite Data is typed by
USER_TYPE
Returns
The User, see
USER_TYPE
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the username is not a User
124.12.2.40
public String[] getUsers(String filter) throws IOException
filter
The filter to apply
Answer the list of user names in the User Admin database
Returns
The list of user names
Throws
IOException
– if the operation fails
124.12.2.41
public String getUserWithProperty(String key, String value) throws IOException
key
The key to compare
value
The value to compare
Answer the user name with the given property key-value pair from the User
Admin service database.
Returns
The User
Throws
IOException
– if the operation fails
124.12.2.42
public String[] listGroups() throws IOException
Answer the list of group names
Returns
The list of group names
Throws
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
Returns
The list of role names
Throws
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
Returns
The list of user names
Throws
IOException
– if the operation fails
124.12.2.45
public void removeCredential(String key, String username) throws IOException
key
The key of the credential to remove
username
The name of the user for which the credential must be
removed
Remove the credential associated with the given user
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the username is not a User
124.12.2.46
public boolean removeGroup(String name) throws IOException
name
Remove the Group associated with the name
Returns
true if the remove succeeded
Throws
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
groupname
The group name
rolename
Remove a role from the group
Returns
true if the role was removed from the group
Throws
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
key
rolename
Remove a property from a role
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the rolename is not a role
124.12.2.49
public boolean removeRole(String name) throws IOException
name
Remove the Role associated with the name
Returns
true if the remove succeeded
Throws
IOException
– if the operation fails
IllegalArgumentException
– if the name is not a role
124.12.2.50
public boolean removeUser(String name) throws IOException
name
Remove the User associated with the name
Returns
true if the remove succeeded
Throws
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
BundleWiringStateMBean
This MBean represents the bundle wiring state.
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.
Concurrency
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:
NAMESPACE
ATTRIBUTES
DIRECTIVES
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:
NAMESPACE
ATTRIBUTES
DIRECTIVES
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:
BUNDLE_REQUIREMENT
BUNDLE_CAPABILITY
PROVIDER_BUNDLE_ID
PROVIDER_BUNDLE_REVISION_ID
REQUIRER_BUNDLE_ID
REQUIRER_BUNDLE_REVISION_ID
124.13.2.15
public static final ArrayType BUNDLE_WIRES_TYPE_ARRAY
An array of
BUNDLE_WIRE_TYPE
s.
124.13.2.16
public static final CompositeType BUNDLE_WIRING_TYPE
The Composite Type that represents a bundle wiring. The composite
consists of:
BUNDLE_ID
BUNDLE_REVISION_ID
REQUIREMENTS
CAPABILITIES
REQUIRED_WIRES
PROVIDED_WIRES
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_TYPE
s.
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:
KEY
VALUE
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_TYPE
s.
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:
BUNDLE_REVISION_ID
CAPABILITIES
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:
BUNDLE_REVISION_ID
REQUIREMENTS
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
bundleId
The bundle ID.
namespace
The namespace of the capabilities to be returned by this
operation.
Returns the capabilities for the current bundle revision.
Returns
the declared capabilities for the current revision of
bundleId
and
namespace
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
for the details of the CompositeData.
124.13.2.52
public CompositeData[] getCurrentRevisionDeclaredRequirements(long bundleId, String namespace) throws IOException, JMException
bundleId
The bundle ID.
namespace
The namespace of the requirements to be returned by this
operation.
Returns the requirements for the current bundle revision.
Returns
the declared requirements for the current revision of
bundleId
and
namespace
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
for the details of the CompositeData.
124.13.2.53
public CompositeData getCurrentWiring(long bundleId, String namespace) throws IOException, JMException
bundleId
The bundle ID.
namespace
The namespace of the requirements and capabilities for
which to return information.
Returns the bundle wiring for the current bundle revision.
Returns
the wiring information for the current revision of
bundleId
and
namespace
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
for the details of the CompositeData.
124.13.2.54
public TabularData getCurrentWiringClosure(long rootBundleId, String namespace) throws IOException, JMException
rootBundleId
the root bundle of the closure.
namespace
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.
Returns
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.
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
for the details of the TabularData.
124.13.2.55
public TabularData getRevisionsDeclaredCapabilities(long bundleId, String namespace) throws IOException, JMException
bundleId
The bundle ID.
namespace
The namespace of the capabilities to be returned by this
operation.
Returns the capabilities for all revisions of the bundle.
Returns
the declared capabilities for all revisions of
bundleId
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
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
bundleId
The bundle ID.
namespace
The namespace of the requirements to be returned by this
operation.
Returns the requirements for all revisions of the bundle.
Returns
the declared requirements for all revisions of
bundleId
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
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
bundleId
The bundle ID.
namespace
The namespace of the requirements and capabilities for
which to return information.
Returns the bundle wirings for all revisions of the bundle.
Returns
the wiring information for all revisions of
bundleId
and
namespace
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
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
rootBundleId
The root bundle ID.
namespace
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.
Returns
a tabular representation of all the wirings in the closure. The
bundle revision IDs only have meaning in the context of the
current result.
Throws
JMException
– if there is a JMX problem.
IOException
– if the connection could not be made because of a
communication problem.
See Also
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
[1]
JMX
[2]
Java Management Extensions (JMX) Technology
Overview
[3]
JSR 3: Java Management Extensions
(JMX) Specification
[4]
JSR 255: Java Management Extensions (JMX)
Specification, version 2.0
[5]
JSR 160: JavaTM Management Extensions (JMX) Remote
API
[6]
JSR 262: Web Services Connector for Java Management
Extensions (JMX) Agents
[7]
JavaTM Management Extensions (JMXTM)API
Specification
[8]
Using JConsole to Monitor
Applications
Prev
Next
OSGi Specification License, Version 2.0
License Grant
No Warranties and Limitation of Liability
Covenant Not to Assert
General
Trademarks
Feedback
Introduction
1.1
Overview of Services
1.1.1
Dependency Injection Models
1.1.2
Distributed Services
1.1.3
Web Applications and HTTP Servlets
1.1.4
Asynchronous Processing and Event models
1.1.5
Management and Configuration services
1.1.6
Naming and Directory services
1.1.7
Database Access
1.1.8
Transaction Support
1.1.9
Miscellaneous Supporting Services
1.2
Application and Provisioning Support
1.3
Reader Level
1.4
Version Information
1.4.1
OSGi Core Release 7
1.4.2
Component Versions
1.4.3
Note
1.5
References
1.6
Changes
100
Remote Services
100.1
The Fallacies
100.2
Remote Service Properties
100.2.1
Registering a Service for Export
100.2.2
Getting an Imported Service
100.2.3
On Demand Import
100.3
Intents
100.3.1
Basic Remote Services: osgi.basic
100.3.2
Asynchronous Remote Services: osgi.async
100.3.3
Confidential Remote Services: osgi.confidential
100.3.4
Private Remote Services: osgi.private
100.4
General Usage
100.4.1
Call by Value
100.4.2
Data Fencing
100.4.3
Remote Services Life Cycle
100.4.4
Runtime
100.4.5
Exceptions
100.5
Configuration Types
100.5.1
Configuration Type Properties
100.5.2
Dependencies
100.6
Security
100.6.1
Limiting Exports and Imports
100.7
References
100.8
Changes
101
Log Service Specification
101.1
Introduction
101.1.1
Entities
101.2
The Logger Interface
101.3
Obtaining a Logger
101.4
Logger Configuration
101.4.1
Configuration Admin Integration
101.4.2
Effective Log Level
101.5
Log Stream Provider
101.6
Log Reader Service
101.7
Log Entry Interface
101.8
Mapping of Events
101.8.1
Bundle Events Mapping
101.8.2
Service Events Mapping
101.8.3
Framework Events Mapping
101.8.4
Log Events
101.9
Log Service
101.10
Capabilities
101.11
Security
101.12
org.osgi.service.log
101.12.1
Summary
101.12.2
public interface FormatterLogger extends Logger
101.12.3
public interface LogEntry
101.12.4
public interface Logger
101.12.5
public interface LoggerConsumer
101.12.6
public interface LoggerFactory
101.12.7
enum LogLevel
101.12.8
public interface LogListener extends EventListener
101.12.9
public interface LogReaderService
101.12.10
public interface LogService extends LoggerFactory
101.13
org.osgi.service.log.admin
101.13.1
Summary
101.13.2
public interface LoggerAdmin
101.13.3
public interface LoggerContext
101.14
org.osgi.service.log.stream
101.14.1
Summary
101.14.2
public interface LogStreamProvider
101.14.3
enum LogStreamProvider.Options
101.15
References
101.16
Changes
102
Http Service Specification
102.1
Introduction
102.1.1
Entities
102.2
Registering Servlets
102.3
Registering Resources
102.4
Mapping HTTP Requests to Servlet and Resource Registrations
102.5
The Default Http Context Object
102.6
Multipurpose Internet Mail Extension (MIME) Types
102.7
Authentication
102.8
Security
102.8.1
Accessing Resources with the Default Http Context
102.8.2
Accessing Other Types of Resources
102.8.3
Servlet and HttpContext objects
102.9
Configuration Properties
102.10
org.osgi.service.http
102.10.1
Summary
102.10.2
public interface HttpContext
102.10.3
public interface HttpService
102.10.4
public class NamespaceException extends Exception
102.11
References
104
Configuration Admin Service Specification
104.1
Introduction
104.1.1
Essentials
104.1.2
Entities
104.1.3
Synopsis
104.2
Configuration Targets
104.3
The Persistent Identity
104.3.1
PID Syntax
104.3.2
Targeted PIDs
104.3.3
Extenders and Targeted PIDs
104.4
The Configuration Object
104.4.1
Location Binding
104.4.2
Dynamic Binding
104.4.3
Configuration Properties
104.4.4
Property Propagation
104.4.5
Automatic Properties
104.4.6
Equality
104.5
Managed Service
104.5.1
Singletons
104.5.2
Networks
104.5.3
Configuring Managed Services
104.5.4
Race Conditions
104.5.5
Examples of Managed Service
104.5.6
Deletion
104.6
Managed Service Factory
104.6.1
When to Use a Managed Service Factory
104.6.2
Registration
104.6.3
Deletion
104.6.4
Managed Service Factory Example
104.6.5
Multiple Consoles Example
104.7
Configuration Admin Service
104.7.1
Creating a Managed Service Configuration Object
104.7.2
Creating a Managed Service Factory Configuration Object
104.7.3
Accessing Existing Configurations
104.7.4
Updating a Configuration
104.7.5
Using Multi-Locations
104.7.6
Regions
104.7.7
Deletion
104.7.8
Updating a Bundle's Own Configuration
104.7.9
Configuration Attributes
104.8
Configuration Events
104.8.1
Event Admin Service and Configuration Change Events
104.9
Configuration Plugin
104.9.1
Limiting The Targets
104.9.2
Example of Property Expansion
104.9.3
Configuration Data Modifications
104.9.4
Forcing a Callback
104.9.5
Calling Order
104.9.6
Manual Invocation
104.10
Meta Typing
104.11
Coordinator Support
104.12
Capabilities
104.12.1
osgi.implementation Capability
104.12.2
osgi.service Capability
104.13
Security
104.13.1
Configuration Permission
104.13.2
Permissions Summary
104.13.3
Configuration and Permission Administration
104.14
org.osgi.service.cm
104.14.1
Summary
104.14.2
Permissions
104.14.3
public interface Configuration
104.14.4
enum Configuration.ConfigurationAttribute
104.14.5
public interface ConfigurationAdmin
104.14.6
public final class ConfigurationConstants
104.14.7
public class ConfigurationEvent
104.14.8
public class ConfigurationException extends Exception
104.14.9
public interface ConfigurationListener
104.14.10
public final class ConfigurationPermission extends BasicPermission
104.14.11
public interface ConfigurationPlugin
104.14.12
public interface ManagedService
104.14.13
public interface ManagedServiceFactory
104.14.14
public class ReadOnlyConfigurationException extends RuntimeException
104.14.15
public interface SynchronousConfigurationListener extends ConfigurationListener
104.15
org.osgi.service.cm.annotations
104.15.1
Summary
104.15.2
@RequireConfigurationAdmin
104.16
Changes
105
Metatype Service Specification
105.1
Introduction
105.1.1
Essentials
105.1.2
Entities
105.1.3
Operation
105.2
Attributes Model
105.3
Object Class Definition
105.4
Attribute Definition
105.5
Meta Type Service
105.6
Meta Type Provider Service
105.7
Using the Meta Type Resources
105.7.1
XML Schema of a Meta Type Resource
105.7.2
Designate Element
105.7.3
Example Metadata File
105.7.4
Object Element
105.8
Meta Type Resource XML Schema
105.9
Meta Type Annotations
105.9.1
ObjectClassDefinition Annotation
105.9.2
AttributeDefinition Annotation
105.9.3
Designate Annotation
105.10
Limitations
105.11
Related Standards
105.12
Capabilities
105.13
Security Considerations
105.14
org.osgi.service.metatype
105.14.1
Summary
105.14.2
public interface AttributeDefinition
105.14.3
public interface MetaTypeInformation extends MetaTypeProvider
105.14.4
public interface MetaTypeProvider
105.14.5
public interface MetaTypeService
105.14.6
public interface ObjectClassDefinition
105.15
org.osgi.service.metatype.annotations
105.15.1
Summary
105.15.2
@AttributeDefinition
105.15.3
enum AttributeType
105.15.4
@Designate
105.15.5
@Icon
105.15.6
@ObjectClassDefinition
105.15.7
@Option
105.15.8
@RequireMetaTypeExtender
105.15.9
@RequireMetaTypeImplementation
105.16
References
105.17
Changes
107
User Admin Service Specification
107.1
Introduction
107.1.1
Essentials
107.1.2
Entities
107.1.3
Operation
107.2
Authentication
107.2.1
Repository
107.2.2
Basic Authentication
107.2.3
Certificates
107.3
Authorization
107.3.1
The Authorization Object
107.3.2
Authorization Example
107.4
Repository Maintenance
107.5
User Admin Events
107.5.1
Event Admin and User Admin Change Events
107.6
Security
107.6.1
User Admin Permission
107.7
Relation to JAAS
107.7.1
JDK 1.3 Dependencies
107.7.2
Existing OSGi Mechanism
107.7.3
Future Road Map
107.8
org.osgi.service.useradmin
107.8.1
Summary
107.8.2
public interface Authorization
107.8.3
public interface Group extends User
107.8.4
public interface Role
107.8.5
public interface User extends Role
107.8.6
public interface UserAdmin
107.8.7
public class UserAdminEvent
107.8.8
public interface UserAdminListener
107.8.9
public final class UserAdminPermission extends BasicPermission
107.9
References
110
Initial Provisioning Specification
110.1
Introduction
110.1.1
Essentials
110.1.2
Entities
110.2
Procedure
110.2.1
InitialProvisioning-Entries Manifest Header
110.3
Special Configurations
110.3.1
Branded OSGi framework Server
110.3.2
Non-connected OSGi framework
110.4
The Provisioning Service
110.5
Management Agent Environment
110.6
Mapping To File Scheme
110.6.1
Example With File Scheme
110.7
Mapping To HTTP(S) Scheme
110.7.1
HTTPS Certificates
110.7.2
Certificate Encoding
110.7.3
URL Encoding
110.8
Mapping To RSH Scheme
110.8.1
Shared Secret
110.8.2
Request Coding
110.8.3
Response Coding
110.8.4
RSH URL
110.8.5
Extensions to the Provisioning Service Dictionary
110.8.6
RSH Transport
110.9
Exception Handling
110.10
Security
110.10.1
Concerns
110.10.2
OSGi framework Long-Term Security
110.10.3
Permissions
110.11
org.osgi.service.provisioning
110.11.1
Summary
110.11.2
public interface ProvisioningService
110.12
References
112
Declarative Services Specification
112.1
Introduction
112.1.1
Essentials
112.1.2
Entities
112.1.3
Synopsis
112.1.4
Readers
112.2
Components
112.2.1
Declaring a Component
112.2.2
Immediate Component
112.2.3
Delayed Component
112.2.4
Factory Component
112.3
References to Services
112.3.1
Accessing Services
112.3.2
Method Injection
112.3.3
Field Injection
112.3.4
Constructor Injection
112.3.5
Reference Cardinality
112.3.6
Reference Scope
112.3.7
Reference Policy
112.3.8
Reference Policy Option
112.3.9
Reference Field Option
112.3.10
Selecting Target Services
112.3.11
Circular References
112.3.12
Logger Support
112.4
Component Description
112.4.1
Annotations
112.4.2
Service Component Header
112.4.3
XML Document
112.4.4
Component Element
112.4.5
Implementation Element
112.4.6
Property and Properties Elements
112.4.7
Service Element
112.4.8
Reference Element
112.4.9
Factory Property and Factory Properties Elements
112.5
Component Life Cycle
112.5.1
Enabled
112.5.2
Satisfied
112.5.3
Immediate Component
112.5.4
Delayed Component
112.5.5
Factory Component
112.5.6
Activation
112.5.7
Bound Services
112.5.8
Component Context
112.5.9
Activation Objects
112.5.10
Binding Services
112.5.11
Activate Method
112.5.12
Bound Service Replacement
112.5.13
Updated
112.5.14
Modification
112.5.15
Modified Method
112.5.16
Deactivation
112.5.17
Deactivate Method
112.5.18
Unbinding
112.5.19
Life Cycle Example
112.6
Component Properties
112.6.1
Service Properties
112.6.2
Reference Properties
112.7
Deployment
112.7.1
Configuration Changes
112.8
Annotations
112.8.1
Component Annotations
112.8.2
Component Property Types
112.8.3
Ordering of Generated Component Properties
112.9
Service Component Runtime
112.9.1
Relationship to OSGi Framework
112.9.2
Starting and Stopping SCR
112.9.3
Logging Messages
112.9.4
Locating Component Methods and Fields
112.9.5
Bundle Activator Interaction
112.9.6
Introspection
112.9.7
Capabilities
112.10
Security
112.10.1
Service Permissions
112.10.2
Required Admin Permission
112.10.3
Using hasPermission
112.10.4
Configuration Multi-Locations and Regions
112.11
Component Description Schema
112.12
org.osgi.service.component
112.12.1
Summary
112.12.2
public interface ComponentConstants
112.12.3
public interface ComponentContext
112.12.4
public class ComponentException extends RuntimeException
112.12.5
public interface ComponentFactory
112.12.6
public interface ComponentInstance
112.12.7
public interface ComponentServiceObjects
112.13
org.osgi.service.component.annotations
112.13.1
Summary
112.13.2
@Activate
112.13.3
enum CollectionType
112.13.4
@Component
112.13.5
@ComponentPropertyType
112.13.6
enum ConfigurationPolicy
112.13.7
@Deactivate
112.13.8
enum FieldOption
112.13.9
@Modified
112.13.10
@Reference
112.13.11
enum ReferenceCardinality
112.13.12
enum ReferencePolicy
112.13.13
enum ReferencePolicyOption
112.13.14
enum ReferenceScope
112.13.15
@RequireServiceComponentRuntime
112.13.16
enum ServiceScope
112.14
org.osgi.service.component.runtime
112.14.1
Summary
112.14.2
public interface ServiceComponentRuntime
112.15
org.osgi.service.component.runtime.dto
112.15.1
Summary
112.15.2
public class ComponentConfigurationDTO extends DTO
112.15.3
public class ComponentDescriptionDTO extends DTO
112.15.4
public class ReferenceDTO extends DTO
112.15.5
public class SatisfiedReferenceDTO extends DTO
112.15.6
public class UnsatisfiedReferenceDTO extends DTO
112.16
org.osgi.service.component.propertytypes
112.16.1
Summary
112.16.2
@ExportedService
112.16.3
@ServiceDescription
112.16.4
@ServiceRanking
112.16.5
@ServiceVendor
112.17
References
112.18
Changes
113
Event Admin Service Specification
113.1
Introduction
113.1.1
Essentials
113.1.2
Entities
113.1.3
Synopsis
113.1.4
What To Read
113.2
Event Admin Architecture
113.3
The Event
113.3.1
Topics
113.3.2
Properties
113.3.3
High Performance
113.4
Event Handler
113.4.1
Ordering
113.5
Event Publisher
113.6
Specific Events
113.6.1
General Conventions
113.6.2
OSGi Events
113.6.3
Framework Event
113.6.4
Bundle Event
113.6.5
Service Event
113.6.6
Other Event Sources
113.7
Event Admin Service
113.7.1
Synchronous Event Delivery
113.7.2
Asynchronous Event Delivery
113.7.3
Order of Event Delivery
113.8
Reliability
113.8.1
Exceptions in callbacks
113.8.2
Dealing with Stalled Handlers
113.9
Interoperability with Native Applications
113.10
Capabilities
113.10.1
osgi.implementation Capability
113.10.2
osgi.service Capability
113.11
Security
113.11.1
Topic Permission
113.11.2
Required Permissions
113.11.3
Security Context During Event Callbacks
113.12
org.osgi.service.event
113.12.1
Summary
113.12.2
public class Event
113.12.3
public interface EventAdmin
113.12.4
public interface EventConstants
113.12.5
public interface EventHandler
113.12.6
public class EventProperties implements Map
113.12.7
public final class TopicPermission extends Permission
113.13
org.osgi.service.event.annotations
113.13.1
Summary
113.13.2
@RequireEventAdmin
113.14
org.osgi.service.event.propertytypes
113.14.1
Summary
113.14.2
@EventDelivery
113.14.3
@EventFilter
113.14.4
@EventTopics
113.15
Changes
122
Remote Service Admin Service Specification
122.1
Introduction
122.1.1
Essentials
122.1.2
Entities
122.1.3
Synopsis
122.2
Actors
122.3
Topology Managers
122.3.1
Multiple Topology Managers
122.3.2
Example Use Cases
122.4
Endpoint Description
122.4.1
Validity
122.4.2
Mutability
122.4.3
Endpoint Id
122.4.4
Framework UUID
122.4.5
Resource Containment
122.5
Remote Service Admin
122.5.1
Exporting
122.5.2
Importing
122.5.3
Updates
122.5.4
Reflection
122.5.5
Registration Life Cycle
122.5.6
Invalid Registrations
122.5.7
Proxying
122.6
Discovery
122.6.1
Scope and Filters
122.6.2
Endpoint Event Listener Interface
122.6.3
Endpoint Listener Interface
122.6.4
Endpoint Event Listener and Endpoint Listener
Implementations
122.6.5
Endpoint Description Providers
122.6.6
On Demand
122.7
Events
122.7.1
Event Admin Mapping
122.8
Endpoint Description Extender Format
122.8.1
XML Schema
122.9
Capability Namespaces
122.9.1
Local Discovery Extender
122.9.2
Discovery Provider Capability
122.9.3
Distribution Provider Capability
122.9.4
Topology Manager Capability
122.9.5
Service Capability
122.10
Advice to implementations
122.10.1
Notifying listeners
122.10.2
Receiving Endpoint lifecycle notifications
122.11
Security
122.11.1
Import and Export Registrations
122.11.2
Endpoint Permission
122.12
org.osgi.service.remoteserviceadmin
122.12.1
Summary
122.12.2
public class EndpointDescription
122.12.3
public class EndpointEvent
122.12.4
public interface EndpointEventListener
122.12.5
public interface EndpointListener
122.12.6
public final class EndpointPermission extends Permission
122.12.7
public interface ExportReference
122.12.8
public interface ExportRegistration
122.12.9
public interface ImportReference
122.12.10
public interface ImportRegistration
122.12.11
public class RemoteConstants
122.12.12
public interface RemoteServiceAdmin
122.12.13
public class RemoteServiceAdminEvent
122.12.14
public interface RemoteServiceAdminListener
122.13
org.osgi.service.remoteserviceadmin.namespace
122.13.1
Summary
122.13.2
public final class DiscoveryNamespace extends Namespace
122.13.3
public final class DistributionNamespace extends Namespace
122.13.4
public final class TopologyNamespace extends Namespace
122.14
References
123
JTA Transaction Services Specification
123.1
Introduction
123.1.1
Essentials
123.1.2
Entities
123.1.3
Dependencies
123.1.4
Synopsis
123.2
JTA Overview
123.2.1
Global and Local Transactions
123.2.2
Durable Resource
123.2.3
Volatile Resource
123.2.4
Threading
123.3
Application
123.3.1
No Enlistment
123.3.2
Application Bundle Enlistment
123.3.3
Container Managed Enlistment
123.4
Resource Managers
123.5
The JTA Provider
123.5.1
User Transaction
123.5.2
Transaction Manager
123.5.3
Transaction Synchronization Service
123.6
Life Cycle
123.6.1
JTA Provider
123.6.2
Application Bundles
123.6.3
Error Handling
123.7
Security
123.8
References
124
Management Model Specification for JMX™ Technology
124.1
Introduction
124.1.1
Essentials
124.1.2
Entities
124.1.3
Synopsis
124.2
JMX Overview
124.2.1
Connectors and Adapters
124.2.2
Object Name
124.2.3
MBeans
124.2.4
Open Types
124.3
OSGi JMX Management
124.3.1
Naming
124.3.2
Object Naming
124.3.3
The MBean Server
124.3.4
Registrations
124.4
MBeans
124.5
Item
124.6
Security
124.7
org.osgi.jmx
124.7.1
Summary
124.7.2
public class Item
124.7.3
public class JmxConstants
124.8
org.osgi.jmx.framework
124.8.1
Summary
124.8.2
public interface BundleStateMBean
124.8.3
public interface FrameworkMBean
124.8.4
public interface PackageStateMBean
124.8.5
public interface ServiceStateMBean
124.9
org.osgi.jmx.service.cm
124.9.1
Summary
124.9.2
public interface ConfigurationAdminMBean
124.10
org.osgi.jmx.service.permissionadmin
124.10.1
Summary
124.10.2
public interface PermissionAdminMBean
124.11
org.osgi.jmx.service.provisioning
124.11.1
Summary
124.11.2
public interface ProvisioningServiceMBean
124.12
org.osgi.jmx.service.useradmin
124.12.1
Summary
124.12.2
public interface UserAdminMBean
124.13
org.osgi.jmx.framework.wiring
124.13.1
Summary
124.13.2
public interface BundleWiringStateMBean
124.14
References
125
Data Service Specification for JDBC™ Technology
125.1
Introduction
125.1.1
Essentials
125.1.2
Entities
125.1.3
Dependencies
125.1.4
Synopsis
125.2
Database Driver
125.2.1
Life Cycle
125.2.2
Package Dependencies
125.3
Applications
125.3.1
Selecting the Data Source Factory Service
125.3.2
Using Database Drivers
125.3.3
Using JDBC in OSGi and Containers
125.4
Security
125.5
org.osgi.service.jdbc
125.5.1
Summary
125.5.2
public interface DataSourceFactory
125.6
References
126
JNDI Services Specification
126.1
Introduction
126.1.1
Essentials
126.1.2
Entities
126.1.3
Dependencies
126.1.4
Synopsis
126.2
JNDI Overview
126.2.1
Context and Dir Context
126.2.2
Initial Context
126.2.3
URL Context Factory
126.2.4
Object and Reference Conversion
126.2.5
Environment
126.2.6
Naming Manager Singletons
126.2.7
Built-In JNDI Providers
126.3
JNDI Context Manager Service
126.3.1
Environment and Bundles
126.3.2
Context Creation
126.3.3
Rebinding
126.3.4
Life Cycle and Dynamism
126.4
JNDI Provider Admin service
126.5
JNDI Providers
126.5.1
Initial Context Factory Builder Provider
126.5.2
Initial Context Factory Provider
126.5.3
Object Factory Builder Provider
126.5.4
Object Factory Provider
126.5.5
URL Context Provider
126.5.6
JRE Context Providers
126.6
OSGi URL Scheme
126.6.1
Service Proxies
126.6.2
Services and State
126.7
Traditional Client Model
126.7.1
New Initial Context
126.7.2
Static Conversion
126.7.3
Caller's Bundle Context
126.7.4
Life Cycle Mismatch
126.8
Security
126.8.1
JNDI Implementation
126.8.2
JNDI Clients
126.8.3
OSGi URL namespace
126.9
org.osgi.service.jndi
126.9.1
Summary
126.9.2
public class JNDIConstants
126.9.3
public interface JNDIContextManager
126.9.4
public interface JNDIProviderAdmin
126.10
References
127
JPA Service Specification
127.1
Introduction
127.1.1
Essentials
127.1.2
Entities
127.1.3
Dependencies
127.1.4
Synopsis
127.2
JPA Overview
127.2.1
Persistence
127.2.2
JPA Provider
127.2.3
Managed and Unmanaged
127.2.4
JDBC Access in JPA
127.3
Bundles with Persistence
127.3.1
Services
127.3.2
Persistence Bundle
127.3.3
Client Bundles
127.3.4
Custom Configured Entity Manager
127.4
Extending a Persistence Bundle
127.4.1
Class Space Consistency
127.4.2
Meta Persistence Header
127.4.3
Processing
127.4.4
Ready Phase
127.4.5
Service Registrations
127.4.6
Registering the Entity Manager Factory Builder Service
127.4.7
Registering the Entity Manager Factory
127.4.8
Stopping
127.4.9
Entity Manager Factory Life Cycle
127.5
JPA Provider
127.5.1
Managed Model
127.5.2
Database Access
127.5.3
Data Source Factory Service Matching
127.5.4
Rebinding
127.5.5
Enhancing Entity Classes
127.5.6
Class Loading
127.5.7
Validation
127.6
Static Access
127.6.1
Access
127.7
Capabilities
127.7.1
The Extender Capability
127.7.2
The JPA Contract Capability
127.7.3
Service capabilities
127.8
Security
127.8.1
Service Permissions
127.8.2
Required Admin Permission
127.9
org.osgi.service.jpa
127.9.1
Summary
127.9.2
public interface EntityManagerFactoryBuilder
127.10
org.osgi.service.jpa.annotations
127.10.1
Summary
127.10.2
@RequireJPAExtender
127.11
References
127.12
Changes
128
Web Applications Specification
128.1
Introduction
128.1.1
Essentials
128.1.2
Entities
128.1.3
Dependencies
128.1.4
Synopsis
128.2
Web Container
128.3
Web Application Bundle
128.3.1
WAB Definition
128.3.2
Starting the Web Application Bundle
128.3.3
Failure
128.3.4
Publishing the Servlet Context
128.3.5
Static Content
128.3.6
Dynamic Content
128.3.7
Content Serving Example
128.3.8
Stopping the Web Application Bundle
128.3.9
Uninstalling the Web Application Bundle
128.3.10
Stopping of the Web Extender
128.4
Web URL Handler
128.4.1
URL Scheme
128.4.2
URL Parsing
128.4.3
URL Parameters
128.4.4
WAB Modification
128.4.5
WAR Manifest Processing
128.4.6
Signed WAR files
128.5
Events
128.6
Interacting with the OSGi Environment
128.6.1
Bundle Context Access
128.6.2
Other Component Models
128.6.3
Resource Lookup
128.6.4
Resource Injection and Annotations
128.6.5
Java Server Pages Support
128.6.6
Compilation
128.7
Security
128.8
References
130
Coordinator Service Specification
130.1
Introduction
130.1.1
Essentials
130.1.2
Entities
130.2
Usage
130.2.1
Synopsis
130.2.2
Explicit Coordination
130.2.3
Multi Threading
130.2.4
Implicit Coordinations
130.2.5
Partial Ending
130.2.6
Locking
130.2.7
Failing
130.2.8
Time-out
130.2.9
Joining
130.2.10
Variables
130.2.11
Optimizing Example
130.2.12
Security Example
130.3
Coordinator Service
130.3.1
Coordination Creation
130.3.2
Adding Participants
130.3.3
Active
130.3.4
Explicit and Implicit Models
130.3.5
Termination
130.3.6
Ending
130.3.7
Failing, TIMEOUT, ORPHANED, and RELEASED
130.3.8
Nesting Implicit Coordinations
130.3.9
Time-outs
130.3.10
Released
130.3.11
Coordinator Convenience Methods
130.3.12
Administrative Access
130.3.13
Summary
130.4
Security
130.5
org.osgi.service.coordinator
130.5.1
Summary
130.5.2
public interface Coordination
130.5.3
public class CoordinationException extends RuntimeException
130.5.4
public final class CoordinationPermission extends BasicPermission
130.5.5
public interface Coordinator
130.5.6
public interface Participant
132
Repository Service Specification
132.1
Introduction
132.1.1
Essentials
132.1.2
Entities
132.1.3
Synopsis
132.2
Using a Repository
132.2.1
Combining Requirements
132.3
Repository
132.3.1
Repository Content
132.4
osgi.content Namespace
132.5
XML Repository Format
132.5.1
Repository Element
132.5.2
Referral Element
132.5.3
Resource Element
132.5.4
Capability Element
132.5.5
Requirement Element
132.5.6
Attribute Element
132.5.7
Directive Element
132.5.8
Sample XML File
132.6
XML Repository Schema
132.7
Capabilities
132.7.1
osgi.implementation Capability
132.7.2
osgi.service Capability
132.8
Security
132.8.1
External Access
132.8.2
Permissions
132.9
org.osgi.service.repository
132.9.1
Summary
132.9.2
public interface AndExpression extends RequirementExpression
132.9.3
public final class ContentNamespace extends Namespace
132.9.4
public interface ExpressionCombiner
132.9.5
public interface IdentityExpression extends RequirementExpression
132.9.6
public interface NotExpression extends RequirementExpression
132.9.7
public interface OrExpression extends RequirementExpression
132.9.8
public interface Repository
132.9.9
public interface RepositoryContent
132.9.10
public interface RequirementBuilder
132.9.11
public interface RequirementExpression
132.10
References
132.11
Changes
133
Service Loader Mediator Specification
133.1
Introduction
133.1.1
Essentials
133.1.2
Entities
133.1.3
Synopsis
133.2
Java Service Loader API
133.3
Consumers
133.3.1
Processing
133.3.2
Opting In
133.3.3
Restricting Visibility
133.3.4
Life Cycle Impedance Mismatch
133.3.5
Consumer Example
133.4
Service Provider Bundles
133.4.1
Advertising
133.4.2
Publishing the Service Providers
133.4.3
OSGi Services
133.4.4
Service Provider Example
133.5
Service Loader Mediator
133.5.1
Registering Services
133.5.2
OSGi Service Factory
133.5.3
Service Loader and Modularity
133.5.4
Processing Consumers
133.5.5
Visibility
133.5.6
Life Cycle
133.6
osgi.serviceloader Namespace
133.7
Use of the osgi.extender Namespace
133.8
Security
133.8.1
Mediator
133.8.2
Consumers
133.8.3
Service Providers
133.9
org.osgi.service.serviceloader
133.9.1
Summary
133.9.2
public final class ServiceLoaderNamespace extends Namespace
133.10
References
134
Subsystem Service Specification
134.1
Introduction
134.1.1
Essentials
134.1.2
Entities
134.1.3
Synopsis
134.2
Subsystems
134.2.1
Subsystem Manifest Headers
134.2.2
Subsystem Identifiers and Type
134.2.3
Subsystem-SymbolicName Header
134.2.4
Subsystem-Version Header
134.2.5
Subsystem-Type Header
134.2.6
Deriving the Subsystem Identity
134.2.7
Subsystem Identity Capability
134.2.8
Subsystem-Localization Header
134.3
Subsystem Region
134.4
Subsystem Relationships
134.4.1
Prevent Cycles and Recursion
134.5
Determining Content
134.5.1
Subsystem-Content Header
134.5.2
Subsystem-Content Requirements
134.5.3
Preferred-Provider Header
134.5.4
Resource Repositories
134.5.5
Discovering Content Resources
134.6
Determining Dependencies
134.7
Accepting Dependencies
134.8
Sharing Capabilities
134.8.1
Preferred Provider
134.8.2
System Capabilities
134.9
Region Context Bundle
134.10
Explicit and Implicit Resources
134.10.1
Explicit Resources
134.10.2
Explicit Resource Example
134.11
Resource References
134.11.1
Reference Count
134.12
Starting and Stopping Resources
134.12.1
Start Order
134.12.2
Active Use Count
134.13
Subsystem Service
134.13.1
Root Subsystem
134.13.2
Subsystem Service Properties
134.13.3
Subsystem States
134.13.4
Subsystem Service Registrations
134.13.5
Subsystem Manifest Headers
134.14
Subsystem Life Cycle
134.14.1
Installing
134.14.2
Resolving
134.14.3
Starting
134.14.4
Stopping
134.14.5
Uninstalling
134.15
Pre-Calculated Deployment
134.15.1
Deployment Headers
134.15.2
Validating Subsystem Identity
134.15.3
Deployed-Content
134.15.4
Provision-Resource
134.15.5
Import-Package
134.15.6
Export-Package
134.15.7
Require-Bundle
134.15.8
Services
134.15.9
Subsystem-ImportService
134.15.10
Subsystem-ExportService
134.16
Subsystem Types
134.16.1
Application
134.16.2
Application Deployment
134.16.3
Composite
134.16.4
Feature
134.17
Weaving Hooks
134.18
Stopping and Uninstalling Subsystems Implementation
134.19
Capabilities
134.20
Security
134.20.1
Subsystem Permission
134.20.2
Actions
134.20.3
Required Permissions
134.21
org.osgi.service.subsystem
134.21.1
Summary
134.21.2
public interface Subsystem
134.21.3
enum Subsystem.State
134.21.4
public class SubsystemConstants
134.21.5
public class SubsystemException extends RuntimeException
134.21.6
public final class SubsystemPermission extends BasicPermission
134.22
References
135
Common Namespaces Specification
135.1
Introduction
135.1.1
Versioning
135.2
osgi.extender Namespace
135.2.1
Extenders and Framework Hooks
135.3
osgi.contract Namespace
135.3.1
Versioning
135.4
osgi.service Namespace
135.4.1
Versioning
135.5
osgi.implementation Namespace
135.6
osgi.unresolvable Namespace
135.7
org.osgi.namespace.contract
135.7.1
Summary
135.7.2
public final class ContractNamespace extends Namespace
135.8
org.osgi.namespace.extender
135.8.1
Summary
135.8.2
public final class ExtenderNamespace extends Namespace
135.9
org.osgi.namespace.service
135.9.1
Summary
135.9.2
public final class ServiceNamespace extends Namespace
135.10
org.osgi.namespace.implementation
135.10.1
Summary
135.10.2
public final class ImplementationNamespace extends Namespace
135.11
org.osgi.namespace.unresolvable
135.11.1
Summary
135.11.2
public final class UnresolvableNamespace extends Namespace
135.12
References
135.13
Changes
137
REST Management Service Specification
137.1
Introduction
137.1.1
Essentials
137.1.2
Entities
137.1.3
Synopsis
137.2
Interacting with the REST Management Service
137.2.1
Resource Identifier Overview
137.2.2
Filtering Results
137.2.3
Content Type Matching
137.3
Resources
137.3.1
Framework Startlevel Resource
137.3.2
Bundles Resource
137.3.3
Bundles Representations Resource
137.3.4
Bundle Resource
137.3.5
Bundle State Resource
137.3.6
Bundle Header Resource
137.3.7
Bundle Startlevel Resource
137.3.8
Services Resource
137.3.9
Services Representations Resource
137.3.10
Service Resource
137.4
Representations
137.4.1
Bundle Representation
137.4.2
Bundles Representations
137.4.3
Bundle State Representation
137.4.4
Bundle Header Representation
137.4.5
Framework Startlevel Representation
137.4.6
Bundle Startlevel Representation
137.4.7
Service Representation
137.4.8
Services Representations
137.4.9
Bundle Exception Representation
137.5
Clients
137.5.1
Java Client
137.5.2
JavaScript Client
137.6
Extending the REST Management Service
137.6.1
Extensions Resource
137.6.2
Extensions Representation
137.7
XML Schema
137.8
Capabilities
137.8.1
osgi.implementation Capability
137.8.2
osgi.service Capability
137.9
Security
137.10
org.osgi.service.rest
137.10.1
Summary
137.10.2
public interface RestApiExtension
137.11
org.osgi.service.rest.client
137.11.1
Summary
137.11.2
public interface RestClient
137.11.3
public interface RestClientFactory
137.12
JavaScript Client API
137.12.1
Summary
137.12.2
interface OSGiRestClient
137.12.3
callback interface OSGiRestCallback
137.13
References
138
Asynchronous Service Specification
138.1
Introduction
138.1.1
Essentials
138.1.2
Entities
138.2
Usage
138.2.1
Synopsis
138.2.2
Making Async Invocations
138.2.3
Async Invocations of Void Methods
138.2.4
Fire and Forget Calls
138.2.5
Multi Threading
138.3
Async Service
138.3.1
Using the Async Service
138.3.2
Asynchronous Failures
138.3.3
Thread Safety and Instance Sharing
138.3.4
Service Object Lifecycle Management
138.4
The Async Mediator
138.4.1
Building the Mediator Object
138.4.2
Async Mediator Behaviors
138.4.3
Thread Safety and Instance Sharing
138.5
Fire and Forget Invocations
138.6
Delegating to Asynchronous Implementations
138.6.1
Obtaining a Promise from an Async Delegate
138.6.2
Delegating Fire and Forget Calls to an Async Delegate
138.6.3
Lifecycle for Service Objects When Delegating
138.7
Capabilities
138.8
Security
138.9
org.osgi.service.async
138.9.1
Summary
138.9.2
public interface Async
138.10
org.osgi.service.async.delegate
138.10.1
Summary
138.10.2
public interface AsyncDelegate
140
Http Whiteboard Specification
140.1
Introduction
140.1.1
Entities
140.2
The Servlet Context
140.2.1
String getMimeType(String)
140.2.2
String getRealPath(String)
140.2.3
URL getResource(String)
140.2.4
Set getResourcePaths(String)
140.2.5
Security Handling
140.2.6
Behavior of the Servlet Context
140.2.7
Relation to the Servlet Container
140.3
Common Whiteboard Properties
140.4
Registering Servlets
140.4.1
Multipart File Upload
140.4.2
Error Pages
140.4.3
Asynchronous Request Handling
140.4.4
Annotations
140.5
Registering Servlet Filters
140.5.1
Servlet Pre-Processors
140.6
Registering Resources
140.6.1
Overlapping Resource and Servlet Registrations
140.7
Registering Listeners
140.8
Life Cycle
140.8.1
Whiteboard Service Dynamics and Active Requests
140.9
The Http Service Runtime Service
140.10
Integration with Http Service Contexts
140.11
Configuration Properties
140.12
Capabilities
140.12.1
osgi.implementation Capability
140.12.2
osgi.contract Capability
140.12.3
osgi.service Capability
140.13
Security
140.13.1
Service Permissions
140.13.2
Introspection
140.13.3
Accessing Resources with the Default Servlet Context Helper
Implementation
140.13.4
Accessing Other Types of Resources
140.13.5
Calling Http Whiteboard Services
140.13.6
Multipart Upload
140.14
org.osgi.service.http.context
140.14.1
Summary
140.14.2
public abstract class ServletContextHelper
140.15
org.osgi.service.http.runtime
140.15.1
Summary
140.15.2
public interface HttpServiceRuntime
140.15.3
public final class HttpServiceRuntimeConstants
140.16
org.osgi.service.http.runtime.dto
140.16.1
Summary
140.16.2
public abstract class BaseServletDTO extends DTO
140.16.3
public final class DTOConstants
140.16.4
public class ErrorPageDTO extends BaseServletDTO
140.16.5
public class FailedErrorPageDTO extends ErrorPageDTO
140.16.6
public class FailedFilterDTO extends FilterDTO
140.16.7
public class FailedListenerDTO extends ListenerDTO
140.16.8
public class FailedPreprocessorDTO extends PreprocessorDTO
140.16.9
public class FailedResourceDTO extends ResourceDTO
140.16.10
public class FailedServletContextDTO extends ServletContextDTO
140.16.11
public class FailedServletDTO extends ServletDTO
140.16.12
public class FilterDTO extends DTO
140.16.13
public class ListenerDTO extends DTO
140.16.14
public class PreprocessorDTO extends DTO
140.16.15
public class RequestInfoDTO extends DTO
140.16.16
public class ResourceDTO extends DTO
140.16.17
public class RuntimeDTO extends DTO
140.16.18
public class ServletContextDTO extends DTO
140.16.19
public class ServletDTO extends BaseServletDTO
140.17
org.osgi.service.http.whiteboard
140.17.1
Summary
140.17.2
public final class HttpWhiteboardConstants
140.17.3
public interface Preprocessor extends Filter
140.18
org.osgi.service.http.whiteboard.annotations
140.18.1
Summary
140.18.2
@RequireHttpWhiteboard
140.19
org.osgi.service.http.whiteboard.propertytypes
140.19.1
Summary
140.19.2
@HttpWhiteboardContext
140.19.3
@HttpWhiteboardContextSelect
140.19.4
@HttpWhiteboardFilterAsyncSupported
140.19.5
@HttpWhiteboardFilterDispatcher
140.19.6
@HttpWhiteboardFilterName
140.19.7
@HttpWhiteboardFilterPattern
140.19.8
@HttpWhiteboardFilterRegex
140.19.9
@HttpWhiteboardFilterServlet
140.19.10
@HttpWhiteboardListener
140.19.11
@HttpWhiteboardResource
140.19.12
@HttpWhiteboardServletAsyncSupported
140.19.13
@HttpWhiteboardServletErrorPage
140.19.14
@HttpWhiteboardServletMultipart
140.19.15
@HttpWhiteboardServletName
140.19.16
@HttpWhiteboardServletPattern
140.19.17
@HttpWhiteboardTarget
140.20
References
140.21
Changes
147
Transaction Control Service Specification
147.1
Introduction
147.1.1
Essentials
147.1.2
Entities
147.2
Usage
147.2.1
Synopsis
147.2.2
Running Scoped Work
147.2.3
Accessing Scoped Resources
147.2.4
Exception Management
147.2.5
Multi Threading
147.3
Transaction Control Service
147.3.1
Scope Life Cycle
147.3.2
Scopes and Exception Management
147.3.3
Transaction Scope lifecycle
147.4
The TransactionContext
147.4.1
Transaction Lifecycle callbacks
147.4.2
Scoped variables
147.4.3
Transaction Key
147.4.4
The Transaction Status
147.4.5
Local Transaction scopes
147.4.6
XA Transaction scopes
147.5
Resource Providers
147.5.1
Generic Resource Providers
147.5.2
JDBC Resource Providers
147.5.3
JPA
147.5.4
Connection Pooling
147.6
Transaction Recovery
147.6.1
Enlisting a Recoverable Resource in a Transaction
147.6.2
Providing an XAResource for Recovery
147.6.3
Identifying implementations which support recovery
147.7
Capabilities
147.8
Security
147.9
org.osgi.service.transaction.control
147.9.1
Summary
147.9.2
public interface LocalResource
147.9.3
public interface ResourceProvider
147.9.4
public class ScopedWorkException extends RuntimeException
147.9.5
public abstract class TransactionBuilder implements TransactionStarter
147.9.6
public interface TransactionContext
147.9.7
public interface TransactionControl extends TransactionStarter
147.9.8
public class TransactionException extends RuntimeException
147.9.9
public class TransactionRolledBackException extends TransactionException
147.9.10
public interface TransactionStarter
147.9.11
enum TransactionStatus
147.10
org.osgi.service.transaction.control.jdbc
147.10.1
Summary
147.10.2
public interface JDBCConnectionProvider extends ResourceProvider
147.10.3
public interface JDBCConnectionProviderFactory
147.11
org.osgi.service.transaction.control.jpa
147.11.1
Summary
147.11.2
public interface JPAEntityManagerProvider extends ResourceProvider
147.11.3
public interface JPAEntityManagerProviderFactory
147.12
org.osgi.service.transaction.control.recovery
147.12.1
Summary
147.12.2
public interface RecoverableXAResource
148
Cluster Information Specification
148.1
Introduction
148.1.1
Essentials
148.1.2
Entities
148.2
OSGi frameworks in a cluster
148.3
Node Status Service
148.4
Framework Node Status Service
148.5
Application-specific Node Status metadata
148.6
Security
148.6.1
Cluster Tag Permission
148.6.2
Required Permissions
148.6.3
Remote service visibility in a cluster
148.7
org.osgi.service.clusterinfo
148.7.1
Summary
148.7.2
public final class ClusterTagPermission extends Permission
148.7.3
public interface FrameworkManager
148.7.4
public interface FrameworkNodeStatus extends NodeStatus, FrameworkManager
148.7.5
public interface NodeStatus
148.8
org.osgi.service.clusterinfo.dto
148.8.1
Summary
148.8.2
public class FrameworkNodeStatusDTO extends NodeStatusDTO
148.8.3
public class NodeStatusDTO extends DTO
150
Configurator Specification
150.1
Introduction
150.2
Entities
150.3
Configuration Resources
150.3.1
Configuration Resource Format
150.3.2
PIDs, Factory Configurations and Targeted PIDs
150.3.3
Configuration Dictionary
150.3.4
Data Types
150.3.5
Ranking
150.3.6
Overwrite Policies
150.4
Bundle Configuration Resources
150.5
Initial Configurations
150.6
Life Cycle
150.7
Grouping and Coordinations
150.8
Security
150.8.1
Configuration Permission
150.8.2
Service Permission
150.8.3
Configuration Admin Service
150.8.4
File Permission
150.9
Capabilities
150.9.1
osgi.extender Capability
150.10
osgi.configuration Namespace
150.11
Configuration Resources in a Repository
150.12
org.osgi.service.configurator
150.12.1
Summary
150.12.2
public final class ConfiguratorConstants
150.13
org.osgi.service.configurator.annotations
150.13.1
Summary
150.13.2
@RequireConfigurator
150.14
org.osgi.service.configurator.namespace
150.14.1
Summary
150.14.2
public final class ConfigurationNamespace extends Namespace
150.15
References
151
JAX-RS Whiteboard Specification
151.1
Introduction
151.1.1
Entities
151.2
The JAX-RS Whiteboard
151.2.1
The JAX-RS Service Runtime Service
151.2.2
Inspecting the Runtime DTOs
151.2.3
Relation to the Servlet Container
151.2.4
Isolation between JAX-RS Whiteboards
151.3
Common Whiteboard Properties
151.4
Registering JAX-RS Resources
151.4.1
JAX-RS Resource mapping
151.4.2
JAX-RS Whiteboard Resource Lifecycle
151.4.3
Resource Service Properties
151.4.4
A JAX-RS Whiteboard Resource Example
151.5
Registering JAX-RS Extensions
151.5.1
Name Binding and JAX-RS Extensions
151.5.2
Extension ordering
151.5.3
Extension dependencies
151.5.4
Built in extensions
151.5.5
JAX-RS Whiteboard Extension Lifecycle
151.5.6
Extension Service Properties
151.5.7
A JAX-RS Whiteboard Extension Example
151.6
Registering JAX-RS Applications
151.6.1
Application shadowing
151.6.2
Application Extension Dependencies
151.6.3
Application Service Properties
151.6.4
Accessing the Application service properties
151.6.5
A JAX-RS Whiteboard Application Example
151.7
Advertising JAX-RS Endpoints
151.8
Whiteboard Error Handling
151.9
The JAX-RS Client API
151.9.1
Client Filters, Interceptors, Readers and Writers
151.9.2
Reactive Clients
151.9.3
Consuming Server Sent Events
151.10
Portability and Interoperability
151.10.1
Media Type support
151.11
Capabilities
151.11.1
osgi.implementation Capability
151.11.2
osgi.contract Capability
151.11.3
osgi.service Capability
151.12
Security
151.12.1
Service Permissions
151.12.2
Runtime Introspection
151.12.3
Calling JAX-RS Whiteboard Services
151.13
org.osgi.service.jaxrs.client
151.13.1
Summary
151.13.2
public interface PromiseRxInvoker extends RxInvoker
151.13.3
public interface SseEventSourceFactory
151.14
org.osgi.service.jaxrs.runtime
151.14.1
Summary
151.14.2
public interface JaxrsEndpoint
151.14.3
public interface JaxrsServiceRuntime
151.14.4
public final class JaxrsServiceRuntimeConstants
151.15
org.osgi.service.jaxrs.runtime.dto
151.15.1
Summary
151.15.2
public class ApplicationDTO extends BaseApplicationDTO
151.15.3
public abstract class BaseApplicationDTO extends BaseDTO
151.15.4
public abstract class BaseDTO extends DTO
151.15.5
public abstract class BaseExtensionDTO extends BaseDTO
151.15.6
public final class DTOConstants
151.15.7
public class ExtensionDTO extends BaseExtensionDTO
151.15.8
public class FailedApplicationDTO extends BaseApplicationDTO
151.15.9
public class FailedExtensionDTO extends BaseExtensionDTO
151.15.10
public class FailedResourceDTO extends BaseDTO
151.15.11
public class ResourceDTO extends BaseDTO
151.15.12
public class ResourceMethodInfoDTO extends DTO
151.15.13
public class RuntimeDTO extends DTO
151.16
org.osgi.service.jaxrs.whiteboard
151.16.1
Summary
151.16.2
public final class JaxrsWhiteboardConstants
151.17
org.osgi.service.jaxrs.whiteboard.annotations
151.17.1
Summary
151.17.2
@RequireJaxrsWhiteboard
151.18
org.osgi.service.jaxrs.whiteboard.propertytypes
151.18.1
Summary
151.18.2
@JaxrsApplicationBase
151.18.3
@JaxrsApplicationSelect
151.18.4
@JaxrsExtension
151.18.5
@JaxrsExtensionSelect
151.18.6
@JaxrsMediaType
151.18.7
@JaxrsName
151.18.8
@JaxrsResource
151.18.9
@JaxrsWhiteboardTarget
151.18.10
@JSONRequired
151.19
References
152
CDI Integration Specification
152.1
Introduction
152.1.1
Essentials
152.1.2
Entities
152.1.3
Synopsis
152.2
Components
152.3
Component Scope
152.3.1
Contexts
152.4
Container Component
152.4.1
Container Component Configuration
152.4.2
Container Component Life Cycle
152.5
Standard Definitions
152.5.1
Annotation Inheritance
152.5.2
Code Examples
152.6
Single Component
152.6.1
Single Component Naming
152.6.2
Single Component Configuration
152.7
Factory Component
152.7.1
Factory Component Naming
152.7.2
Factory Component Configuration
152.8
Component Properties
152.8.1
Reference Properties
152.9
Bean Property Types
152.9.1
Bean Property Type Mapping
152.9.2
Coercing Bean Property Type Values
152.9.3
Standard Bean Property Types
152.10
Providing Services
152.10.1
@Service applied to bean class
152.10.2
@Service applied to type use
152.10.3
@Service applied to Producers
152.10.4
@Service Type Restrictions
152.10.5
Service Properties
152.10.6
Service Scope
152.10.7
Container Component Services
152.10.8
Single Component Services
152.10.9
Factory Component Services
152.11
Component Property Injection Points
152.11.1
Coordinator Support
152.12
Reference Injection Points
152.12.1
Reference injection point types
152.12.2
Reference Service scope
152.12.3
Bean Service Objects
152.12.4
Reference Greediness
152.12.5
Service Type
152.12.6
Any Service Type
152.12.7
Target Filter
152.12.8
Reference Names
152.12.9
Static References
152.12.10
Static Optional References
152.12.11
Static Multi-cardinality References
152.12.12
Default Minimum Cardinality
152.12.13
Dynamic References
152.13
Interacting with Service Events
152.14
CDI Component Runtime
152.14.1
Relationship to the OSGi Framework
152.14.2
Injecting the Bundle Context
152.14.3
Starting and Stopping CCR
152.14.4
Logging Messages
152.14.5
Bundle Activator Interaction
152.14.6
Introspection
152.14.7
Logger Support
152.14.8
Disabling Components
152.14.9
Container Component and Service Cycles
152.15
Capabilities
152.16
Relationship to CDI features
152.16.1
Bean Descriptors
152.16.2
Bean Discovery
152.16.3
Portable Extensions
152.16.4
Bean Manager
152.16.5
Decorators and Interceptors
152.17
Security
152.17.1
Service Permissions
152.17.2
Required Admin Permission
152.17.3
Using hasPermission
152.17.4
Configuration Multi-Locations and Regions
152.18
org.osgi.service.cdi
152.18.1
Summary
152.18.2
public class CDIConstants
152.18.3
enum ComponentType
152.18.4
enum ConfigurationPolicy
152.18.5
enum MaximumCardinality
152.18.6
enum ReferencePolicy
152.18.7
enum ReferencePolicyOption
152.18.8
enum ServiceScope
152.19
org.osgi.service.cdi.annotations
152.19.1
Summary
152.19.2
@Bean
152.19.3
@BeanPropertyType
152.19.4
public static final class BeanPropertyType.Literal extends AnnotationLiteral implements BeanPropertyType
152.19.5
@Beans
152.19.6
@ComponentProperties
152.19.7
public static final class ComponentProperties.Literal extends AnnotationLiteral implements ComponentProperties
152.19.8
@ComponentScoped
152.19.9
public static final class ComponentScoped.Literal extends AnnotationLiteral implements ComponentScoped
152.19.10
@FactoryComponent
152.19.11
public static final class FactoryComponent.Literal extends AnnotationLiteral implements FactoryComponent
152.19.12
@MinimumCardinality
152.19.13
public static final class MinimumCardinality.Literal extends AnnotationLiteral implements MinimumCardinality
152.19.14
@PID
152.19.15
public static final class PID.Literal extends AnnotationLiteral implements PID
152.19.16
@PIDs
152.19.17
public static final class PIDs.Literal extends AnnotationLiteral implements PIDs
152.19.18
@PrototypeRequired
152.19.19
public static final class PrototypeRequired.Literal extends AnnotationLiteral implements PrototypeRequired
152.19.20
@Reference
152.19.21
public static final class Reference.Any
152.19.22
public static final class Reference.Literal extends AnnotationLiteral implements Reference
152.19.23
@Reluctant
152.19.24
public static final class Reluctant.Literal extends AnnotationLiteral implements Reluctant
152.19.25
@RequireCDIExtender
152.19.26
@RequireCDIImplementation
152.19.27
@Service
152.19.28
public static final class Service.Literal extends AnnotationLiteral implements Service
152.19.29
@ServiceInstance
152.19.30
public static final class ServiceInstance.Literal extends AnnotationLiteral implements ServiceInstance
152.19.31
@SingleComponent
152.19.32
public static final class SingleComponent.Literal extends AnnotationLiteral implements SingleComponent
152.20
org.osgi.service.cdi.propertytypes
152.20.1
Summary
152.20.2
public class BeanPropertyException extends RuntimeException
152.20.3
@ExportedService
152.20.4
@ServiceDescription
152.20.5
@ServiceRanking
152.20.6
@ServiceVendor
152.21
org.osgi.service.cdi.reference
152.21.1
Summary
152.21.2
public interface BeanServiceObjects
152.21.3
public interface BindBeanServiceObjects
152.21.4
public interface BindService
152.21.5
public interface BindServiceReference
152.22
org.osgi.service.cdi.runtime
152.22.1
Summary
152.22.2
public interface CDIComponentRuntime
152.23
org.osgi.service.cdi.runtime.dto
152.23.1
Summary
152.23.2
public class ActivationDTO extends DTO
152.23.3
public class ComponentDTO extends DTO
152.23.4
public class ComponentInstanceDTO extends DTO
152.23.5
public class ConfigurationDTO extends DTO
152.23.6
public class ContainerDTO extends DTO
152.23.7
public class ExtensionDTO extends DTO
152.23.8
public class ReferenceDTO extends DTO
152.24
org.osgi.service.cdi.runtime.dto.template
152.24.1
Summary
152.24.2
public class ActivationTemplateDTO extends DTO
152.24.3
public class ComponentTemplateDTO extends DTO
152.24.4
public class ConfigurationTemplateDTO extends DTO
152.24.5
public class ContainerTemplateDTO extends DTO
152.24.6
public class ExtensionTemplateDTO extends DTO
152.24.7
public class ReferenceTemplateDTO extends DTO
152.25
References
702
XML Parser Service Specification
702.1
Introduction
702.1.1
Essentials
702.1.2
Entities
702.1.3
Operations
702.2
JAXP
702.3
XML Parser service
702.4
Properties
702.5
Getting a Parser Factory
702.6
Adapting a JAXP Parser to OSGi
702.6.1
JAR Based Services
702.6.2
XMLParserActivator
702.6.3
Adapting an Existing JAXP Compatible Parser
702.7
Usage of JAXP
702.8
Security
702.9
org.osgi.util.xml
702.9.1
Summary
702.9.2
public class XMLParserActivator implements BundleActivator, ServiceFactory
702.10
References
705
Promises Specification
705.1
Introduction
705.1.1
Essentials
705.1.2
Entities
705.2
Promise
705.3
Deferred
705.4
Callbacks
705.4.1
Runnable
705.4.2
Consumer
705.4.3
Success and Failure
705.5
Chaining Promises
705.6
Monad
705.7
Timing
705.8
Functional Interfaces
705.9
Utility Methods
705.10
Security
705.11
org.osgi.util.promise
705.11.1
Summary
705.11.2
public class Deferred
705.11.3
public class FailedPromisesException extends RuntimeException
705.11.4
public interface Failure
705.11.5
public interface Promise
705.11.6
public class PromiseFactory
705.11.7
public class Promises
705.11.8
public interface Success
705.11.9
public class TimeoutException extends Exception
705.12
org.osgi.util.function
705.12.1
Summary
705.12.2
public interface Consumer
705.12.3
public interface Function
705.12.4
public interface Predicate
705.13
References
705.14
Changes
706
Push Stream Specification
706.1
Introduction
706.1.1
Essentials
706.1.2
Entities
706.2
Asynchronous Event Streams
706.2.1
The Push Event
706.2.2
The Push Event Source
706.2.3
The Push Event Consumer
706.2.4
Closing the Event Stream
706.3
The Push Stream
706.3.1
Simple Pipelines
706.3.2
Buffering, Back pressure and Circuit Breakers
706.3.3
Forking
706.3.4
Coalescing and Windowing
706.3.5
Merging and Splitting
706.3.6
Time Limited Streams
706.3.7
Closing Streams
706.4
The Push Stream Provider
706.4.1
Building Buffers
706.4.2
Mapping between Java 8 Streams and Push Streams
706.5
Simple Push Event Sources
706.5.1
Optimizing Event Creation
706.6
Security
706.7
org.osgi.util.pushstream
706.7.1
Summary
706.7.2
public interface BufferBuilder>>
706.7.3
public interface PushbackPolicy>>
706.7.4
enum PushbackPolicyOption
706.7.5
public abstract class PushEvent
706.7.6
enum PushEvent.EventType
706.7.7
public interface PushEventConsumer
706.7.8
public interface PushEventSource
706.7.9
public interface PushStream extends AutoCloseable
706.7.10
public interface PushStreamBuilder>> extends BufferBuilder,
T, U>
706.7.11
public final class PushStreamProvider
706.7.12
public interface QueuePolicy>>
706.7.13
enum QueuePolicyOption
706.7.14
public interface SimplePushEventSource extends PushEventSource, AutoCloseable
706.8
References
707
Converter Specification
707.1
Introduction
707.2
Entities
707.3
Standard Converter
707.4
Conversions
707.4.1
Generics
707.4.2
Scalars
707.4.3
Arrays and Collections
707.4.4
Maps, Interfaces, Java Beans, DTOs and Annotations
707.5
Repeated or Deferred Conversions
707.6
Customizing converters
707.6.1
Catch-all rules
707.7
Conversion failures
707.8
Security
707.9
org.osgi.util.converter
707.9.1
Summary
707.9.2
public class ConversionException extends RuntimeException
707.9.3
public interface Converter
707.9.4
public interface ConverterBuilder
707.9.5
public interface ConverterFunction
707.9.6
public class Converters
707.9.7
public interface Converting extends Specifying
707.9.8
public interface Functioning extends Specifying
707.9.9
public abstract class Rule implements TargetRule
707.9.10
public interface Specifying>
707.9.11
public interface TargetRule
707.9.12
public class TypeReference
707.9.13
public class TypeRule implements TargetRule
707.10
References

C U Cyber History — Public Interest Web Archive