|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.outage.XmlRpcNotifier
This class create an XMLRPC client and provide methods to notify the external XMLRPC server for 'nodeLostService', 'nodeRegainedService', 'interfaceDown', 'interfaceUp', 'nodeDown' and 'nodeUp' events.
Field Summary | |
private Event |
m_event
The event from which data is to be read |
private org.apache.xmlrpc.XmlRpcClient |
m_notifier
The xmlrpc client to be used to notify the external xmlrpc server of the occurance of an event |
Constructor Summary | |
XmlRpcNotifier(java.lang.String url,
Event event)
The constructor |
Method Summary | |
private java.lang.String |
getNodeLabel(long nodeId)
This method retrieves the nodeLable from the database for a given nodeId. |
java.lang.String |
sendInterfaceDownEvent()
Notify the external xmlrpc server the occurance of the 'interfaceDown' event. |
java.lang.String |
sendInterfaceUpEvent()
Notify the external xmlrpc server the occurance of the 'interfaceUp' event. |
java.lang.String |
sendNodeDownEvent()
Notify the external xmlrpc server the occurance of the 'nodeDown' event. |
java.lang.String |
sendNodeUpEvent()
Notify the external xmlrpc server the occurance of the 'nodeUp' event. |
java.lang.String |
sendServiceDownEvent()
Notify the external xmlrpc server the occurance of the 'nodeLostService' event. |
java.lang.String |
sendServiceUpEvent()
Notify the external xmlrpc server the occurance of the 'nodeRegainedService' event. |
private java.lang.String |
sendXmlrpcRequest(java.lang.String command,
java.util.Vector params)
This method sends an xmlrpc request to an external xmlrpc server and gets the response from the xmlrpc server as a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Event m_event
private org.apache.xmlrpc.XmlRpcClient m_notifier
Constructor Detail |
public XmlRpcNotifier(java.lang.String url, Event event) throws java.net.MalformedURLException
url
- the xmlrpc server urlevent
- the event to be notified to the external xmlrpc serverMethod Detail |
public java.lang.String sendServiceDownEvent() throws org.apache.xmlrpc.XmlRpcException, java.io.IOException
Notify the external xmlrpc server the occurance of the 'nodeLostService' event.
org.apache.xmlrpc.XmlRpcException
java.io.IOException
public java.lang.String sendServiceUpEvent() throws org.apache.xmlrpc.XmlRpcException, java.io.IOException
Notify the external xmlrpc server the occurance of the 'nodeRegainedService' event.
org.apache.xmlrpc.XmlRpcException
java.io.IOException
public java.lang.String sendInterfaceDownEvent() throws org.apache.xmlrpc.XmlRpcException, java.io.IOException
Notify the external xmlrpc server the occurance of the 'interfaceDown' event.
org.apache.xmlrpc.XmlRpcException
java.io.IOException
public java.lang.String sendInterfaceUpEvent() throws org.apache.xmlrpc.XmlRpcException, java.io.IOException
Notify the external xmlrpc server the occurance of the 'interfaceUp' event.
org.apache.xmlrpc.XmlRpcException
java.io.IOException
public java.lang.String sendNodeDownEvent() throws org.apache.xmlrpc.XmlRpcException, java.io.IOException
Notify the external xmlrpc server the occurance of the 'nodeDown' event.
org.apache.xmlrpc.XmlRpcException
java.io.IOException
public java.lang.String sendNodeUpEvent() throws org.apache.xmlrpc.XmlRpcException, java.io.IOException
Notify the external xmlrpc server the occurance of the 'nodeUp' event.
org.apache.xmlrpc.XmlRpcException
java.io.IOException
private java.lang.String sendXmlrpcRequest(java.lang.String command, java.util.Vector params) throws org.apache.xmlrpc.XmlRpcException, java.io.IOException
This method sends an xmlrpc request to an external xmlrpc server and gets the response from the xmlrpc server as a String.
command
- The server command to process the request.params
- a list of parameters need for the external server
command to process the request.
org.apache.xmlrpc.XmlRpcException
java.io.IOException
private java.lang.String getNodeLabel(long nodeId)
This method retrieves the nodeLable from the database for a given nodeId.
nodeId
- the nodeId to retrieve the node label for.
|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |