Class DefaultPollContext
- java.lang.Object
-
- 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
Constructors Constructor Description DefaultPollContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Event
createEvent(String uei, int nodeId, String addr, String netMask, Date date, OnmsSnmpInterface snmpinterface)
createEventList<OnmsSnmpInterface>
get(int nodeId, String criteria)
getEventIpcManager
getEventManager()
getEventManagerIpInterfaceDao
getIpInterfaceDao()
getIpInterfaceDaoString
getLocalHostName()
getLocalHostNameString
getLocation(Integer nodeId)
LocationAwareSnmpClient
getLocationAwareSnmpClient()
String
getName()
getNameList<OnmsIpInterface>
getPollableNodes()
getPollableNodesList<OnmsIpInterface>
getPollableNodesByIp(String ipaddr)
getPollableNodesByIpString
getServiceName()
getServiceNameSnmpInterfaceDao
getSnmpInterfaceDao()
getSnmpInterfaceDaovoid
sendEvent(Event event)
sendEventvoid
setEventManager(EventIpcManager eventManager)
setEventManagervoid
setLocalHostName(String localHostName)
setLocalHostNamevoid
setLocationAwareSnmpClient(LocationAwareSnmpClient locationAwareSnmpClient)
void
setName(String name)
setNamevoid
setServiceName(String serviceName)
setServiceNamevoid
update(OnmsSnmpInterface snmpinterface)
Update the OnmsSnmpInterface
-
-
-
Method Detail
-
getIpInterfaceDao
public IpInterfaceDao getIpInterfaceDao()
getIpInterfaceDao
- Returns:
- a
IpInterfaceDao
object.
-
getSnmpInterfaceDao
public SnmpInterfaceDao getSnmpInterfaceDao()
getSnmpInterfaceDao
- Returns:
- a
SnmpInterfaceDao
object.
-
getEventManager
public EventIpcManager getEventManager()
getEventManager
- Returns:
- a
EventIpcManager
object.
-
setEventManager
public void setEventManager(EventIpcManager eventManager)
setEventManager
- Parameters:
eventManager
- aEventIpcManager
object.
-
setLocalHostName
public void setLocalHostName(String localHostName)
setLocalHostName
- Parameters:
localHostName
- aString
object.
-
getServiceName
public String getServiceName()
getServiceName
- Specified by:
getServiceName
in interfacePollContext
- Returns:
- a
String
object.
-
setServiceName
public void setServiceName(String serviceName)
setServiceName
- Specified by:
setServiceName
in interfacePollContext
- Parameters:
serviceName
- aString
object.
-
sendEvent
public void sendEvent(Event event)
sendEvent
- Specified by:
sendEvent
in interfacePollContext
- Parameters:
event
- the event to send
-
createEvent
public Event createEvent(String uei, int nodeId, String addr, String netMask, Date date, OnmsSnmpInterface snmpinterface)
createEvent
- Specified by:
createEvent
in interfacePollContext
- Parameters:
uei
- aString
object.nodeId
- a int.addr
- aString
object.netMask
- aString
object.date
- aDate
object.snmpinterface
- aOnmsSnmpInterface
object.- Returns:
- the event
-
get
public List<OnmsSnmpInterface> get(int nodeId, String criteria)
get
- Specified by:
get
in interfacePollContext
- Parameters:
nodeId
- a int.criteria
- aString
object.- Returns:
- The List of OnmsSnmpInterfaces to be polled
-
update
public void update(OnmsSnmpInterface snmpinterface)
Update the OnmsSnmpInterface- Specified by:
update
in interfacePollContext
- Parameters:
snmpinterface
- aOnmsSnmpInterface
object.
-
getPollableNodesByIp
public List<OnmsIpInterface> getPollableNodesByIp(String ipaddr)
Description copied from interface:PollContext
getPollableNodesByIp
- Specified by:
getPollableNodesByIp
in interfacePollContext
- 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 interfacePollContext
- Returns:
- The List of OnmsIpInterfaces to be polled
-
getLocation
public String getLocation(Integer nodeId)
- Specified by:
getLocation
in interfacePollContext
-
getLocationAwareSnmpClient
public LocationAwareSnmpClient getLocationAwareSnmpClient()
- Specified by:
getLocationAwareSnmpClient
in interfacePollContext
-
setLocationAwareSnmpClient
public void setLocationAwareSnmpClient(LocationAwareSnmpClient locationAwareSnmpClient)
-
-