org.ow2.petals.jmx
Class ComponentClient

java.lang.Object
  extended by org.ow2.petals.jmx.AbstractServiceClient
      extended by org.ow2.petals.jmx.ComponentClient

public final class ComponentClient
extends AbstractServiceClient

Client API of a JMX component associated to a JBI component.

Author:
cdeneux - Capgemini Sud

Nested Class Summary
static class ComponentClient.State
          Component states
 
Field Summary
protected static java.lang.String GET_CURRENT_STATE
          Action : get current state
protected static java.lang.String SHUTDOWN
          Action : shutdown a component
protected static java.lang.String START
          Action : start a component
protected static java.lang.String STOP
          Action : stop a component
 
Fields inherited from class org.ow2.petals.jmx.AbstractServiceClient
JMX_FIELD_NAME, JMX_FIELD_TYPE, JMX_SERVICE_TYPE, mbeanName, mBeanServerConnection, petalsDomain
 
Constructor Summary
ComponentClient(javax.management.ObjectName componentObjectName, javax.management.MBeanServerConnection mBeanServerConnection)
          Creates a new instance of ComponentClient
ComponentClient(java.lang.String petalsDomain, java.lang.String componentName, javax.management.MBeanServerConnection mBeanServerConnection)
          Creates a new instance of ComponentClient
 
Method Summary
 java.lang.String getState()
          Get the current state of the JBI component associated to this JMX component.
 void shutdown()
          Shutdown the component associated to this JMX component.
 void start()
          Start the component associated to this JMX component.
 void stop()
          Stop the component associated to this JMX component.
 
Methods inherited from class org.ow2.petals.jmx.AbstractServiceClient
getAttribute, getAttribute, performAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHUTDOWN

protected static final java.lang.String SHUTDOWN
Action : shutdown a component

See Also:
Constant Field Values

START

protected static final java.lang.String START
Action : start a component

See Also:
Constant Field Values

STOP

protected static final java.lang.String STOP
Action : stop a component

See Also:
Constant Field Values

GET_CURRENT_STATE

protected static final java.lang.String GET_CURRENT_STATE
Action : get current state

See Also:
Constant Field Values
Constructor Detail

ComponentClient

public ComponentClient(java.lang.String petalsDomain,
                       java.lang.String componentName,
                       javax.management.MBeanServerConnection mBeanServerConnection)
                throws ComponentDoesNotExistException,
                       ComponentErrorException
Creates a new instance of ComponentClient

Parameters:
petalsDomain -
componentName -
mBeanServerConnection -
Throws:
ComponentDoesNotExistException
ComponentErrorException

ComponentClient

public ComponentClient(javax.management.ObjectName componentObjectName,
                       javax.management.MBeanServerConnection mBeanServerConnection)
                throws ComponentDoesNotExistException,
                       ComponentErrorException
Creates a new instance of ComponentClient

Parameters:
componentObjectName -
mBeanServerConnection -
Throws:
ComponentDoesNotExistException
ComponentErrorException
Method Detail

start

public void start()
           throws ComponentErrorException
Start the component associated to this JMX component.

Throws:
ComponentErrorException

stop

public void stop()
          throws ComponentErrorException
Stop the component associated to this JMX component.

Throws:
ComponentErrorException

shutdown

public void shutdown()
              throws ComponentErrorException
Shutdown the component associated to this JMX component.

Throws:
ComponentErrorException

getState

public java.lang.String getState()
                          throws ComponentErrorException
Get the current state of the JBI component associated to this JMX component.

Returns:
the current state of the JBI component.
Throws:
AttributeErrorException
ComponentErrorException


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.