org.jboss.system
Interface ServiceControllerMBean

All Known Implementing Classes:
ServiceController

public interface ServiceControllerMBean

ServiceController MBean interface.

See Also:
Service

Field Summary
static ObjectName OBJECT_NAME
          The default ObjectName
 
Method Summary
 void create(ObjectName serviceName)
          Create a service
 void create(ObjectName serviceName, Collection<ObjectName> depends)
          Create a service with given dependencies
 void destroy(ObjectName serviceName)
          Destroy the indicated service
 ServiceContext getServiceContext(ObjectName serviceName)
          Lookup the ServiceContext for the given serviceName
 List<ObjectName> install(Element config, ObjectName loaderName)
          Deploy the beans; deploy means "instantiate and configure" so the MBean is created in the MBeanServer.
 String listConfiguration(ObjectName[] objectNames)
          Gets the Configuration attribute of the ServiceController object
 List<ServiceContext> listDeployed()
          Lists the ServiceContexts of deployed mbeans
 List<ObjectName> listDeployedNames()
          lists ObjectNames of deployed mbeans deployed through serviceController.
 List<ServiceContext> listIncompletelyDeployed()
          The listIncompletelyDeployed method returns the service contexts for the mbeans whose status is not CREATED, RUNNING, STOPPED or DESTROYED.
 void register(ObjectName serviceName)
          Register the mbean against the microkernel with no dependencies.
 void register(ObjectName serviceName, Collection<ObjectName> depends)
          Register the mbean against the microkernel with dependencies.
 void remove(ObjectName objectName)
          This MBean is going bye bye
 void restart(ObjectName serviceName)
          Stops and restarts the indicated service
 void shutdown()
          Describe shutdown method here.
 void start(ObjectName serviceName)
          Starts the indicated service
 void stop(ObjectName serviceName)
          Stop the indicated service
 void validateDeploymentState(DeploymentInfo di, DeploymentState state)
          Go through the mbeans of the DeploymentInfo and validate that they are in a state at least equal to that of the argument state
 

Field Detail

OBJECT_NAME

static final ObjectName OBJECT_NAME
The default ObjectName

Method Detail

listDeployed

List<ServiceContext> listDeployed()
Lists the ServiceContexts of deployed mbeans

Returns:
the list of ServiceContexts for mbeans deployed through ServiceController.

listIncompletelyDeployed

List<ServiceContext> listIncompletelyDeployed()
The listIncompletelyDeployed method returns the service contexts for the mbeans whose status is not CREATED, RUNNING, STOPPED or DESTROYED. An MBean that has reached one of the above states has its dependencies resolved.

Returns:
a List

listDeployedNames

List<ObjectName> listDeployedNames()
lists ObjectNames of deployed mbeans deployed through serviceController.

Returns:
a list of ObjectNames of deployed mbeans.

listConfiguration

String listConfiguration(ObjectName[] objectNames)
                         throws Exception
Gets the Configuration attribute of the ServiceController object

Parameters:
objectNames - Description of Parameter
Returns:
The Configuration value
Throws:
Exception - Description of Exception

validateDeploymentState

void validateDeploymentState(DeploymentInfo di,
                             DeploymentState state)
Go through the mbeans of the DeploymentInfo and validate that they are in a state at least equal to that of the argument state

Parameters:
di - the deployment info
state - the deployment state

install

List<ObjectName> install(Element config,
                         ObjectName loaderName)
                         throws Exception
Deploy the beans; deploy means "instantiate and configure" so the MBean is created in the MBeanServer. You must call "create" and "start" separately on the MBean to affect the service lifecycle deploy doesn't bother with service lifecycle only MBean instanciation/registration/configuration.

Parameters:
config -
loaderName -
Returns:
Description of the Returned Value
Throws:
Exception - for any error

register

void register(ObjectName serviceName)
              throws Exception
Register the mbean against the microkernel with no dependencies.

Parameters:
serviceName - the object name
Throws:
Exception - for any error
See Also:
register(ObjectName, java.util.Collection)

register

void register(ObjectName serviceName,
              Collection<ObjectName> depends)
              throws Exception
Register the mbean against the microkernel with dependencies.

Parameters:
serviceName - the object name
depends - the dependencies
Throws:
Exception - for any error

create

void create(ObjectName serviceName)
            throws Exception
Create a service

Parameters:
serviceName - Description of Parameter
Throws:
Exception - Description of Exception

create

void create(ObjectName serviceName,
            Collection<ObjectName> depends)
            throws Exception
Create a service with given dependencies

Parameters:
serviceName - Description of Parameter
depends - the dependencies
Throws:
Exception - Description of Exception

start

void start(ObjectName serviceName)
           throws Exception
Starts the indicated service

Parameters:
serviceName - Description of Parameter
Throws:
Exception - Description of Exception

restart

void restart(ObjectName serviceName)
             throws Exception
Stops and restarts the indicated service

Parameters:
serviceName - Description of Parameter
Throws:
Exception - Description of Exception

stop

void stop(ObjectName serviceName)
          throws Exception
Stop the indicated service

Parameters:
serviceName - Description of Parameter
Throws:
Exception - Description of Exception

destroy

void destroy(ObjectName serviceName)
             throws Exception
Destroy the indicated service

Parameters:
serviceName - Description of Parameter
Throws:
Exception - Description of Exception

remove

void remove(ObjectName objectName)
            throws Exception
This MBean is going bye bye

Parameters:
objectName - Description of Parameter
Throws:
Exception - Description of Exception

shutdown

void shutdown()
Describe shutdown method here.


getServiceContext

ServiceContext getServiceContext(ObjectName serviceName)
Lookup the ServiceContext for the given serviceName

Parameters:
serviceName - the service name
Returns:
the service context


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.