[jboss-dev-forums] [Design of POJO Server] - ManagementView refresh

scott.stark@jboss.org do-not-reply at jboss.com
Tue Jan 23 14:11:12 EST 2007


As a status, I am reving the profile service ManagementView to better align with the jsr88 notions, expose the deployment structure, and support the component type notion Charles wanted.

The two main query by type methods of the ManagementView become:

  |    /**
  |     * Get the deployments of a type.
  |     * @param type - the deployment or module type.
  |     * @return the possibly empty set of deployment with the given type.
  |     * @throws Exception
  |     */
  |    public Set<ManagedDeployment> getDeploymentsForType(String type)
  |       throws Exception;
  | 
  |    /**
  |     * Get the components of a type. The 
  |     * @param type - the component type.
  |     * @return the possibly empty set of components with the given type.
  |     * @throws Exception
  |     */
  |    public Set<ManagedComponent> getComponentsForType(ComponentType type)
  |       throws Exception;
  | 

The associated ManagedDeployment, ManagedComponent and ComponentType are:

  | /**
  |  * A collection of ManagedComponent and structural information
  |  * about a deployment.
  |  * 
  |  * @author Scott.Stark at jboss.org
  |  * @version $Revision:$
  |  */
  | public interface ManagedDeployment
  | {
  |    public String getName();
  |    public DeploymentPhase getDeploymentPhase();
  |    /**
  |     * Get the deployment/module types.
  |     * @return deployment types
  |     */
  |    public Set<String> getType();
  |    public ManagedObject getManagedObject();
  |    /**
  |     * Get the ManagedComponents for the deployment module.
  |     * @return ManagedComponents for the deployment module.
  |     */
  |    public List<ManagedComponent> getComponents();
  |    /**
  |     * Get the nested deployment modules.
  |     * @return nested deployment modules.
  |     */
  |    public List<ManagedDeployment> getChildren();
  | 
  |    /**
  |     * Get the DeploymentTemplate names for components
  |     * that can be added to this deployment.
  |     * @return 
  |     */
  |    public Set<String> getComponentTemplateNames();
  |    public DeploymentTemplateInfo getTemplate(String name);
  |    /**
  |     * Add a component to this deployment
  |     * @param info
  |     * @return
  |     */
  |    public ManagedComponent addComponent(DeploymentTemplateInfo info);
  |    public void removeComponent(ManagedComponent mc);
  |    
  |    /**
  |     * Get the DeploymentTemplate names for deployments
  |     * that can be added to this deployment.
  |     * @return 
  |     */
  |    public Set<String> getDeploymentTemplateNames();
  |    /**
  |     * Add a deployment
  |     * @param info
  |     * @return
  |     */
  |    public ManagedDeployment addModule(DeploymentTemplateInfo info);
  | }
  | 
  | /**
  |  * A runtime component associated with a deployment.
  |  * 
  |  * @author Scott.Stark at jboss.org
  |  * @version $Revision:$
  |  */
  | public interface ManagedComponent
  | {
  |    /**
  |     * The component name, typically only unique within the ManagedDeployment
  |     * @return omponent name
  |     */
  |    public String getName();
  |    /**
  |     * The component classification as a type/subtype.
  |     * @return component type.
  |     */
  |    public ComponentType getType();
  |    /**
  |     * The component ManagedObject.
  |     * @return component ManagedObject.
  |     */
  |    public ManagedObject getManagedObject();
  |    /**
  |     * The deployment the component is associated with.
  |     * @return component deployment.
  |     */
  |    public ManagedDeployment getDeployment();
  | }
  | 
  | /**
  |  * A simple type/subtype key for a ManagedComponent. Example
  |  * type/subtypes include: DataSource/{XA,LocalTx,NoTX}, JMSDestination/{Queue,Topic},
  |  * EJB/{StatelessSession,StatefulSession,Entity,MDB}, MBean/{Standard,XMBean,Dynamic},
  |  * ...
  |  * 
  |  * @author Scott.Stark at jboss.org
  |  * @version $Revision:$
  |  */
  | public class ComponentType
  | {
  |    private String type;
  |    private String subtype;
  | 
  |    public String getType()
  |    {
  |       return type;
  |    }
  |    public void setType(String type)
  |    {
  |       this.type = type;
  |    }
  | 
  |    public String getSubtype()
  |    {
  |       return subtype;
  |    }
  |    public void setSubtype(String subtype)
  |    {
  |       this.subtype = subtype;
  |    }
  | }
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005444#4005444

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005444



More information about the jboss-dev-forums mailing list