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
 DataSource getDataSource()
          getDataSource
 EventIpcManager getEventManager()
          getEventManager
 String getLocalHostName()
          getLocalHostName
 String getName()
          getName
 String getServiceName()
          getServiceName
 SnmpInterfaceDao getSnmpInterfaceDao()
          getSnmpInterfaceDao
 void sendEvent(Event event)
          sendEvent
 void setDataSource(DataSource dataSource)
          setDataSource
 void setEventManager(EventIpcManager eventManager)
          setEventManager
 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
 void updatePollStatus(int nodeId, String status)
          Update the pollstatus for OnmsSnmpInterfaces having nodeid nodeId
 void updatePollStatus(int nodeId, String criteria, String status)
          Update the pollstatus using the specified criteria for OnmsSnmpInterfaces having nodeid nodeId
 void updatePollStatus(String status)
          Update the pollstatus for OnmsSnmpInterfaces
 
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

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.

getDataSource

public DataSource getDataSource()

getDataSource

Returns:
a DataSource object.

setDataSource

public void setDataSource(DataSource dataSource)

setDataSource

Parameters:
dataSource - a DataSource 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.

updatePollStatus

public void updatePollStatus(int nodeId,
                             String criteria,
                             String status)
Update the pollstatus using the specified criteria for OnmsSnmpInterfaces having nodeid nodeId

Specified by:
updatePollStatus in interface PollContext
Parameters:
nodeId - a int.
criteria - a String object.
status - a String object.

updatePollStatus

public void updatePollStatus(int nodeId,
                             String status)
Update the pollstatus for OnmsSnmpInterfaces having nodeid nodeId

Specified by:
updatePollStatus in interface PollContext
Parameters:
nodeId - a int.
status - a String object.

updatePollStatus

public void updatePollStatus(String status)
Update the pollstatus for OnmsSnmpInterfaces

Specified by:
updatePollStatus in interface PollContext
Parameters:
status - a String object.


Copyright © 2011. All Rights Reserved.