OpenNMS API 1.2.3

org.opennms.netmgt.poller
Class DefaultPollContext

java.lang.Object
  extended byorg.opennms.netmgt.poller.DefaultPollContext
All Implemented Interfaces:
EventListener, PollContext

public class DefaultPollContext
extends java.lang.Object
implements PollContext, EventListener

Represents a DefaultPollContext

Author:
brozow

Field Summary
private  boolean m_listenerAdded
           
private  java.util.List m_pendingPollEvents
           
private  Poller m_poller
           
 
Constructor Summary
DefaultPollContext(Poller poller)
           
 
Method Summary
 Event createEvent(java.lang.String uei, int nodeId, java.net.InetAddress address, java.lang.String svcName, java.util.Date date)
           
 java.lang.String getCriticalServiceName()
           
 java.lang.String getName()
          Return the id of the listener
 boolean isNodeProcessingEnabled()
           
 boolean isPollingAllIfCritServiceUndefined()
           
 boolean isServiceUnresponsiveEnabled()
           
 void onEvent(Event e)
          Process a sent event.
 void openOutage(PollableService svc, PollEvent svcLostEvent)
           
 void reparentOutages(java.lang.String ipAddr, int oldNodeId, int newNodeId)
           
 void resolveOutage(PollableService svc, PollEvent svcRegainEvent)
           
 PollEvent sendEvent(Event event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_poller

private Poller m_poller

m_listenerAdded

private boolean m_listenerAdded

m_pendingPollEvents

private java.util.List m_pendingPollEvents
Constructor Detail

DefaultPollContext

public DefaultPollContext(Poller poller)
Parameters:
poller -
Method Detail

getCriticalServiceName

public java.lang.String getCriticalServiceName()
Specified by:
getCriticalServiceName in interface PollContext

isNodeProcessingEnabled

public boolean isNodeProcessingEnabled()
Specified by:
isNodeProcessingEnabled in interface PollContext
Returns:

isPollingAllIfCritServiceUndefined

public boolean isPollingAllIfCritServiceUndefined()
Specified by:
isPollingAllIfCritServiceUndefined in interface PollContext
Returns:

sendEvent

public PollEvent sendEvent(Event event)
Specified by:
sendEvent in interface PollContext
Parameters:
event - the event to send
Returns:
the same event

createEvent

public Event createEvent(java.lang.String uei,
                         int nodeId,
                         java.net.InetAddress address,
                         java.lang.String svcName,
                         java.util.Date date)
Specified by:
createEvent in interface PollContext
Parameters:
uei -
nodeId -
address -
svcName -
date -
Returns:

openOutage

public void openOutage(PollableService svc,
                       PollEvent svcLostEvent)
Specified by:
openOutage in interface PollContext

resolveOutage

public void resolveOutage(PollableService svc,
                          PollEvent svcRegainEvent)
Specified by:
resolveOutage in interface PollContext

reparentOutages

public void reparentOutages(java.lang.String ipAddr,
                            int oldNodeId,
                            int newNodeId)
Specified by:
reparentOutages in interface PollContext

isServiceUnresponsiveEnabled

public boolean isServiceUnresponsiveEnabled()
Specified by:
isServiceUnresponsiveEnabled in interface PollContext
Returns:

getName

public java.lang.String getName()
Description copied from interface: EventListener
Return the id of the listener

Specified by:
getName in interface EventListener

onEvent

public void onEvent(Event e)
Description copied from interface: EventListener
Process a sent event.

Specified by:
onEvent in interface EventListener

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.