org.osgi.jmx.service.coordinator
Interface CoordinatorMBean


public interface CoordinatorMBean

This MBean provides the management interface to the OSGi Coordinator Service


Field Summary
static javax.management.openmbean.CompositeType COORDINATION_TYPE
           
static javax.management.openmbean.TabularType COORDINATIONS_TYPE
          Defines a list of COORDINATION_TYPE
static java.lang.String ID
          The key ID, used in ID_ITEM.
static Item ID_ITEM
          The item for the id of an Coordination object.
static java.lang.String NAME
          The key NAME, used in NAME_ITEM.
static Item NAME_ITEM
          The item for the user name for an authorization object.
static java.lang.String OBJECTNAME
          User Admin MBean object name.
static java.lang.String TIMEOUT
          The key TIMEOUT, used in TIMEOUT_ITEM.
static Item TIMEOUT_ITEM
          The item for the id of an Coordination object.
 
Method Summary
 void addTimeout(long id, long timeout)
          Set/Change the timeout of a Coordination.
 boolean fail(long id, java.lang.String reason)
          Fail a Coordination.
 javax.management.openmbean.CompositeData getCoordination(long id)
          Get a Coordination.
 javax.management.openmbean.TabularData listCoordinations(java.lang.String regexFilter)
          List the current coordinations.
 

Field Detail

OBJECTNAME

static final java.lang.String OBJECTNAME
User Admin MBean object name.

See Also:
Constant Field Values

NAME

static final java.lang.String NAME
The key NAME, used in NAME_ITEM.

See Also:
Constant Field Values

NAME_ITEM

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.


ID

static final java.lang.String ID
The key ID, used in ID_ITEM.

See Also:
Constant Field Values

ID_ITEM

static final Item ID_ITEM
The item for the id of an Coordination object. The key is ID and the type is SimpleType.LONG. The id must be generated by the Mbean and map to a unique Coordination (which should no be pinned in memory because of this).


TIMEOUT

static final java.lang.String TIMEOUT
The key TIMEOUT, used in TIMEOUT_ITEM.

See Also:
Constant Field Values

TIMEOUT_ITEM

static final Item TIMEOUT_ITEM
The item for the id of an Coordination object. The key is ID and the type is SimpleType.LONG.


COORDINATION_TYPE

static final javax.management.openmbean.CompositeType COORDINATION_TYPE

COORDINATIONS_TYPE

static final javax.management.openmbean.TabularType COORDINATIONS_TYPE
Defines a list of COORDINATION_TYPE

Method Detail

listCoordinations

javax.management.openmbean.TabularData listCoordinations(java.lang.String regexFilter)
                                                         throws java.io.IOException
List the current coordinations. The Composite Data is typed by COORDINATIONS_TYPE.

Parameters:
regexFilter - a regular expression filter on the coordination name
Returns:
the Coordinations typed by COORDINATIONS_TYPE.
Throws:
java.io.IOException - if the operation fails

getCoordination

javax.management.openmbean.CompositeData getCoordination(long id)
                                                         throws java.io.IOException
Get a Coordination. The Composite Data is typed by COORDINATION_TYPE.

Parameters:
id - The id of a Coordination
Returns:
the Coordinations typed by COORDINATION_TYPE.
Throws:
java.io.IOException - if the operation fails

fail

boolean fail(long id,
             java.lang.String reason)
             throws java.io.IOException
Fail a Coordination.

Parameters:
id - The id of the coordination to be failed.
reason -
Returns:
true if the coordination was failed by this call, otherwise false.
Throws:
java.io.IOException

addTimeout

void addTimeout(long id,
                long timeout)
                throws java.io.IOException
Set/Change the timeout of a Coordination.

Parameters:
id - The id of the Coordination
timeout - The nr of milliseconds for the next timeout.
Throws:
java.io.IOException