edu.usc.cse.desi.model
Class HostDataModel

java.lang.Object
  extended byedu.usc.cse.desi.model.AbstractDESIModel
      extended byedu.usc.cse.desi.model.AbstractDataModel
          extended byedu.usc.cse.desi.model.AbstractNodeDataModel
              extended byedu.usc.cse.desi.model.HostDataModel
All Implemented Interfaces:
java.util.EventListener, IObjectWithProperties, java.beans.PropertyChangeListener, java.io.Serializable

public class HostDataModel
extends AbstractNodeDataModel

This class represents a host. From it, you can access the physical links connected to this host and you can access the components currently contained by this host.

Author:
Nels Started Feb 15, 2004
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.usc.cse.desi.model.AbstractNodeDataModel
myChildren, myConnections
 
Fields inherited from class edu.usc.cse.desi.model.AbstractDataModel
myPropertyHolder, myPropetyInitializer
 
Fields inherited from class edu.usc.cse.desi.model.AbstractDESIModel
listeners
 
Constructor Summary
HostDataModel()
           
HostDataModel(PropertyInitializer prop_init)
           
 
Method Summary
 void addComponent(ComponentDataModel component)
          Adds the component to the host if it is not already added to the host.
 void addConnection(PhysicalLinkDataModel link)
          Adds a link to this host if the link is not already added.
 void removeAllComponents()
          This method will simply remove all the components that are deployed onto this host.
 void removeComponent(ComponentDataModel component)
          Removes the component from the host if it has already been added to the host.
 void removeConnection(PhysicalLinkDataModel link)
          Removes the link from the host.
 
Methods inherited from class edu.usc.cse.desi.model.AbstractNodeDataModel
getChildren, getConnections, reinitialize
 
Methods inherited from class edu.usc.cse.desi.model.AbstractDataModel
getMyPropertyInitializer, getProperties, getPropertyDisplayName, getPropertyValue, hasProperty, setPropertyValue
 
Methods inherited from class edu.usc.cse.desi.model.AbstractDESIModel
addPropertyChangeListener, firePropertyChange, propertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostDataModel

public HostDataModel()

HostDataModel

public HostDataModel(PropertyInitializer prop_init)
Method Detail

addConnection

public void addConnection(PhysicalLinkDataModel link)
Adds a link to this host if the link is not already added.

Parameters:
link - PhysicalLinkDataModel

removeConnection

public void removeConnection(PhysicalLinkDataModel link)
Removes the link from the host. If link is not in host, nothing happens.

Parameters:
link - PhysicalLinkDataModel

addComponent

public void addComponent(ComponentDataModel component)
Adds the component to the host if it is not already added to the host.

Parameters:
component - ComponentDataModel

removeComponent

public void removeComponent(ComponentDataModel component)
Removes the component from the host if it has already been added to the host.

Parameters:
component - ComponentDataModel

removeAllComponents

public void removeAllComponents()
This method will simply remove all the components that are deployed onto this host. It's the equivalent of calling HostDataModel.removeComponent() for every component.