org.jboss.system
Class ServiceCreator

java.lang.Object
  extended by org.jboss.system.ServiceCreator

public class ServiceCreator
extends Object

A helper class for the controller.

Version:
$Revision: 81485 $
Author:
Marc Fleury, David Jencks, Adrian Brock
See Also:
Service

Constructor Summary
ServiceCreator(MBeanServer server)
          Deprecated. This is no longer used and will be going away
 
Method Summary
static ServiceInstance install(MBeanServer server, ObjectName objectName, ServiceMetaData metaData, Object mbean)
          Install an MBean
 ObjectInstance install(ObjectName mbeanName, ObjectName loaderName, Element mbeanElement)
          Deprecated. This is no longer used and will be going away
 void remove(ObjectName name)
          Remove the installed object
static Exception rethrow(String context, Throwable t)
          Rethrow an error as an exception
 void shutdown()
          Clean shutdown
static void uninstall(MBeanServer server, ObjectName objectName)
          Uninstall an MBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceCreator

public ServiceCreator(MBeanServer server)
Deprecated. This is no longer used and will be going away

Create a new ServiceCreator

Parameters:
server - the mbean server
Method Detail

rethrow

public static Exception rethrow(String context,
                                Throwable t)
                         throws Exception
Rethrow an error as an exception

Parameters:
context - the context
t - the original throwable
Returns:
never
Throws:
Exception - always

install

public static ServiceInstance install(MBeanServer server,
                                      ObjectName objectName,
                                      ServiceMetaData metaData,
                                      Object mbean)
                               throws Exception
Install an MBean

Parameters:
server - the mbean server
objectName - the object name
metaData - the service metadata
mbean - any mbean instance
Returns:
the installed instance
Throws:
Exception - for any error

uninstall

public static void uninstall(MBeanServer server,
                             ObjectName objectName)
Uninstall an MBean

Parameters:
server - the mbean server
objectName - the object name

shutdown

public void shutdown()
Clean shutdown


install

public ObjectInstance install(ObjectName mbeanName,
                              ObjectName loaderName,
                              Element mbeanElement)
                       throws Exception
Deprecated. This is no longer used and will be going away

Parses the given configuration document and creates MBean instances in the current MBean server.

Parameters:
mbeanName - the object name
loaderName - the classloader
mbeanElement - the config
Returns:
the created object instance
Throws:
Exception - for any error

remove

public void remove(ObjectName name)
            throws Exception
Remove the installed object

Parameters:
name - the object name
Throws:
Exception - for any error


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