|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.poller.plugins.PollerTask
This class provides the main class construct that will be used to schedule interfaces for polling. A PollerTask object will be placed on a producer/consumer queue and processed as a thread by the run() method. The polling service will be invoked during the execution of the run() method.
Field Summary | |
private int |
m_currentInterval
|
private int |
m_currentStatus
The status of the task updated for each call of the poller. |
private EventProxy |
m_eventProxy
The object through which the ServiceMonitor can send events |
private Object |
m_interfaceAddress
The address that the ServiceMonitor must poll |
private ServiceMonitor |
m_monitor
The object that will be called to do the actual service polling |
private int |
m_packageIndex
|
private boolean |
m_processing
|
private Map |
m_properties
The map that a ServiceMonitor can use to persist data |
Fields inherited from interface org.opennms.bb.dp.poller.plugins.NetworkInterface |
TYPE_IPV4, TYPE_UNKNOWN |
Constructor Summary | |
PollerTask(ServiceMonitor aMonitor,
Object iface,
EventProxy anEventProxy,
Map props)
Constructor, initializes the members. |
Method Summary | |
Object |
getAddress()
This method returns the ip address of the service interface |
Object |
getAttribute(String property)
This method returns an attribute from the m_properties member. |
int |
getCurrentInterval()
|
int |
getPackageIndex()
|
int |
getStatus()
This method returns the status of the service that was recieved when last polled. |
int |
getType()
Returns the interface type for the network interface. |
boolean |
isProcessing()
|
void |
run()
This method fulfills the Runnable interface. |
Object |
setAttribute(String property,
Object value)
This method sets an attribute in the m_properties member |
void |
setCurrentInterval(int newInterval)
|
void |
setPackageIndex(int aPackageIndex)
|
void |
setProcessing(boolean aBool)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
private ServiceMonitor m_monitor
private Object m_interfaceAddress
private EventProxy m_eventProxy
private Map m_properties
private boolean m_processing
private int m_currentInterval
private int m_packageIndex
private int m_currentStatus
Constructor Detail |
public PollerTask(ServiceMonitor aMonitor, Object iface, EventProxy anEventProxy, Map props)
ServiceMonitor
- aMonitor, the monitor to do the pollingIPv4Address
- iface, the service interface ip addressEventProxy
- anEventProxy, the object for sending eventsMap
- props, a map used for persiting dataMethod Detail |
public void setCurrentInterval(int newInterval)
public int getCurrentInterval()
public void setPackageIndex(int aPackageIndex)
public int getPackageIndex()
public boolean isProcessing()
public void setProcessing(boolean aBool)
public void run()
run
in interface Runnable
public int getStatus()
public Object getAddress()
getAddress
in interface NetworkInterface
public Object getAttribute(String property)
getAttribute
in interface NetworkInterface
String
- property, the property to look uppublic Object setAttribute(String property, Object value)
setAttribute
in interface NetworkInterface
String
- property, the property to setObject
- value, the Object encapulating the attributepublic int getType()
NetworkInterface
Returns the interface type for the network interface.
getType
in interface NetworkInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |