org.opennms.netmgt.poller
Class DefaultPollContext

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

public class DefaultPollContext
extends Object
implements PollContext, EventListener

Represents a DefaultPollContext

Author:
brozow

Constructor Summary
DefaultPollContext()
           
 
Method Summary
 Event createEvent(String uei, int nodeId, InetAddress address, String svcName, Date date, String reason)
           
 String getCriticalServiceName()
           
 EventIpcManager getEventManager()
           
 String getLocalHostName()
           
 String getName()
           
 PollerConfig getPollerConfig()
           
 QueryManager getQueryManager()
           
 boolean isNodeProcessingEnabled()
           
 boolean isPollingAllIfCritServiceUndefined()
           
 boolean isServiceUnresponsiveEnabled()
           
 void onEvent(Event e)
           
 void openOutage(PollableService svc, PollEvent svcLostEvent)
           
 void reparentOutages(String ipAddr, int oldNodeId, int newNodeId)
           
 void resolveOutage(PollableService svc, PollEvent svcRegainEvent)
           
 PollEvent sendEvent(Event event)
           
 void setEventManager(EventIpcManager eventManager)
           
 void setLocalHostName(String localHostName)
           
 void setName(String name)
           
 void setPollerConfig(PollerConfig pollerConfig)
           
 void setQueryManager(QueryManager queryManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPollContext

public DefaultPollContext()
Method Detail

getEventManager

public EventIpcManager getEventManager()

setEventManager

public void setEventManager(EventIpcManager eventManager)

setLocalHostName

public void setLocalHostName(String localHostName)

getLocalHostName

public String getLocalHostName()

getName

public String getName()
Specified by:
getName in interface EventListener

setName

public void setName(String name)

getPollerConfig

public PollerConfig getPollerConfig()

setPollerConfig

public void setPollerConfig(PollerConfig pollerConfig)

getQueryManager

public QueryManager getQueryManager()

setQueryManager

public void setQueryManager(QueryManager queryManager)

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:

onEvent

public void onEvent(Event e)
Specified by:
onEvent in interface EventListener


Copyright © 2009. All Rights Reserved.