|
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.capsd.BroadcastEventProcessor
Field Summary | |
private java.lang.String |
m_localServer
local openNMS server name |
private java.util.Set |
m_notifySet
Set of event ueis that we should notify when we receive and when a success or failure occurs. |
private Scheduler |
m_scheduler
The Capsd rescan scheduler |
private FifoQueue |
m_suspectQ
The location where suspectInterface events are enqueued for processing. |
private static java.lang.String |
SQL_ADD_INTERFACE_TO_SERVER
SQL statement used to add an interface/server mapping into the database; |
private static java.lang.String |
SQL_ADD_SERVICE_TO_MAPPING
SQL statement used to add an interface/service mapping into the database. |
private static java.lang.String |
SQL_COUNT_INTERFACES_ON_NODE
SQL statement used to count all the interface on a node |
private static java.lang.String |
SQL_DELETE_ALL_INTERFACES_ON_NODE
SQL statement used to delete all the ipinterfaces with a specified nodeid. |
private static java.lang.String |
SQL_DELETE_ALL_SERVICES_INTERFACE_MAPPING
SQL statement used to delete all services mapping to a specified interface from the database. |
private static java.lang.String |
SQL_DELETE_ASSETS_ON_NODE
SQL statement used to delete all assets from the database with a specified nodeid. |
private static java.lang.String |
SQL_DELETE_EVENTS_ON_INTERFACE
SQL statement used to delete all events associated with a specified interface from the database. |
private static java.lang.String |
SQL_DELETE_EVENTS_ON_NODE
SQL statement used to delete all events from the database with a specified nodeid. |
private static java.lang.String |
SQL_DELETE_IFSERVICES_ON_INTERFACE
SQL statement used to delete all ifservices from the database with a specified interface. |
private static java.lang.String |
SQL_DELETE_IFSERVICES_ON_NODE
SQL statement used to delete all ifservices from the database with a specified nodeid. |
private static java.lang.String |
SQL_DELETE_INTERFACE
SQL statement used to delete an ipinterfac with a specified nodeid and ipaddress. |
private static java.lang.String |
SQL_DELETE_INTERFACE_ON_SERVER
SQL statement used to delete an interface/server mapping from the database. |
private static java.lang.String |
SQL_DELETE_NODEID
SQL statement used to delete a node from the database with a specified nodelabel. |
private static java.lang.String |
SQL_DELETE_NOTIFICATIONS_ON_INTERFACE
SQL statement used to delete all notifications associated with a specified interface from the database. |
private static java.lang.String |
SQL_DELETE_NOTIFICATIONS_ON_NODE
SQL statement used to delete all notifications from the database with a specified nodeid. |
private static java.lang.String |
SQL_DELETE_OUTAGES_ON_INTERFACE
SQL statement used to delete all notifications associated with a specified interface from the database. |
private static java.lang.String |
SQL_DELETE_OUTAGES_ON_NODE
SQL statement used to delete all outages from the database with a specified nodeid. |
private static java.lang.String |
SQL_DELETE_SERVICE_INTERFACE_MAPPING
SQL statement used to delete an interface/service mapping from the database. |
private static java.lang.String |
SQL_DELETE_SNMPINTERFACE_ON_INTERFACE
SQL statement used to delete the snmpinterface entry associated with a specified interface from the database. |
private static java.lang.String |
SQL_DELETE_SNMPINTERFACE_ON_NODE
SQL statement used to delete all snmpinterface from the database with a specified nodeid. |
private static java.lang.String |
SQL_DELETE_USERSNOTIFIED_ON_INTERFACE
SQL statement used to delete all usersnotified info associated with a specified interface from the database. |
private static java.lang.String |
SQL_DELETE_USERSNOTIFIED_ON_NODE
SQL statement used to delete all usersNotified from the database with a specified nodeid. |
private static java.lang.String |
SQL_FIND_SERVICES_ON_NODE
SQL statement used to count all the interface on a node |
private static java.lang.String |
SQL_QUERY_IPADDRESS_EXIST
SQL statement used to verify if an ipinterface with the specified ip address exists in the database and retrieve the nodeid if exists. |
private static java.lang.String |
SQL_QUERY_IPINTERFACE_EXIST
SQL statement used to query the 'node' and 'ipinterface' tables to verify if a specified ipaddr and node label have already exist in the database. |
private static java.lang.String |
SQL_QUERY_NODE_EXIST
SQL statement used to query if a node with the specified nodelabel exist in the database, and the nodeid from the database if exists. |
private static java.lang.String |
SQL_QUERY_PRIMARY_INTERFACE
SQL statement used to query if an interface is the snmp primary interface of a node. |
private static java.lang.String |
SQL_QUERY_SERVICE_EXIST
SQL statement used to verify if an ifservice with the specified ip address and service name exists in the database. |
private static java.lang.String |
SQL_QUERY_SERVICE_MAPPING_EXIST
SQL statement used to query if an interface/service mapping already exists in the database. |
private static java.lang.String |
SQL_RETRIEVE_NODEID
SQL query to retrieve nodeid of a particulary interface address |
private static java.lang.String |
SQL_RETRIEVE_SERVICE_ID
SQL statement used to retrieve the serviced id from the database with a specified service name. |
Constructor Summary | |
(package private) |
BroadcastEventProcessor(FifoQueue suspectQ,
Scheduler scheduler)
Constructor |
Method Summary | |
void |
close()
Unsubscribe from eventd |
private int |
countOtherInterfacesOnNode(java.sql.Connection dbConn,
long nodeId,
java.lang.String ipAddr)
Counts the number of interfaces on the node other than a given interface |
private int |
countOtherServicesOnInterface(java.sql.Connection dbConn,
long nodeId,
java.lang.String ipAddr,
java.lang.String service)
Counts the number of other non deleted services associated with the interface defined by nodeid/ipAddr |
private int |
countServicesOnOtherInterfaces(java.sql.Connection dbConn,
long nodeId,
java.lang.String ipAddr)
Counts the number of non deleted services on a node on interfaces other than a given interface |
private java.util.List |
createInterfaceOnNode(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipaddr,
long txNo)
FIXME: finish the doc here |
private void |
createMessageSelectorAndSubscribe()
Create message selector to set to the subscription |
private java.util.List |
createNodeWithInterface(java.sql.Connection conn,
java.lang.String nodeLabel,
java.lang.String ipaddr,
long txNo)
This method add a node with the specified node label to the database. |
private java.util.List |
doAddInterface(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipaddr,
long txNo)
FIXME: finish the docs here |
private java.util.List |
doAddNode(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipaddr,
long txNo)
Perform the buld of the work for processing an addNode event |
private java.util.List |
doAddServiceMapping(java.sql.Connection dbConn,
java.lang.String ipaddr,
java.lang.String serviceName,
long txNo)
FIXME: finish the doc here |
private java.util.List |
doAddServiceToInterface(java.sql.Connection dbConn,
java.lang.String ipaddr,
java.lang.String serviceName,
int serviceId,
long txNo)
FIXME: finish the doc here |
private java.util.List |
doChangeService(java.sql.Connection dbConn,
java.lang.String ipaddr,
java.lang.String serviceName,
java.lang.String action,
long txNo)
FIXME: finish the doc here |
private java.util.List |
doCreateInterfaceMappings(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipaddr,
java.lang.String hostName,
long txNo)
FIXME: finish the doc here |
private java.util.List |
doDeleteInterface(java.sql.Connection dbConn,
java.lang.String source,
long nodeid,
java.lang.String ipAddr,
long txNo)
Mark as deleted the specified interface and its associated services, if delete propagation is enable and the interface is the only one on the node, delete the node as well. |
private java.util.List |
doDeleteInterfaceMappings(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipaddr,
java.lang.String hostName,
long txNo)
FIXME: finish the doc here |
private java.util.List |
doDeleteNode(java.sql.Connection dbConn,
java.lang.String source,
long nodeid,
long txNo)
Mark as deleted the specified node, its associated interfaces and services. |
private java.util.List |
doDeleteService(java.sql.Connection dbConn,
java.lang.String source,
long nodeid,
java.lang.String ipAddr,
java.lang.String service,
long txNo)
Mark as deleted the specified service, if this is the only service on an interface or node and deletePropagation is enabled, the interface or node is marked as deleted as well. |
private java.util.List |
doDeleteServiceMapping(java.sql.Connection dbConn,
java.lang.String ipaddr,
java.lang.String serviceName,
long txNo)
FIXME: finish the doc here |
private java.util.List |
doUpdateServer(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipaddr,
java.lang.String action,
java.lang.String hostName,
long txNo)
FIXME: finish the doc here |
private java.util.List |
doUpdateService(java.sql.Connection dbConn,
java.lang.String ipaddr,
java.lang.String serviceName,
java.lang.String action,
long txNo)
FIXME: finish the doc here |
private boolean |
existsInServerMap(java.sql.Connection dbConn,
java.lang.String hostName,
java.lang.String ipaddr)
FIXME: finish the doc here |
private int[] |
findNodeIdForServiceAndInterface(java.sql.Connection dbConn,
java.lang.String ipaddr,
java.lang.String serviceName)
FIXME: finish the doc here |
private long[] |
findNodeIdsForInterfaceAndLabel(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipAddr)
FIXME: finish the doc here |
java.lang.String |
getLocalServer()
Get the local server name |
java.lang.String |
getName()
Return an id for this event listener |
private void |
handleAddInterface(Event event)
Process the event, add the specified interface into database. |
private void |
handleAddNode(Event event)
Process an addNode event. |
private void |
handleChangeService(Event event)
Process the event, add or remove a specified service from an interface. |
private void |
handleDeleteInterface(Event e)
Handle a deleteInterface Event. |
private void |
handleDeleteNode(Event e)
Handle a deleteNode Event. |
private void |
handleDeleteService(Event e)
Handle a deleteService Event. |
private void |
handleDupNodeDeleted(Event event)
FIXME: finish the doc here |
private void |
handleForceRescan(Event event)
FIXME: finish the doc here |
private void |
handleNewSuspect(Event event)
FIXME: finish the doc here |
private void |
handleNodeAdded(Event event)
FIXME: finish the doc here |
private void |
handleNodeDeleted(Event event)
FIXME: finish the doc here |
private void |
handleUpdateServer(Event event)
FIXME: finish the doc here |
private void |
handleUpdateService(Event event)
Process the event, add or remove a specified interface/service pair into the database. |
private boolean |
interfaceExists(java.sql.Connection dbConn,
java.lang.String nodeLabel,
java.lang.String ipaddr)
Returns true if and only an interface with the given ipaddr on a node with the give label exists |
static boolean |
isPropagationEnabled()
Determines if deletePropagation is enabled in the Outage Manager. |
static boolean |
isXmlRpcEnabled()
FIXME: finish the doc here |
private java.util.List |
markAllServicesForInterfaceDeleted(java.sql.Connection dbConn,
java.lang.String source,
long nodeId,
java.lang.String ipAddr,
long txNo)
Mark all the services associated with a given interface as deleted and create service deleted events for each one that gets deleted |
private java.util.List |
markInterfaceDeleted(java.sql.Connection dbConn,
java.lang.String source,
long nodeId,
java.lang.String ipAddr,
long txNo)
Mark the given interface deleted |
private java.util.List |
markInterfacesAndServicesDeleted(java.sql.Connection dbConn,
java.lang.String source,
long nodeId,
long txNo)
Marks all the interfaces and services for a given node deleted and constructs events for each. |
private java.util.List |
markNodeDeleted(java.sql.Connection dbConn,
java.lang.String source,
long nodeId,
long txNo)
Marks a node deleted and creates an event for it if necessary. |
private java.util.List |
markServiceDeleted(java.sql.Connection dbConn,
java.lang.String source,
long nodeId,
java.lang.String ipAddr,
java.lang.String service,
long txNo)
Marks the service deleted in the database and returns a serviceDeleted event for the service, if and only if the service existed |
private boolean |
nodeExists(java.sql.Connection dbConn,
java.lang.String nodeLabel)
Returns true if and only a node with the give label exists |
private void |
notifyEventError(Event event,
java.lang.String msg,
java.lang.Exception ex)
FIXME: finish the doc here |
private void |
notifyEventReceived(Event event)
FIXME: finish the doc here |
private void |
notifyEventSuccess(Event event)
FIXME: finish the doc here |
void |
onEvent(Event event)
This method is invoked by the EventIpcManager when a new event is available for processing. |
private boolean |
serviceMappingExists(java.sql.Connection dbConn,
java.lang.String ipaddr,
java.lang.String serviceName)
FIXME: finish the doc here |
private int |
verifyServiceExists(java.sql.Connection dbConn,
java.lang.String serviceName)
FIXME: finish the doc here |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.lang.String SQL_ADD_INTERFACE_TO_SERVER
private static java.lang.String SQL_ADD_SERVICE_TO_MAPPING
private static java.lang.String SQL_COUNT_INTERFACES_ON_NODE
private static java.lang.String SQL_DELETE_ALL_INTERFACES_ON_NODE
private static java.lang.String SQL_DELETE_ALL_SERVICES_INTERFACE_MAPPING
private static java.lang.String SQL_DELETE_ASSETS_ON_NODE
private static java.lang.String SQL_DELETE_EVENTS_ON_INTERFACE
private static java.lang.String SQL_DELETE_EVENTS_ON_NODE
private static java.lang.String SQL_DELETE_IFSERVICES_ON_INTERFACE
private static java.lang.String SQL_DELETE_IFSERVICES_ON_NODE
private static java.lang.String SQL_DELETE_INTERFACE
private static java.lang.String SQL_DELETE_INTERFACE_ON_SERVER
private static java.lang.String SQL_DELETE_NODEID
private static java.lang.String SQL_DELETE_NOTIFICATIONS_ON_INTERFACE
private static java.lang.String SQL_DELETE_NOTIFICATIONS_ON_NODE
private static java.lang.String SQL_DELETE_OUTAGES_ON_INTERFACE
private static java.lang.String SQL_DELETE_OUTAGES_ON_NODE
private static java.lang.String SQL_DELETE_SERVICE_INTERFACE_MAPPING
private static java.lang.String SQL_DELETE_SNMPINTERFACE_ON_INTERFACE
private static java.lang.String SQL_DELETE_SNMPINTERFACE_ON_NODE
private static java.lang.String SQL_DELETE_USERSNOTIFIED_ON_INTERFACE
private static java.lang.String SQL_DELETE_USERSNOTIFIED_ON_NODE
private static java.lang.String SQL_FIND_SERVICES_ON_NODE
private static java.lang.String SQL_QUERY_IPADDRESS_EXIST
private static java.lang.String SQL_QUERY_IPINTERFACE_EXIST
private static java.lang.String SQL_QUERY_NODE_EXIST
private static java.lang.String SQL_QUERY_PRIMARY_INTERFACE
private static java.lang.String SQL_QUERY_SERVICE_EXIST
private static java.lang.String SQL_QUERY_SERVICE_MAPPING_EXIST
private static java.lang.String SQL_RETRIEVE_NODEID
private static java.lang.String SQL_RETRIEVE_SERVICE_ID
private java.lang.String m_localServer
private java.util.Set m_notifySet
private Scheduler m_scheduler
private FifoQueue m_suspectQ
Constructor Detail |
BroadcastEventProcessor(FifoQueue suspectQ, Scheduler scheduler)
suspectQ
- The queue where new SuspectEventProcessor objects are enqueued
for running..scheduler
- Rescan scheduler.Method Detail |
public static boolean isPropagationEnabled()
public static boolean isXmlRpcEnabled()
public void close()
private int countOtherInterfacesOnNode(java.sql.Connection dbConn, long nodeId, java.lang.String ipAddr) throws java.sql.SQLException
dbConn
- the database connectionipAddr
- the interface not to include in the count
java.sql.SQLException
- if an error occurs talking to the databaseprivate int countOtherServicesOnInterface(java.sql.Connection dbConn, long nodeId, java.lang.String ipAddr, java.lang.String service) throws java.sql.SQLException
dbConn
- the database connectionnodeId
- the node to chckipAddr
- the interface to checkservice
- the name of the service not to include
java.sql.SQLException
private int countServicesOnOtherInterfaces(java.sql.Connection dbConn, long nodeId, java.lang.String ipAddr) throws java.sql.SQLException
dbConn
- the database connectionnodeId
- the nodeid to checkipAddr
- the address of the interface not to include
java.sql.SQLException
private java.util.List createInterfaceOnNode(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipaddr, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- nodeLabel
- ipaddr
- txNo
-
java.sql.SQLException
FailedOperationException
private void createMessageSelectorAndSubscribe()
private java.util.List createNodeWithInterface(java.sql.Connection conn, java.lang.String nodeLabel, java.lang.String ipaddr, long txNo) throws java.sql.SQLException, FailedOperationException
conn
- The JDBC Database connection.nodeLabel
- the node label to identify the node to create.ipaddr
- the ipaddress to be added into the ipinterface table.txNo
- the transaction no.
java.sql.SQLException
- if a database error occurs
FailedOperationException
- if the ipaddr is not resolvableprivate java.util.List doAddInterface(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipaddr, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- nodeLabel
- ipaddr
- txNo
-
java.sql.SQLException
FailedOperationException
private java.util.List doAddNode(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipaddr, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- the database connectionnodeLabel
- the label for the node to addipaddr
- an interface on the node (may be null if no interface is
supplied)txNo
- a transaction number to associate with the modification
java.sql.SQLException
- if a database error occurrs
FailedOperationException
- if other errors occurprivate java.util.List doAddServiceMapping(java.sql.Connection dbConn, java.lang.String ipaddr, java.lang.String serviceName, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- ipaddr
- serviceName
- txNo
-
java.sql.SQLException
FailedOperationException
private java.util.List doAddServiceToInterface(java.sql.Connection dbConn, java.lang.String ipaddr, java.lang.String serviceName, int serviceId, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- ipaddr
- serviceName
- serviceId
- txNo
-
java.sql.SQLException
FailedOperationException
private java.util.List doChangeService(java.sql.Connection dbConn, java.lang.String ipaddr, java.lang.String serviceName, java.lang.String action, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- ipaddr
- serviceName
- action
- txNo
-
java.sql.SQLException
FailedOperationException
private java.util.List doCreateInterfaceMappings(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipaddr, java.lang.String hostName, long txNo) throws java.sql.SQLException
dbConn
- nodeLabel
- ipaddr
- hostName
- txNo
-
java.sql.SQLException
private java.util.List doDeleteInterface(java.sql.Connection dbConn, java.lang.String source, long nodeid, java.lang.String ipAddr, long txNo) throws java.sql.SQLException
dbConn
- the database connectionsource
- the source for any events that must be sentnodeid
- the id of the node the interface resides onipAddr
- the ip address of the interface to be deletedtxNo
- a transaction number to associate with the deletion
java.sql.SQLException
- if any database errors occurprivate java.util.List doDeleteInterfaceMappings(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipaddr, java.lang.String hostName, long txNo) throws java.sql.SQLException
dbConn
- nodeLabel
- ipaddr
- hostName
- txNo
-
java.sql.SQLException
private java.util.List doDeleteNode(java.sql.Connection dbConn, java.lang.String source, long nodeid, long txNo) throws java.sql.SQLException
dbConn
- the connection to the databasesource
- the source for any events to sendnodeid
- the nodeid to be deletedtxNo
- a transaction id to associate with this deletion
java.sql.SQLException
- if any exception occurs communicating with the databaseprivate java.util.List doDeleteService(java.sql.Connection dbConn, java.lang.String source, long nodeid, java.lang.String ipAddr, java.lang.String service, long txNo) throws java.sql.SQLException
dbConn
- the connection to the databasesource
- the source for any events to sendnodeid
- the nodeid that the service resides onipAddr
- the interface that the service resides onservice
- the name of the servicetxNo
- a transaction id to associate with this deletion
java.sql.SQLException
- if any exception occurs communicating with the databaseprivate java.util.List doDeleteServiceMapping(java.sql.Connection dbConn, java.lang.String ipaddr, java.lang.String serviceName, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- ipaddr
- serviceName
- txNo
-
java.sql.SQLException
FailedOperationException
private java.util.List doUpdateServer(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipaddr, java.lang.String action, java.lang.String hostName, long txNo) throws java.sql.SQLException
dbConn
- nodeLabel
- ipaddr
- action
- hostName
- txNo
-
java.sql.SQLException
private java.util.List doUpdateService(java.sql.Connection dbConn, java.lang.String ipaddr, java.lang.String serviceName, java.lang.String action, long txNo) throws java.sql.SQLException, FailedOperationException
dbConn
- ipaddr
- serviceName
- action
- txNo
-
java.sql.SQLException
FailedOperationException
private boolean existsInServerMap(java.sql.Connection dbConn, java.lang.String hostName, java.lang.String ipaddr) throws java.sql.SQLException
dbConn
- hostName
- ipaddr
-
java.sql.SQLException
private int[] findNodeIdForServiceAndInterface(java.sql.Connection dbConn, java.lang.String ipaddr, java.lang.String serviceName) throws java.sql.SQLException
dbConn
- ipaddr
- serviceName
-
java.sql.SQLException
private long[] findNodeIdsForInterfaceAndLabel(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipAddr) throws java.sql.SQLException
dbConn
- nodeLabel
- ipAddr
-
java.sql.SQLException
public java.lang.String getLocalServer()
public java.lang.String getName()
getName
in interface EventListener
private void handleAddInterface(Event event) throws InsufficientInformationException, FailedOperationException
event
- The event to process.
InsufficientInformationException
- if the event is missing essential information
FailedOperationException
- if the operation fails (because of database error for
example)private void handleAddNode(Event event) throws InsufficientInformationException, FailedOperationException
event
- The event to process.
InsufficientInformationException
- if the event is missing information
FailedOperationException
- if an error occurs during processingprivate void handleChangeService(Event event) throws InsufficientInformationException, FailedOperationException
event
- The event to process.
FailedOperationException
- FIXME: finish the doc here
InsufficientInformationException
private void handleDeleteInterface(Event e) throws InsufficientInformationException, FailedOperationException
e
- The event indicating what interface to delete
InsufficientInformationException
- if the required information is not part of the event
FailedOperationException
private void handleDeleteNode(Event e) throws InsufficientInformationException, FailedOperationException
e
- The event indicating what node to delete
InsufficientInformationException
- if the required information is not part of the event
FailedOperationException
private void handleDeleteService(Event e) throws InsufficientInformationException, FailedOperationException
e
- The event indicating what service to delete
InsufficientInformationException
- if the required information is not part of the event
FailedOperationException
private void handleDupNodeDeleted(Event event) throws InsufficientInformationException
event
-
InsufficientInformationException
private void handleForceRescan(Event event) throws InsufficientInformationException
event
-
InsufficientInformationException
private void handleNewSuspect(Event event) throws InsufficientInformationException
event
-
InsufficientInformationException
private void handleNodeAdded(Event event) throws InsufficientInformationException
event
-
InsufficientInformationException
private void handleNodeDeleted(Event event) throws InsufficientInformationException
event
-
InsufficientInformationException
private void handleUpdateServer(Event event) throws InsufficientInformationException, FailedOperationException
event
-
InsufficientInformationException
FailedOperationException
private void handleUpdateService(Event event) throws InsufficientInformationException, FailedOperationException
event
- The event to process.
InsufficientInformationException
- if there is missing information in the event
FailedOperationException
- if the operation fails for some reasonprivate boolean interfaceExists(java.sql.Connection dbConn, java.lang.String nodeLabel, java.lang.String ipaddr) throws java.sql.SQLException
dbConn
- a database connectionnodeLabel
- the label of the node the interface must reside onipaddr
- the ip address the interface should have
java.sql.SQLException
- if a database error occursprivate java.util.List markAllServicesForInterfaceDeleted(java.sql.Connection dbConn, java.lang.String source, long nodeId, java.lang.String ipAddr, long txNo) throws java.sql.SQLException
dbConn
- the database connectionnodeId
- the node that interface resides onipAddr
- the ipAddress of the interfacetxNo
- a transaction number that can be associated with this deletion
java.sql.SQLException
- if a database error occursprivate java.util.List markInterfaceDeleted(java.sql.Connection dbConn, java.lang.String source, long nodeId, java.lang.String ipAddr, long txNo) throws java.sql.SQLException
dbConn
- the database connectionsource
- the source for any events setnodeId
- the id the interface resides onipAddr
- the ipAddress of the interfacetxNo
- a transaction no to associate with this deletion
java.sql.SQLException
- if a database error occursprivate java.util.List markInterfacesAndServicesDeleted(java.sql.Connection dbConn, java.lang.String source, long nodeId, long txNo) throws java.sql.SQLException
dbConn
- the database connectionsource
- the source for use in the constructed eventsnodeId
- the node whose interfaces and services are to be deletedtxNo
- a transaction number to associate with this deletion
java.sql.SQLException
private java.util.List markNodeDeleted(java.sql.Connection dbConn, java.lang.String source, long nodeId, long txNo) throws java.sql.SQLException
dbConn
- the database connectionsource
- the source to use for constructed eventsnodeId
- the node to deletetxNo
- a transaction number to associate with this deletion
java.sql.SQLException
- if a database error occursprivate java.util.List markServiceDeleted(java.sql.Connection dbConn, java.lang.String source, long nodeId, java.lang.String ipAddr, java.lang.String service, long txNo) throws java.sql.SQLException
dbConn
- the database connectionsource
- the source for any events sentnodeId
- the node the service resides onipAddr
- the interface the service resides onservice
- the name of the servicetxNo
- a transaction number to associate with this deletion
java.sql.SQLException
- if an error occurs communicating with the databaseprivate boolean nodeExists(java.sql.Connection dbConn, java.lang.String nodeLabel) throws java.sql.SQLException
dbConn
- a database connectionnodeLabel
- the label to check
java.sql.SQLException
- if a database error occursprivate void notifyEventError(Event event, java.lang.String msg, java.lang.Exception ex)
event
- msg
- ex
- private void notifyEventReceived(Event event)
event
- private void notifyEventSuccess(Event event)
event
- public void onEvent(Event event)
onEvent
in interface EventListener
event
- The event.private boolean serviceMappingExists(java.sql.Connection dbConn, java.lang.String ipaddr, java.lang.String serviceName) throws java.sql.SQLException
dbConn
- ipaddr
- serviceName
-
java.sql.SQLException
private int verifyServiceExists(java.sql.Connection dbConn, java.lang.String serviceName) throws java.sql.SQLException, FailedOperationException
dbConn
- serviceName
-
java.sql.SQLException
FailedOperationException
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |