public class SystemModel
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
SystemModel() |
SystemModel(java.util.Vector inNMList)
Initializes the SystemModel with the current list of Node Managers.
|
Modifier and Type | Method and Description |
---|---|
void |
addNM(com.nt.udc.admin.NMItem newNM)
Allows the AdminServer to add a new NodeManager to this model's
current list of NodeManagers
|
void |
addNode(com.nt.udc.admin.NodeItem newNode)
Add a new node (represented by the NodeItem object) to the
NodeManager residing at the specified IP Address in the NodeItem.
|
void |
addNodes(java.util.Vector newNodes)
Adds multiple nodes to the NodeManager residing at the
IP Address specified in the NodeItem objects.
|
void |
changeNM(com.nt.udc.admin.NMItem inNMItem)
Allows the AdminServer to replace an NMItem object in this
SystemModel with the given NMItem.
|
void |
changeNode(com.nt.udc.admin.NodeItem newNode)
Replaces the NodeItem object this model is currently using
with the one given (based on NodeId).
|
java.lang.Object |
clone() |
void |
fileChanged(com.nt.udc.admin.FileItem file) |
com.nt.udc.admin.NMItem |
getNMItem(java.lang.String inIPAddress,
int inPort)
Allows the AdminServer to get the NMItem object corresponding to the
given IP address and port.
|
java.util.Vector |
getNMList()
Retrieves the list of NodeManagers maintained by this model.
|
com.nt.udc.admin.NodeInfo |
getNodeInfo(java.lang.String inNodeId)
Get a NodeInfo object describing the specified node.
|
com.nt.udc.admin.NodeItem |
getNodeItem(java.lang.String inNodeId)
Allows the AdminServer to get the NodeItem object corresponding to the
given Node ID.
|
java.util.Vector |
getNodeList() |
java.util.Vector |
getNodeList(java.lang.String inIPAddress,
int inPort) |
java.util.Vector |
getOutputNodes(java.lang.String inNodeId) |
void |
load(java.lang.String configFile)
Initializes this SystemModel with information stored in the given
filename.
|
void |
nodeChanged(com.nt.udc.admin.NMItem nmItem)
Updates this SystemModel based on information received from
AcctEventListener.nodeChanged() events. |
void |
nodeManagerChanged(com.nt.udc.admin.NMItem nmItem)
Updates this SystemModel based on information received from
AcctEventListener.nodeManagerChanged() events. |
void |
nodeManagersAdded(java.util.Vector inNMList)
Updates this SystemModel based on information received from
AcctEventListener.nodeManagersAdded() events. |
void |
nodeManagersRemoved(java.util.Vector inNMList)
Updates this SystemModel based on information received from
AcctEventListener.nodeManagersRemoved() events. |
void |
nodePerformanceUpdate(java.util.Vector perfs) |
void |
nodesAdded(com.nt.udc.admin.NMItem nmItem)
Updates this SystemModel based on information received from
AcctEventListener.nodesAdded() events. |
void |
nodesRemoved(com.nt.udc.admin.NMItem nmItem)
Updates this SystemModel based on information received from
AcctEventListener.nodesRemoved() events. |
void |
removeNM(com.nt.udc.admin.NMItem inNMItem)
Allows the AdminServer to remove the corresponding NMItem object.
|
void |
removeNode(com.nt.udc.admin.NodeItem inNodeItem)
Removes the specified node from the system.
|
void |
removeNodes(java.util.Vector inNodeItems)
Removes the specified nodes from the system.
|
void |
removeOutputNodes(java.lang.String inNodeId,
java.util.Vector inOutputNodes)
Removes the specified output nodes from the specified node.
|
void |
save(java.lang.String configFile)
Persists the information contained in this SystemModel to the
specified file name.
|
void |
setNMList(java.util.Vector inNMList)
Allows the AdminServer to set the list of NodeManagers.
|
void |
setNodeInfo(com.nt.udc.admin.NodeInfo nodeInfo)
Set the NodeInfo object of the NodeItem with the corresponding
Node ID to the passed-in NodeInfo object.
|
void |
setNodeOutputs(java.lang.String inNodeId,
java.util.Vector inNodeOutputs) |
void |
systemUpdate(SystemModel inModel)
Updates this SystemModel based on information received from
AcctEventListener.systemUpdate() events. |
boolean |
validateChannelIds(java.util.Vector inVecNodes) |
public SystemModel()
public SystemModel(java.util.Vector inNMList)
inNMList
- Vector of NMItem objects representing the
current list of NodeManagers known in the
system.public java.util.Vector getNMList()
public void setNMList(java.util.Vector inNMList)
inNMList
- List of NodeManagers which replaces this
model's current list of NodeManagers.public java.util.Vector getNodeList()
public java.util.Vector getNodeList(java.lang.String inIPAddress, int inPort)
inIPAddres
- IPAddress of the NodeManager to retrieve the
list of nodes for.inPort
- Port the NodeManager is running onpublic java.util.Vector getOutputNodes(java.lang.String inNodeId)
inNodeId
- String representing the node ID to get the
destinations for.public void setNodeOutputs(java.lang.String inNodeId, java.util.Vector inNodeOutputs)
inNodeID
- Node ID to set output nodes to.inNodeOutputs
- Vector of String objects representing the
nodes which should have their output nodes
set to inNodeId
.public boolean validateChannelIds(java.util.Vector inVecNodes)
public void removeOutputNodes(java.lang.String inNodeId, java.util.Vector inOutputNodes)
inNodeId
- Node ID which will have output nodes removed.inOutputNodes
- Vector of String objects representing the
output nodes to be removed from
inNodeId
.public void addNM(com.nt.udc.admin.NMItem newNM)
newNM
- NMItem representing the Node Manager to be added.public void changeNM(com.nt.udc.admin.NMItem inNMItem)
inNMItem.getIPAddress()
and
inNMItem.getPort()
are used to identify the
NodeManager to change.inNMItem
- The NMItem to replace this model's current one.public void removeNM(com.nt.udc.admin.NMItem inNMItem)
inNMItem.getIPAddress()
and
inNMItem.getPort()
are used to identify the
NodeManager to remove.inNMItem
- The NMItem to remove from this model's
current list of Node Managers.public void addNode(com.nt.udc.admin.NodeItem newNode)
newNode
- NodeItem to be addedpublic void addNodes(java.util.Vector newNodes)
newNodes
- Vector of NodeItem objects to be addedpublic void removeNode(com.nt.udc.admin.NodeItem inNodeItem)
inNodeItem
- NodeItem to be removed.public void removeNodes(java.util.Vector inNodeItems)
inNodeItems
- Vector of NodeItem objects representing the
nodes to be removed.public void changeNode(com.nt.udc.admin.NodeItem newNode)
changedNode
- NodeItem which changedpublic void setNodeInfo(com.nt.udc.admin.NodeInfo nodeInfo)
nodeInfo
- Parameters for the nodepublic com.nt.udc.admin.NodeInfo getNodeInfo(java.lang.String inNodeId)
inNodeId
- Node ID of the node to retrieve the Node Info forpublic void load(java.lang.String configFile) throws java.io.IOException
save
method.configFile
- Name of the file to read data from.java.io.IOException
public void save(java.lang.String configFile) throws java.io.IOException
configFile
- Name of the file to write data to.java.io.IOException
public void nodeManagersAdded(java.util.Vector inNMList)
AcctEventListener.nodeManagersAdded()
events.inNMList
- Vector of NMItem objectspublic void nodeManagersRemoved(java.util.Vector inNMList)
AcctEventListener.nodeManagersRemoved()
events.inNMList
- Vector of NMItem objectspublic void nodeManagerChanged(com.nt.udc.admin.NMItem nmItem)
AcctEventListener.nodeManagerChanged()
events.nmItem
- NMItem representing the NodeManager that changed.public void nodesAdded(com.nt.udc.admin.NMItem nmItem)
AcctEventListener.nodesAdded()
events.nmItem
- NMItem representing the NodeManager that nodes
were added to.public void nodesRemoved(com.nt.udc.admin.NMItem nmItem)
AcctEventListener.nodesRemoved()
events.nmItem
- NMItem representing the NodeManager that nodes
were removed from.public void nodeChanged(com.nt.udc.admin.NMItem nmItem)
AcctEventListener.nodeChanged()
events.nmItem
- NMItem representing the NodeManager whose nodes
changedpublic void fileChanged(com.nt.udc.admin.FileItem file)
public void nodePerformanceUpdate(java.util.Vector perfs)
public void systemUpdate(SystemModel inModel)
AcctEventListener.systemUpdate()
events.inModel
- SystemModel representing the new state of the systempublic java.lang.Object clone()
clone
in class java.lang.Object
public com.nt.udc.admin.NMItem getNMItem(java.lang.String inIPAddress, int inPort)
inIPAddres
- IPAddress of the NodeManagerinPort
- Port of the NodeManagerpublic com.nt.udc.admin.NodeItem getNodeItem(java.lang.String inNodeId)