|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.events.EventBase | +--org.opennms.bb.dp.events.Event
Field Summary | |
private String |
m_host
The host that generated the event |
private String |
m_interface
The interface name |
private String |
m_nodeid
The node identifier. |
private List |
m_parms
The EventParameter objects |
private String |
m_service
The service name |
private String |
m_snmphost
The snmp host that generated the trap |
private String |
m_source
The source of the event, this is a required field |
private Calendar |
m_time
The time of the event. |
Fields inherited from class org.opennms.bb.dp.events.EventBase |
m_autoaction, m_descr, m_forward, m_loggroup, m_logmsg, m_mouseovertext, m_notification, m_operaction, m_operinstruct, m_severity, m_snmp, m_tticket, m_uei |
Constructor Summary | |
Event()
Constructs a new event object with all the default values. |
|
Event(Event second)
Constucts a new event object that is a duplicate of the current event. |
|
Event(String source)
Construct a new event from the specific source. |
Method Summary | |
void |
addParm(EventParameter parm)
Adds a new parameter value to the currently defined list. |
String |
getHost()
Returns the currently defined host for the event. |
String |
getInterface()
Returns the currently defined interface for the event. |
String |
getNodeID()
Returns the current node identifier for the event. |
EventParameter |
getParm(int which)
Returns the parameter at the specific index. |
List |
getParms()
returns the current list of parameters for the event. |
int |
getParmsSize()
Returns the current number of parameters in the list. |
String |
getService()
Returns the current service for the event. |
String |
getSnmpHost()
Returns the snmphost for the event, if any. |
String |
getSource()
Returns the source for the event. |
Calendar |
getTime()
Returns the current time associataed with the event. |
boolean |
hasHost()
Returns true if a host is currently defined for the event. |
boolean |
hasInterface()
Returns true if the interface is currently set for the event. |
boolean |
hasNodeID()
Returns true if the node identification is currently set for the event. |
boolean |
hasParms()
Returns true if the event has at least one parameter defined for the event. |
boolean |
hasService()
Returns true if there is a service currently defined for the event. |
boolean |
hasSnmpHost()
Returns true if the snmphost for the event is set. |
boolean |
hasTime()
Returns true if the event has a time associated with the event. |
(package private) void |
serializeToXML(PrintStream ps)
Writes self to event stream. |
void |
setHost(String host)
Sets the host for the event. |
void |
setInterface(String iface)
Sets the current interface for the event |
void |
setNodeID(String id)
Sets the node identifier for the current service. |
void |
setService(String service)
Sets the current service for the event. |
void |
setSnmpHost(String host)
Sets the current snmp host for the event. |
void |
setSource(String source)
Sets the current source string for the event. |
void |
setTime(Calendar time)
Sets the time for the event to be equal to the passed time. |
void |
setTime(Date time)
Sets the current time for the event. |
void |
setTime(long time)
Sets the current time based on the epoch time passed to the call. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private String m_source
private Calendar m_time
private String m_host
private String m_snmphost
private String m_nodeid
private String m_service
private String m_interface
private List m_parms
Constructor Detail |
public Event()
public Event(Event second)
second
- The event to copy into self.public Event(String source)
source
- The source of the event.Method Detail |
public String getSource()
public void setSource(String source)
source
- The new source for the event.public boolean hasTime()
public Calendar getTime()
public void setTime(Calendar time)
time
- The new time for the event.public void setTime(Date time)
time
- The time for the event.public void setTime(long time)
time
- The epoch time for the event.public boolean hasHost()
public String getHost()
public void setHost(String host)
host
- The host for the event.public boolean hasSnmpHost()
public String getSnmpHost()
public void setSnmpHost(String host)
host
- The snmp host informationpublic boolean hasNodeID()
public String getNodeID()
public void setNodeID(String id)
id
- The new node identification.public boolean hasService()
public String getService()
public void setService(String service)
service
- The new service for the event.public boolean hasInterface()
public String getInterface()
public void setInterface(String iface)
iface
- The new interface for the event.public boolean hasParms()
public List getParms()
public int getParmsSize()
public EventParameter getParm(int which)
which
- The index of the desired parameter.IndexOutOfBoundsException
- Thrown if the index
is greater than the size of the list.public void addParm(EventParameter parm)
parm
- THe parameter to add to the list.void serializeToXML(PrintStream ps)
Writes self to event stream. This implementation is based upon the format of an event object in the event.dtd.
serializeToXML
in class EventBase
ps
- The print stream to serialize to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |