Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.altara.mars
Class MarsModel  view MarsModel download MarsModel.java

java.lang.Object
  extended byorg.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.


Field Summary
private  java.util.LinkedList hostListCache
           
private  java.util.SortedMap hosts
           
private  java.util.HashSet mmListeners
           
static org.jdom.Namespace NAMESPACE
           
 
Constructor Summary
MarsModel()
           
 
Method Summary
 void addHost(Host host)
           
 void addMarsModelListener(MarsModelListener mml)
           
 java.util.Enumeration children()
          children
 void clearMarsModelListeners()
           
static MarsModel fromJDOMElem(org.jdom.Element root)
           
 boolean getAllowsChildren()
          getAllowsChildren
 javax.swing.tree.TreeNode getChildAt(int childIndex)
          getChildAt
 int getChildCount()
          getChildCount
 Host getHost(java.lang.String name)
           
 java.util.Iterator getHostNames()
           
 java.util.Iterator getHosts()
           
 int getIndex(javax.swing.tree.TreeNode node)
          getIndex
 javax.swing.tree.TreeNode getParent()
          getParent
 java.util.Set getServiceSet()
           
 void hostChanged(Host host)
           
 void hostListChanged()
           
 boolean isLeaf()
          isLeaf
 void removeHost(Host host)
           
 void removeHost(java.lang.String name)
           
 void removeMarsModelListener(MarsModelListener mml)
           
 void serviceChanged(Service service)
           
 void serviceListChanged(Host host)
           
 org.jdom.Element toJDOMElem(boolean includeStatus)
           
private  void updateHostListCache()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

MarsModel

public MarsModel()
Method Detail

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