Package com.nt.udc.util
Class SystemModel
java.lang.Object
com.nt.udc.util.SystemModel
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSystemModel
(Vector inNMList) Initializes the SystemModel with the current list of Node Managers. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNM
(com.nt.udc.admin.NMItem newNM) Allows the AdminServer to add a new NodeManager to this model's current list of NodeManagersvoid
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
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).clone()
void
fileChanged
(com.nt.udc.admin.FileItem file) com.nt.udc.admin.NMItem
Allows the AdminServer to get the NMItem object corresponding to the given IP address and port.com.nt.udc.admin.NMItem
Allows the AdminServer to get the NMItem object corresponding to the given IP address and port.Retrieves the list of NodeManagers maintained by this model.com.nt.udc.admin.NodeInfo
getNodeInfo
(String inNodeId) Get a NodeInfo object describing the specified node.com.nt.udc.admin.NodeItem
getNodeItem
(String inNodeId) Allows the AdminServer to get the NodeItem object corresponding to the given Node ID.getNodeList
(String inIPAddress, int inPort) getOutputNodes
(String inNodeId) void
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 fromAcctEventListener.nodeChanged()
events.void
nodeManagerChanged
(com.nt.udc.admin.NMItem nmItem) Updates this SystemModel based on information received fromAcctEventListener.nodeManagerChanged()
events.void
nodeManagersAdded
(Vector inNMList) Updates this SystemModel based on information received fromAcctEventListener.nodeManagersAdded()
events.void
nodeManagersRemoved
(Vector inNMList) Updates this SystemModel based on information received fromAcctEventListener.nodeManagersRemoved()
events.void
nodePerformanceUpdate
(Vector perfs) void
nodesAdded
(com.nt.udc.admin.NMItem nmItem) Updates this SystemModel based on information received fromAcctEventListener.nodesAdded()
events.void
nodesRemoved
(com.nt.udc.admin.NMItem nmItem) Updates this SystemModel based on information received fromAcctEventListener.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
(Vector inNodeItems) Removes the specified nodes from the system.void
removeOutputNodes
(String inNodeId, Vector inOutputNodes) Removes the specified output nodes from the specified node.void
Persists the information contained in this SystemModel to the specified file name.void
setExportNodeList
(Vector nodesToExport) void
setIsHostBased
(boolean isHostBasedEnv) void
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
(String inNodeId, Vector inNodeOutputs) void
systemUpdate
(SystemModel inModel) Updates this SystemModel based on information received fromAcctEventListener.systemUpdate()
events.boolean
validateChannelIds
(Vector inVecNodes)
-
Constructor Details
-
SystemModel
public SystemModel() -
SystemModel
Initializes the SystemModel with the current list of Node Managers.- Parameters:
inNMList
- Vector of NMItem objects representing the current list of NodeManagers known in the system.
-
-
Method Details
-
getNMList
Retrieves the list of NodeManagers maintained by this model.- Returns:
- Vector of NMItem objects which represents all node managers known to the Admin Server.
-
setIsHostBased
public void setIsHostBased(boolean isHostBasedEnv) -
setNMList
Allows the AdminServer to set the list of NodeManagers.- Parameters:
inNMList
- List of NodeManagers which replaces this model's current list of NodeManagers.
-
getNodeList
- Returns:
- Returns a Vector of NodeInfo objects which represents all nodes known to the Admin Server.
-
setExportNodeList
-
getExportNodeList
-
getNodeList
- Parameters:
inPort
- Port the NodeManager is running oninIPAddres
- IPAddress of the NodeManager to retrieve the list of nodes for.- Returns:
- Vector of NodeInfo objects which represents all nodes controlled by the NodeManager at the specified IP Address/Port.
-
getOutputNodes
- Parameters:
inNodeId
- String representing the node ID to get the destinations for.- Returns:
- Vector of ChannelInfo objects which represents all channels/nodes that receive input from the specified node.
-
setNodeOutputs
- Parameters:
inNodeOutputs
- Vector of String objects representing the nodes which should have their output nodes set toinNodeId
.inNodeID
- Node ID to set output nodes to.
-
validateChannelIds
-
removeOutputNodes
Removes the specified output nodes from the specified node.- Parameters:
inNodeId
- Node ID which will have output nodes removed.inOutputNodes
- Vector of String objects representing the output nodes to be removed frominNodeId
.
-
addNM
public void addNM(com.nt.udc.admin.NMItem newNM) Allows the AdminServer to add a new NodeManager to this model's current list of NodeManagers- Parameters:
newNM
- NMItem representing the Node Manager to be added.
-
changeNM
public void changeNM(com.nt.udc.admin.NMItem inNMItem) Allows the AdminServer to replace an NMItem object in this SystemModel with the given NMItem.inNMItem.getIPAddress()
andinNMItem.getPort()
are used to identify the NodeManager to change.- Parameters:
inNMItem
- The NMItem to replace this model's current one.
-
removeNM
public void removeNM(com.nt.udc.admin.NMItem inNMItem) Allows the AdminServer to remove the corresponding NMItem object.inNMItem.getIPAddress()
andinNMItem.getPort()
are used to identify the NodeManager to remove.- Parameters:
inNMItem
- The NMItem to remove from this model's current list of Node Managers.
-
addNode
public 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.- Parameters:
newNode
- NodeItem to be added
-
addNodes
Adds multiple nodes to the NodeManager residing at the IP Address specified in the NodeItem objects.- Parameters:
newNodes
- Vector of NodeItem objects to be added
-
removeNode
public void removeNode(com.nt.udc.admin.NodeItem inNodeItem) Removes the specified node from the system.- Parameters:
inNodeItem
- NodeItem to be removed.
-
removeNodes
Removes the specified nodes from the system.- Parameters:
inNodeItems
- Vector of NodeItem objects representing the nodes to be removed.
-
changeNode
public void changeNode(com.nt.udc.admin.NodeItem newNode) Replaces the NodeItem object this model is currently using with the one given (based on NodeId).- Parameters:
changedNode
- NodeItem which changed
-
setNodeInfo
public 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.- Parameters:
nodeInfo
- Parameters for the node
-
getNodeInfo
Get a NodeInfo object describing the specified node.- Parameters:
inNodeId
- Node ID of the node to retrieve the Node Info for
-
load
Initializes this SystemModel with information stored in the given filename. It is assumed that this information was stored using thesave
method.- Parameters:
configFile
- Name of the file to read data from.- Throws:
IOException
-
save
Persists the information contained in this SystemModel to the specified file name.- Parameters:
configFile
- Name of the file to write data to.- Throws:
IOException
-
nodeManagersAdded
Updates this SystemModel based on information received fromAcctEventListener.nodeManagersAdded()
events.- Parameters:
inNMList
- Vector of NMItem objects
-
nodeManagersRemoved
Updates this SystemModel based on information received fromAcctEventListener.nodeManagersRemoved()
events.- Parameters:
inNMList
- Vector of NMItem objects
-
nodeManagerChanged
public void nodeManagerChanged(com.nt.udc.admin.NMItem nmItem) Updates this SystemModel based on information received fromAcctEventListener.nodeManagerChanged()
events.- Parameters:
nmItem
- NMItem representing the NodeManager that changed.
-
nodesAdded
public void nodesAdded(com.nt.udc.admin.NMItem nmItem) Updates this SystemModel based on information received fromAcctEventListener.nodesAdded()
events.- Parameters:
nmItem
- NMItem representing the NodeManager that nodes were added to.
-
nodesRemoved
public void nodesRemoved(com.nt.udc.admin.NMItem nmItem) Updates this SystemModel based on information received fromAcctEventListener.nodesRemoved()
events.- Parameters:
nmItem
- NMItem representing the NodeManager that nodes were removed from.
-
nodeChanged
public void nodeChanged(com.nt.udc.admin.NMItem nmItem) Updates this SystemModel based on information received fromAcctEventListener.nodeChanged()
events.- Parameters:
nmItem
- NMItem representing the NodeManager whose nodes changed
-
fileChanged
public void fileChanged(com.nt.udc.admin.FileItem file) -
nodePerformanceUpdate
-
systemUpdate
Updates this SystemModel based on information received fromAcctEventListener.systemUpdate()
events.- Parameters:
inModel
- SystemModel representing the new state of the system
-
clone
-
getNMItem
Allows the AdminServer to get the NMItem object corresponding to the given IP address and port.- Parameters:
inPort
- Port of the NodeManagerinIPAddres
- IPAddress of the NodeManager- Returns:
- NMItem object corresponding to the NodeManager at the specified IP address and port.
-
getNMItem
Allows the AdminServer to get the NMItem object corresponding to the given IP address and port.- Parameters:
nodeManagerId
- ID of the node manager- Returns:
- NMItem object corresponding to the NodeManager with the specified ID.
-
getNodeItem
Allows the AdminServer to get the NodeItem object corresponding to the given Node ID.
-