|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMyEventManager
iCMS.pollerd.GenericData
public class GenericData
This class is a data holder for general data
Revision Changes :
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Field Summary | |
---|---|
protected String |
allocatedMibs
|
protected boolean |
canStart
|
protected boolean |
canStop
|
protected Hashtable |
children
|
protected Vector |
descr
|
protected String |
host
|
protected Vector |
info
|
protected Vector |
mibDirs
|
protected Vector |
mibs
|
protected String |
name
|
protected GenericData |
parent
|
protected ProbeData |
probe
|
protected boolean |
propagate
|
protected AdvancedSnmpManager |
snmpMan
|
protected int |
status
|
protected String |
token
|
protected String |
type
|
Constructor Summary | |
---|---|
GenericData(GenericData parent)
default constructor |
Method Summary | |
---|---|
void |
addChild(GenericData child)
add a child to this item |
void |
addDescription(String descr)
adds a descriptive line for this items description |
void |
addMib(String mib)
adds a mib to this item |
void |
addMibDir(String mibDir)
adds a mibdir to this item |
protected void |
allocateAndAddMib(String newMib)
sets this item's allocated mibs and forward it to it's childeren it takes in account allocatedMibs (eg /usr/lib/mibs) and expands it with its newMib when found in a dir (setMibDir) |
boolean |
canStart()
can this item be started ? |
boolean |
canStop()
can this item be stopped ? |
Object |
clone(GenericData parent)
create an exact copy of this item, with all settings included |
GenericData |
getChild(String name)
get a child from this item |
Hashtable |
getChildren()
get this item's children |
Vector |
getDescription()
get this item's description as lines of Strings |
String |
getHost()
get this item's host name |
Vector |
getMibDirs()
gets the mib dirs of this item |
String |
getMibDirsAsString()
gets the mib dirs of this item as a string |
Vector |
getMibs()
gets the mibs of this item |
String |
getName()
get this item's name |
ProbeData |
getProbe()
returns this items probe, if available |
boolean |
getPropagate()
get this item's propagate status |
int |
getStatus()
get this item's status |
String |
getType()
get this item's type (handy when overloaded) returns "generic" for this class but other names for subclasses |
void |
initMonitoring(AdvancedSnmpManager snmpMan)
initializes the monitoring process it is wise to call setMibDirs, setMib and setAllocatedMibs before calling init, as from here they propagate down to the children |
void |
list(PrintStream out,
boolean stat,
String root)
list out the all info of this item and its children including stat if stat is true |
void |
myEventOccurred(MyEvent evt)
Event Handling |
void |
print(PrintStream out,
boolean all,
String root)
print out the all info of this item |
void |
removeAllChildren()
remove all of this items children |
Object |
removeChild(String name)
remove one of this items children |
void |
setAllocatedMibs(String alreadyAllocatedMibs)
sets this item's allocated mibs and forward it to it's childeren it takes in account alreadyAllocatedMibs (eg /usr/lib/mibs) and expands it with its mibs (addMib, setMibs) when found in a dir (setMibDir) |
void |
setChildren(Hashtable children)
set all of this items children |
void |
setDescription(Vector descr)
sets all descriptive lines of Strings for this item |
void |
setHost(String host)
sets this item's host name |
void |
setInfo(Vector info)
sets all informational items for this item |
void |
setItemToken(String name)
sets this item's token e.g /x/y/z |
void |
setMibDirs(Vector dirs)
sets this item's mibdirs |
void |
setMibs(Vector mibs)
sets the mibs of this item |
void |
setName(String name)
sets the name of this item |
void |
setParent(GenericData parent)
sets the parent of this item |
void |
setProbe(ProbeData newProbe)
sets the probe for this item |
void |
setPropagate(boolean prop)
sets this item's propagation property. |
void |
setPropagate(String prop)
sets this item's propagation property. |
void |
setStatus(int status)
sets this item's status |
int |
start()
start item |
void |
startMonitoring()
starts the monitoring process |
int |
stop()
stop item |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface iCMS.pollerd.MonitoredItem |
---|
addMyEventListener, removeMyEventListener |
Field Detail |
---|
protected Hashtable children
protected String name
protected String token
protected String host
protected String type
protected boolean propagate
protected int status
protected ProbeData probe
protected Vector mibs
protected String allocatedMibs
protected Vector mibDirs
protected Vector info
protected Vector descr
protected boolean canStop
protected boolean canStart
protected GenericData parent
protected AdvancedSnmpManager snmpMan
Constructor Detail |
---|
public GenericData(GenericData parent)
Method Detail |
---|
public void setMibs(Vector mibs)
public void setParent(GenericData parent)
public void setName(String name)
public void setInfo(Vector info)
public void setDescription(Vector descr)
setDescription
in interface MonitoredItem
public void addMib(String mib)
public void addMibDir(String mibDir)
public void addDescription(String descr)
addDescription
in interface MonitoredItem
public void setItemToken(String name)
setItemToken
in interface MonitoredItem
public void setAllocatedMibs(String alreadyAllocatedMibs)
protected void allocateAndAddMib(String newMib)
public void setMibDirs(Vector dirs)
public void setPropagate(boolean prop)
public void setPropagate(String prop)
public void setHost(String host)
public void setStatus(int status)
public void setProbe(ProbeData newProbe)
public void addChild(GenericData child)
public String getMibDirsAsString()
public Vector getMibDirs()
public Vector getMibs()
public GenericData getChild(String name)
public boolean getPropagate()
public Hashtable getChildren()
public int stop()
public int start()
public boolean canStart()
public boolean canStop()
public String getHost()
public int getStatus()
getStatus
in interface MonitoredItem
public String getType()
public String getName()
getName
in interface MonitoredItem
public Vector getDescription()
getDescription
in interface MonitoredItem
public void setChildren(Hashtable children)
public void removeAllChildren()
public Object removeChild(String name)
public void startMonitoring()
startMonitoring
in interface MonitoredItem
public Object clone(GenericData parent)
public void initMonitoring(AdvancedSnmpManager snmpMan)
it is wise to call setMibDirs, setMib and setAllocatedMibs before calling init, as from here they propagate down to the children
initMonitoring
in interface MonitoredItem
public ProbeData getProbe()
getProbe
in interface MonitoredItem
public void print(PrintStream out, boolean all, String root)
public void list(PrintStream out, boolean stat, String root)
public void myEventOccurred(MyEvent evt)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |