Save This Page
Home » JBoss-5.1.0 » org » jboss » system » [javadoc | source]
org.jboss.system
public class: ServiceController [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceController

All Implemented Interfaces:
    ServiceControllerMBean, MBeanRegistration, NotificationEmitter

This is the main Service Controller. A controller can deploy a service to a jboss.system It installs by delegating, it configures by delegating

This class has been rewritten to delegate to the microcontainer's generic controller. Like the original ServiceController, all state transitions must be handled manually, e.g. driven by the deployer invoking create, start, stop, etc. That is with one exception; we register ourselves an automatic context.

Field Summary
public static final  ObjectName DEFAULT_LOADER_REPOSITORY    The ObjectName of the default loader repository 
public static final  String JBOSS_INTERNAL_LIFECYCLE    The operation name for lifecycle 
public static final  String[] JBOSS_INTERNAL_LIFECYCLE_SIG    The signature for lifecycle operations 
protected  Kernel kernel    The kernel 
protected  MBeanServer server    A callback to the JMX MBeanServer 
protected  Map<ObjectName, ServiceControllerContext> installed    The contexts 
protected  CopyOnWriteArrayList<ServiceControllerContext> installedOrder    The contexts in installation order 
Method from org.jboss.system.ServiceController Summary:
create,   create,   destroy,   getKernel,   getMBeanServer,   getServiceContext,   getStackTrace,   install,   install,   install,   install,   listConfiguration,   listDeployed,   listDeployedNames,   listIncompletelyDeployed,   postDeregister,   postRegister,   preDeregister,   preRegister,   register,   register,   register,   register,   remove,   restart,   rethrow,   sendControllerNotification,   setKernel,   setMBeanServer,   shutdown,   start,   stop,   validateDeploymentState
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.system.ServiceController Detail:
 public  void create(ObjectName serviceName) throws Exception 
 public  void create(ObjectName serviceName,
    Collection<ObjectName> depends) throws Exception 
 public  void destroy(ObjectName serviceName) throws Exception 
 public Kernel getKernel() 
    Get the kernel.
 public MBeanServer getMBeanServer() 
    Get the MBeanServer
 public ServiceContext getServiceContext(ObjectName serviceName) 
 protected Throwable getStackTrace() 
    Get exception that will expose stacktrace.
 public List<ObjectName> install(List<ServiceMetaData> metaDatas,
    ObjectName loaderName) throws Exception 
 public ObjectName install(ServiceMetaData metaData,
    ObjectName loaderName) throws Exception 
 public List<ObjectName> install(Element config,
    ObjectName loaderName) throws Exception 
 public  void install(ObjectName name,
    Object object) throws Exception 
    Install an MBean without any meta data
 public String listConfiguration(ObjectName[] objectNames) throws Exception 
 public List<ServiceContext> listDeployed() 
 public List<ObjectName> listDeployedNames() 
 public List<ServiceContext> listIncompletelyDeployed() 
 public  void postDeregister() 
 public  void postRegister(Boolean registrationDone) 
 public  void preDeregister() throws Exception 
 public ObjectName preRegister(MBeanServer server,
    ObjectName name) throws Exception 
 public  void register(ObjectName serviceName) throws Exception 
 public  void register(ObjectName serviceName,
    Collection<ObjectName> depends) throws Exception 
 public  void register(ObjectName serviceName,
    Collection<ObjectName> depends,
    boolean includeLifecycle) throws Exception 
    Register the mbean against the microkernel with dependencies.
 public  void register(ObjectName serviceName,
    Collection<ObjectName> depends,
    boolean includeLifecycle,
    Object target) throws Exception 
    Register the mbean against the microkernel with dependencies.
 public  void remove(ObjectName objectName) throws Exception 
 public  void restart(ObjectName serviceName) throws Exception 
 public static Exception rethrow(String context,
    Throwable t) throws Exception 
    Rethrow an error as an exception
 public  void sendControllerNotification(String type,
    ObjectName serviceName) 
    Sends outs controller notifications about service lifecycle events
 public  void setKernel(Kernel kernel) 
    Set the kernel.
 public  void setMBeanServer(MBeanServer server) 
    Set the server.
 public  void shutdown() 
 public  void start(ObjectName serviceName) throws Exception 
 public  void stop(ObjectName serviceName) throws Exception 
 public  void validateDeploymentState(DeploymentInfo di,
    DeploymentState state)