java.lang.Object
org.altara.mars.MarsModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.tree.TreeNode
- public class MarsModel
- extends java.lang.Object
- implements java.io.Serializable, javax.swing.tree.TreeNode
Represents the whole of the data model used by the
MARS monitoring engine. MarsModel is the root of the data model
tree containing hosts and services. MarsModel contains both
configuration and current service status information.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAMESPACE
public static final org.jdom.Namespace NAMESPACE
hosts
private java.util.SortedMap hosts
hostListCache
private java.util.LinkedList hostListCache
mmListeners
private java.util.HashSet mmListeners
MarsModel
public MarsModel()
addHost
public void addHost(Host host)
getHost
public Host getHost(java.lang.String name)
getHostNames
public java.util.Iterator getHostNames()
getHosts
public java.util.Iterator getHosts()
removeHost
public void removeHost(java.lang.String name)
removeHost
public void removeHost(Host host)
getServiceSet
public java.util.Set getServiceSet()
updateHostListCache
private void updateHostListCache()
addMarsModelListener
public void addMarsModelListener(MarsModelListener mml)
removeMarsModelListener
public void removeMarsModelListener(MarsModelListener mml)
clearMarsModelListeners
public void clearMarsModelListeners()
hostChanged
public void hostChanged(Host host)
serviceChanged
public void serviceChanged(Service service)
hostListChanged
public void hostListChanged()
serviceListChanged
public void serviceListChanged(Host host)
getAllowsChildren
public boolean getAllowsChildren()
- Description copied from interface:
javax.swing.tree.TreeNode
- getAllowsChildren
- Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode
getChildCount
public int getChildCount()
- Description copied from interface:
javax.swing.tree.TreeNode
- getChildCount
- Specified by:
getChildCount in interface javax.swing.tree.TreeNode
isLeaf
public boolean isLeaf()
- Description copied from interface:
javax.swing.tree.TreeNode
- isLeaf
- Specified by:
isLeaf in interface javax.swing.tree.TreeNode
getParent
public javax.swing.tree.TreeNode getParent()
- Description copied from interface:
javax.swing.tree.TreeNode
- getParent
- Specified by:
getParent in interface javax.swing.tree.TreeNode
children
public java.util.Enumeration children()
- Description copied from interface:
javax.swing.tree.TreeNode
- children
- Specified by:
children in interface javax.swing.tree.TreeNode
getChildAt
public javax.swing.tree.TreeNode getChildAt(int childIndex)
- Description copied from interface:
javax.swing.tree.TreeNode
- getChildAt
- Specified by:
getChildAt in interface javax.swing.tree.TreeNode
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Description copied from interface:
javax.swing.tree.TreeNode
- getIndex
- Specified by:
getIndex in interface javax.swing.tree.TreeNode
toJDOMElem
public org.jdom.Element toJDOMElem(boolean includeStatus)
fromJDOMElem
public static MarsModel fromJDOMElem(org.jdom.Element root)
throws InvalidDocumentException,
java.net.UnknownHostException