com.metamatrix.common.config.api
Interface DeployedComponent

All Superinterfaces:
BaseObject, java.lang.Cloneable, java.lang.Comparable, ComponentObject
All Known Implementing Classes:
BasicDeployedComponent

public interface DeployedComponent
extends ComponentObject

DeployedComponent is a wrapper for a ComponentDefn - it represents a component that is declared deployed to a specied machine. Therefore, once deployed, a component cannot be changed.

A DeployedComponent instance can represent one of two things:

  1. It can represent a deployed VMComponentDefn, in which case the getServiceComponentDefnID and getProductServiceConfigID methods will both return null. Also, both the getDeployedComponentDefnID and the getVMComponentDefnID methods will return identical VMComponentDefnID objects, representing the ComponentDefn object from which this object was deployed.
  2. It can represent a deployed ServiceComponentDefnID, in which case the getVMComponentDefnID and getProductServiceConfigID methods will both return the appropriate ID object. Also, both the getDeployedComponentDefnID and the getServiceComponentDefnID methods will return identical ServiceComponentDefnID objects, representing the ComponentDefn object from which this object was deployed.

As you will notice, there is no reference held to a Configuration. This is done so that a DeployedComponent can be serialized independently from having to also serialize the whole configuration of objects.


Field Summary
static java.lang.Long SERVICE_UID_FOR_DEPLOYED_VM
          The SERVICE_UID_FOR_DEPLOYED_VM is the default value assigned in the database when the deployed component is a VM.
 
Method Summary
 void accept(ConfigurationVisitor visitor)
           
 ConfigurationID getConfigurationID()
          Returns the ConfigurationID indicating the configuration under which this deployed component belongs.
 ComponentDefn getDeployedComponentDefn(Configuration configuration)
          Returns the ComponentDefn that is deployed.
 ComponentDefnID getDeployedComponentDefnID()
          Returns the ComponentDefnID for the component that is deployed.
 HostID getHostID()
          Returns the HostID for the Host that this component is deployed on.
 ServiceComponentDefnID getServiceComponentDefnID()
          Returns the ComponentID for the service component that is deployed.
 VMComponentDefnID getVMComponentDefnID()
          Returns the ComponentID for the VM that this component is deployed on, or if this object represents the deployed VM itself.
 boolean isDeployedConnector()
          Indicates whether this object represents a deployed connector.
 boolean isDeployedService()
           Indicates whether this object represents a deployed defn (returns true) or a deployed vm component definition (returns false).
 boolean isEnabled()
          Indicates if the deployed component is enabled for starting.
 
Methods inherited from interface com.metamatrix.common.config.api.ComponentObject
getComponentTypeID, getCreatedBy, getCreatedDate, getDescription, getLastChangedBy, getLastChangedDate, getName, getProperties, getProperty, isDependentUpon
 
Methods inherited from interface com.metamatrix.common.namedobject.BaseObject
clone, getFullName, getID
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

SERVICE_UID_FOR_DEPLOYED_VM

static final java.lang.Long SERVICE_UID_FOR_DEPLOYED_VM
The SERVICE_UID_FOR_DEPLOYED_VM is the default value assigned in the database when the deployed component is a VM.

Method Detail

isEnabled

boolean isEnabled()
Indicates if the deployed component is enabled for starting.

Returns:
true if the deployed component is enabled for starting

isDeployedService

boolean isDeployedService()

Indicates whether this object represents a deployed defn (returns true) or a deployed vm component definition (returns false).

To determine if the service is a connector or not, use the isDeployedConnector() method.

Returns:
true if this is a deployed service, false if it is a deployed vm

isDeployedConnector

boolean isDeployedConnector()
Indicates whether this object represents a deployed connector. If isDeployedService() returns false, this will always return false.

Returns:
true if this is a deployed connector.

getServiceComponentDefnID

ServiceComponentDefnID getServiceComponentDefnID()
Returns the ComponentID for the service component that is deployed. Null will be returned if this DeployedComponent represents either a a deployed VM.

Returns:
the component id, null when this is a deployed VM

getVMComponentDefnID

VMComponentDefnID getVMComponentDefnID()
Returns the ComponentID for the VM that this component is deployed on, or if this object represents the deployed VM itself.

Returns:
the vm id

getConfigurationID

ConfigurationID getConfigurationID()
Returns the ConfigurationID indicating the configuration under which this deployed component belongs.

Returns:
the configuration id

getHostID

HostID getHostID()
Returns the HostID for the Host that this component is deployed on.

Returns:
the host id

getDeployedComponentDefnID

ComponentDefnID getDeployedComponentDefnID()
Returns the ComponentDefnID for the component that is deployed. This can either be a ServiceComponentDefnId or a VMComponentDefnID.

Returns:
ComponentDefnID that is represented as the deployed component

getDeployedComponentDefn

ComponentDefn getDeployedComponentDefn(Configuration configuration)
Returns the ComponentDefn that is deployed.


accept

void accept(ConfigurationVisitor visitor)
Specified by:
accept in interface ComponentObject


Copyright © 2009. All Rights Reserved.