BEA Systems, Inc.

Type-Safe Access to BEA WebLogic Server 9.0 MBeans (Deprecated)


weblogic.management.utils
Class GenericServiceManager

java.lang.Object
  extended byweblogic.management.utils.GenericServiceManager
All Implemented Interfaces:
weblogic.management.internal.DeploymentHandler

public class GenericServiceManager
extends Object
implements weblogic.management.internal.DeploymentHandler

This class can be used to manage deployment notifications for a subsystem that is configured using DeploymentMBeans. Each subsystem should register each DeploymentMBean class that they are responsible for managing using this class, and make the appropriate "start" and "stop" calls when its subsystem is started and stopped.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Method Summary
 void activateDeployment(DeploymentMBean deployment, weblogic.management.internal.DeploymentHandlerContext context)
           
 void deactivateDeployment(DeploymentMBean deployment, weblogic.management.internal.DeploymentHandlerContext context)
           
static GenericServiceManager getManager()
          Return the singleton manager.
 void prepareDeployment(DeploymentMBean deployment, weblogic.management.internal.DeploymentHandlerContext context)
          Implement the DeploymentHandler interface by delegating to the appropriate GenericManagedService instance.
 GenericManagedService register(Class mBeanClass, Class handlerClass, boolean handleMigration)
          Services should call this method for each type of DeploymentMBean that they handle.
 void unprepareDeployment(DeploymentMBean deployment, weblogic.management.internal.DeploymentHandlerContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

activateDeployment

public void activateDeployment(DeploymentMBean deployment,
                               weblogic.management.internal.DeploymentHandlerContext context)
                        throws DeploymentException
Specified by:
activateDeployment in interface weblogic.management.internal.DeploymentHandler
Throws:
DeploymentException

deactivateDeployment

public void deactivateDeployment(DeploymentMBean deployment,
                                 weblogic.management.internal.DeploymentHandlerContext context)
                          throws UndeploymentException
Specified by:
deactivateDeployment in interface weblogic.management.internal.DeploymentHandler
Throws:
UndeploymentException

getManager

public static GenericServiceManager getManager()
Return the singleton manager.


prepareDeployment

public void prepareDeployment(DeploymentMBean deployment,
                              weblogic.management.internal.DeploymentHandlerContext context)
                       throws DeploymentException
Implement the DeploymentHandler interface by delegating to the appropriate GenericManagedService instance.

Specified by:
prepareDeployment in interface weblogic.management.internal.DeploymentHandler
Throws:
DeploymentException

register

public GenericManagedService register(Class mBeanClass,
                                      Class handlerClass,
                                      boolean handleMigration)
Services should call this method for each type of DeploymentMBean that they handle. It associates a GenericManagedService object with a particular type of MBean. No attempt is made to prevent duplicate registrations, so don't do that.

Parameters:
mBeanClass - the class of MBean that the handler will handle. Every time an MBean of this class is deployed, an instance of the handler in question will be used to handle it. The class in question must implement DeploymentMBean.
handleMigration - if true, then if a deployment is targeted to a migratable target, it will be activated when and only when migration has occurred.
Throws:
IllegalArgumentException - if the classes do not match up to the right interfaces.

unprepareDeployment

public void unprepareDeployment(DeploymentMBean deployment,
                                weblogic.management.internal.DeploymentHandlerContext context)
                         throws UndeploymentException
Specified by:
unprepareDeployment in interface weblogic.management.internal.DeploymentHandler
Throws:
UndeploymentException

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs90
Copyright 2005 BEA Systems Inc.