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 EventcreateEvent(String uei, int nodeId, String addr, String netMask, Date date, OnmsSnmpInterface snmpinterface)createEventList<OnmsSnmpInterface>get(int nodeId, String criteria)getEventIpcManagergetEventManager()getEventManagerIpInterfaceDaogetIpInterfaceDao()getIpInterfaceDaoStringgetLocalHostName()getLocalHostNameStringgetLocation(Integer nodeId)LocationAwareSnmpClientgetLocationAwareSnmpClient()StringgetName()getNameList<OnmsIpInterface>getPollableNodes()getPollableNodesList<OnmsIpInterface>getPollableNodesByIp(String ipaddr)getPollableNodesByIpStringgetServiceName()getServiceNameSnmpInterfaceDaogetSnmpInterfaceDao()getSnmpInterfaceDaovoidsendEvent(Event event)sendEventvoidsetEventManager(EventIpcManager eventManager)setEventManagervoidsetLocalHostName(String localHostName)setLocalHostNamevoidsetLocationAwareSnmpClient(LocationAwareSnmpClient locationAwareSnmpClient)voidsetName(String name)setNamevoidsetServiceName(String serviceName)setServiceNamevoidupdate(OnmsSnmpInterface snmpinterface)Update the OnmsSnmpInterface
-
-
-
Method Detail
-
getIpInterfaceDao
public IpInterfaceDao getIpInterfaceDao()
getIpInterfaceDao
- Returns:
- a
IpInterfaceDaoobject.
-
getSnmpInterfaceDao
public SnmpInterfaceDao getSnmpInterfaceDao()
getSnmpInterfaceDao
- Returns:
- a
SnmpInterfaceDaoobject.
-
getEventManager
public EventIpcManager getEventManager()
getEventManager
- Returns:
- a
EventIpcManagerobject.
-
setEventManager
public void setEventManager(EventIpcManager eventManager)
setEventManager
- Parameters:
eventManager- aEventIpcManagerobject.
-
setLocalHostName
public void setLocalHostName(String localHostName)
setLocalHostName
- Parameters:
localHostName- aStringobject.
-
getServiceName
public String getServiceName()
getServiceName
- Specified by:
getServiceNamein interfacePollContext- Returns:
- a
Stringobject.
-
setServiceName
public void setServiceName(String serviceName)
setServiceName
- Specified by:
setServiceNamein interfacePollContext- Parameters:
serviceName- aStringobject.
-
sendEvent
public void sendEvent(Event event)
sendEvent
- Specified by:
sendEventin 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:
createEventin interfacePollContext- Parameters:
uei- aStringobject.nodeId- a int.addr- aStringobject.netMask- aStringobject.date- aDateobject.snmpinterface- aOnmsSnmpInterfaceobject.- Returns:
- the event
-
get
public List<OnmsSnmpInterface> get(int nodeId, String criteria)
get
- Specified by:
getin interfacePollContext- Parameters:
nodeId- a int.criteria- aStringobject.- Returns:
- The List of OnmsSnmpInterfaces to be polled
-
update
public void update(OnmsSnmpInterface snmpinterface)
Update the OnmsSnmpInterface- Specified by:
updatein interfacePollContext- Parameters:
snmpinterface- aOnmsSnmpInterfaceobject.
-
getPollableNodesByIp
public List<OnmsIpInterface> getPollableNodesByIp(String ipaddr)
Description copied from interface:PollContextgetPollableNodesByIp
- Specified by:
getPollableNodesByIpin 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:PollContextgetPollableNodes
- Specified by:
getPollableNodesin interfacePollContext- Returns:
- The List of OnmsIpInterfaces to be polled
-
getLocation
public String getLocation(Integer nodeId)
- Specified by:
getLocationin interfacePollContext
-
getLocationAwareSnmpClient
public LocationAwareSnmpClient getLocationAwareSnmpClient()
- Specified by:
getLocationAwareSnmpClientin interfacePollContext
-
setLocationAwareSnmpClient
public void setLocationAwareSnmpClient(LocationAwareSnmpClient locationAwareSnmpClient)
-
-