org.opennms.netmgt.snmpinterfacepoller
Class DefaultPollContext

java.lang.Object
  extended by org.opennms.netmgt.snmpinterfacepoller.DefaultPollContext
All Implemented Interfaces:
PollContext

public class DefaultPollContext
extends Object
implements PollContext

Represents a DefaultPollContext

Version:
$Id: $
Author:
Antonio Russo

Constructor Summary
DefaultPollContext()
           
 
Method Summary
 Event createEvent(String uei, int nodeId, String address, Date date, OnmsSnmpInterface snmpinterface)
          createEvent
 List<OnmsSnmpInterface> get(int nodeId, String criteria)
          get
 EventIpcManager getEventManager()
          getEventManager
 IpInterfaceDao getIpInterfaceDao()
          getIpInterfaceDao
 String getLocalHostName()
          getLocalHostName
 String getName()
          getName
 List<OnmsIpInterface> getPollableNodes()
          getPollableNodes
 List<OnmsIpInterface> getPollableNodesByIp(String ipaddr)
          getPollableNodesByIp
 String getServiceName()
          getServiceName
 SnmpInterfaceDao getSnmpInterfaceDao()
          getSnmpInterfaceDao
 void sendEvent(Event event)
          sendEvent
 void setEventManager(EventIpcManager eventManager)
          setEventManager
 void setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)
          setIpInterfaceDao
 void setLocalHostName(String localHostName)
          setLocalHostName
 void setName(String name)
          setName
 void setServiceName(String serviceName)
          setServiceName
 void setSnmpInterfaceDao(SnmpInterfaceDao snmpInterfaceDao)
          setSnmpInterfaceDao
 void update(OnmsSnmpInterface snmpinterface)
          Update the OnmsSnmpInterface
 
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

getIpInterfaceDao

public IpInterfaceDao getIpInterfaceDao()

getIpInterfaceDao

Returns:
a IpInterfaceDao object.

setIpInterfaceDao

public void setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)

setIpInterfaceDao

Parameters:
ipInterfaceDao - a IpInterfaceDao object.

getSnmpInterfaceDao

public SnmpInterfaceDao getSnmpInterfaceDao()

getSnmpInterfaceDao

Returns:
a SnmpInterfaceDao object.

setSnmpInterfaceDao

public void setSnmpInterfaceDao(SnmpInterfaceDao snmpInterfaceDao)

setSnmpInterfaceDao

Parameters:
snmpInterfaceDao - a SnmpInterfaceDao object.

getEventManager

public EventIpcManager getEventManager()

getEventManager

Returns:
a EventIpcManager object.

setEventManager

public void setEventManager(EventIpcManager eventManager)

setEventManager

Parameters:
eventManager - a EventIpcManager object.

setLocalHostName

public void setLocalHostName(String localHostName)

setLocalHostName

Parameters:
localHostName - a String object.

getLocalHostName

public String getLocalHostName()

getLocalHostName

Returns:
a String object.

getName

public String getName()

getName

Returns:
a String object.

setName

public void setName(String name)

setName

Parameters:
name - a String object.

getServiceName

public String getServiceName()

getServiceName

Specified by:
getServiceName in interface PollContext
Returns:
a String object.

setServiceName

public void setServiceName(String serviceName)

setServiceName

Specified by:
setServiceName in interface PollContext
Parameters:
serviceName - a String object.

sendEvent

public void sendEvent(Event event)

sendEvent

Specified by:
sendEvent in interface PollContext
Parameters:
event - the event to send

createEvent

public Event createEvent(String uei,
                         int nodeId,
                         String address,
                         Date date,
                         OnmsSnmpInterface snmpinterface)

createEvent

Specified by:
createEvent in interface PollContext
Parameters:
uei - a String object.
nodeId - a int.
address - a String object.
date - a Date object.
snmpinterface - a OnmsSnmpInterface object.
Returns:
the event

get

public List<OnmsSnmpInterface> get(int nodeId,
                                   String criteria)

get

Specified by:
get in interface PollContext
Parameters:
nodeId - a int.
criteria - a String object.
Returns:
The List of OnmsSnmpInterfaces to be polled

update

public void update(OnmsSnmpInterface snmpinterface)
Update the OnmsSnmpInterface

Specified by:
update in interface PollContext
Parameters:
snmpinterface - a OnmsSnmpInterface object.

getPollableNodesByIp

public List<OnmsIpInterface> getPollableNodesByIp(String ipaddr)
Description copied from interface: PollContext

getPollableNodesByIp

Specified by:
getPollableNodesByIp in interface PollContext
Parameters:
ipaddr - the ip address of the node.
Returns:
The List of OnmsIpInterfaces to be polled

getPollableNodes

public List<OnmsIpInterface> getPollableNodes()
Description copied from interface: PollContext

getPollableNodes

Specified by:
getPollableNodes in interface PollContext
Returns:
The List of OnmsIpInterfaces to be polled


Copyright © 2011. All Rights Reserved.