org.opennms.netmgt.poller
Class DefaultPollContext
java.lang.Object
org.opennms.netmgt.poller.DefaultPollContext
- All Implemented Interfaces:
- EventListener, PollContext
public class DefaultPollContext
- extends Object
- implements PollContext, EventListener
Represents a DefaultPollContext
- Author:
- brozow
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPollContext
public DefaultPollContext(Poller poller)
- Parameters:
poller -
getCriticalServiceName
public 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(String uei,
int nodeId,
InetAddress address,
String svcName,
Date date,
String reason)
- Specified by:
createEvent in interface PollContext
- 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(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 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
Copyright © 2008. All Rights Reserved.