|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.eventd.adaptors.udp.UdpReceivedEvent
Field Summary | |
private java.util.List |
m_ackEvents
The list of event that have been acknowledged. |
private java.lang.String |
m_eventXML
The received XML event, decoded using the US-ASCII encoding. |
private Log |
m_log
The decoded event document. |
private int |
m_port
The port of the agent on the remote system. |
private java.net.InetAddress |
m_sender
The internet addrress of the sending agent. |
Constructor Summary | |
private |
UdpReceivedEvent()
Private constructor to prevent the used of new except by the make method. |
Method Summary | |
(package private) void |
ackEvent(Event e)
Adds the event to the list of events acknowledged in this event XML document. |
boolean |
equals(java.lang.Object o)
Returns true if the instance matches the object based upon the remote agent's address & port. |
java.util.List |
getAckedEvents()
Get the acknowledged events |
(package private) int |
getPort()
Returns the sender's port |
(package private) java.net.InetAddress |
getSender()
Returns the sender's address. |
(package private) java.lang.String |
getXmlData()
Returns the raw XML data as a string. |
int |
hashCode()
Returns the hash code of the instance. |
(package private) static UdpReceivedEvent |
make(java.net.DatagramPacket packet)
Constructs a new event encapsulation instance based upon the information passed to the method. |
(package private) static UdpReceivedEvent |
make(java.net.InetAddress addr,
int port,
byte[] data,
int len)
Constructs a new event encapsulation instance based upon the information passed to the method. |
(package private) Log |
unmarshal()
Decodes the XML package from the remote agent. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String m_eventXML
private Log m_log
private java.net.InetAddress m_sender
private int m_port
private java.util.List m_ackEvents
Constructor Detail |
private UdpReceivedEvent()
make
method.
Method Detail |
static UdpReceivedEvent make(java.net.DatagramPacket packet) throws java.io.UnsupportedEncodingException
packet
- The datagram received from the remote agent.
java.io.UnsupportedEncodingException
- Thrown if the data buffer cannot be decoded using the
US-ASCII encoding.static UdpReceivedEvent make(java.net.InetAddress addr, int port, byte[] data, int len) throws java.io.UnsupportedEncodingException
addr
- The remote agent's address.port
- The remote agent's portdata
- The XML data in US-ASCII encoding.len
- The length of the XML data in the buffer.
java.io.UnsupportedEncodingException
- Thrown if the data buffer cannot be decoded using the
US-ASCII encoding.Log unmarshal() throws org.exolab.castor.xml.ValidationException, org.exolab.castor.xml.MarshalException
Log
element of the XML document.
org.exolab.castor.xml.ValidationException
- Throws if the documents data does not match the defined XML
Schema Definition.
org.exolab.castor.xml.MarshalException
- Thrown if the XML is malformed and cannot be converted.void ackEvent(Event e)
e
- The event to acknowledge.java.lang.String getXmlData()
java.net.InetAddress getSender()
int getPort()
public java.util.List getAckedEvents()
public boolean equals(java.lang.Object o)
o
- instance of the class to compare.
public int hashCode()
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |