OpenNMS API 1.2.9

## org.opennms.netmgt.poller.pollables
Class PollableService

    java.lang.Object
      org.opennms.netmgt.poller.pollables.PollableElement
          org.opennms.netmgt.poller.pollables.PollableService

All Implemented Interfaces:
  ReadyRunnable, java.lang.Runnable

public class PollableService
extends PollableElement
implements ReadyRunnable

Represents a PollableService

Author:
  brozow

Field Summary
`private IPv4NetworkInterface` `m_netInterface`
`private PollStatus` `m_oldStatus`
`private PollConfig` `m_pollConfig`
`private Schedule` `m_schedule`
`private long` `m_statusChangeTime`
`private java.lang.String` `m_svcName`
`private boolean` `m_unresponsive`
`private boolean` `m_unresponsiveEventPending`

Fields inherited from class org.opennms.netmgt.poller.pollables.PollableElement
``

Constructor Summary
`PollableService(PollableInterface iface, java.lang.String svcName)`

Method Summary
`Event` `createDownEvent(java.util.Date date)`
`void` `createOutage(PollEvent cause)`
`Event` `createResponsiveEvent(java.util.Date date)`
`Event` `createUnresponsiveEvent(java.util.Date date)`
`Event` `createUpEvent(java.util.Date date)`
`void` `delete()`
`void` `doPoll()`
`java.net.InetAddress` `getAddress()`
`PollContext` `getContext()`
`PollableInterface` `getInterface()`
`java.lang.String` `getIpAddr()`
`NetworkInterface` `getNetInterface()`
`PollableNetwork` `getNetwork()`
`PollableNode` `getNode()`
`int` `getNodeId()`
`Schedule` `getSchedule()`
`long` `getStatusChangeTime()`
`java.lang.String` `getSvcName()`
`boolean` `isReady()` Returns true if the runnable is ready to start.
`private boolean` `isUnresponsive()`
`private boolean` `isUnresponsiveEventPending()`
`PollStatus` `poll()`
`void` `processStatusChange(java.util.Date date)`
`void` `refreshConfig()`
`protected void` `resolveOutage(PollEvent resolution)`
`void` `run()`
`void` `schedule()`
`void` `sendDeleteEvent()`
`void` `setPollConfig(PollableServiceConfig pollConfig)`
`void` `setSchedule(Schedule schedule)`
`private void` `setStatusChangeTime(long statusChangeTime)`
`private void` `setUnresponsive(boolean unresponsive)`
`private void` `setUnresponsiveEventPending(boolean pending)`
`java.lang.String` `toString()`
`void` `updateStatus(PollStatus newStatus)`
`protected void` `visitThis(PollableVisitor v)`

Methods inherited from class org.opennms.netmgt.poller.pollables.PollableElement
`doPoll, getCause, getLockRoot, getParent, getStatus, hasOpenOutage, isDeleted, isStatusChanged, isTreeLockAvailable, obtainTreeLock, poll, processCause, processComingUp, processGoingDown, processLingeringCauses, processResolution, recalculateStatus, releaseTreeLock, resetStatusChanged, resolveAllOutages, selectPollElement, setCause, setParent, visit, withTreeLock, withTreeLock`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### m_svcName

    private java.lang.String m_svcName

### m_pollConfig

    private PollConfig m_pollConfig

### m_netInterface

    private IPv4NetworkInterface m_netInterface

### m_unresponsive

    private boolean m_unresponsive

### m_unresponsiveEventPending

    private boolean m_unresponsiveEventPending

### m_oldStatus

    private PollStatus m_oldStatus

### m_schedule

    private Schedule m_schedule

### m_statusChangeTime

    private long m_statusChangeTime

Constructor Detail

### PollableService

    public PollableService(PollableInterface iface,
                           java.lang.String svcName)

Parameters:
  `svcName` -
  `iface` -

Method Detail

### getInterface

    public PollableInterface getInterface()

### getNode

    public PollableNode getNode()

### getNetwork

    public PollableNetwork getNetwork()

### getContext

    public PollContext getContext()

  Specified by:
    `getContext` in class `PollableElement`

### getSvcName

    public java.lang.String getSvcName()

  Returns:

### getIpAddr

    public java.lang.String getIpAddr()

  Returns:

### getNodeId

    public int getNodeId()

  Returns:

### visitThis

    protected void visitThis(PollableVisitor v)

  Overrides:
    `visitThis` in class `PollableElement`

### setPollConfig

    public void setPollConfig(PollableServiceConfig pollConfig)

  Parameters:
    `pollConfig` -

### poll

    public PollStatus poll()

  Specified by:
    `poll` in class `PollableElement`

### setUnresponsive

    private void setUnresponsive(boolean unresponsive)

### isUnresponsive

    private boolean isUnresponsive()

### setUnresponsiveEventPending

    private void setUnresponsiveEventPending(boolean pending)

### isUnresponsiveEventPending

    private boolean isUnresponsiveEventPending()

### getNetInterface

    public NetworkInterface getNetInterface()

  Returns:
  Throws:
    `UnknownHostException`

### getAddress

    public java.net.InetAddress getAddress()

  Returns:

### doPoll

    public void doPoll()

  Returns:
    the top changed element whose status changes needs to be processed

### createDownEvent

    public Event createDownEvent(java.util.Date date)

  Specified by:
    `createDownEvent` in class `PollableElement`
  Parameters:
    `date` -
  Returns:

### createUpEvent

    public Event createUpEvent(java.util.Date date)

  Specified by:
    `createUpEvent` in class `PollableElement`
  Parameters:
    `date` -
  Returns:

### createUnresponsiveEvent

    public Event createUnresponsiveEvent(java.util.Date date)

### createResponsiveEvent

    public Event createResponsiveEvent(java.util.Date date)

### createOutage

    public void createOutage(PollEvent cause)

  Overrides:
    `createOutage` in class `PollableElement`
  Parameters:
    `cause` - TODO

### resolveOutage

    protected void resolveOutage(PollEvent resolution)

  Overrides:
    `resolveOutage` in class `PollableElement`
  Parameters:
    `resolution` - TODO

### toString

    public java.lang.String toString()

### processStatusChange

    public void processStatusChange(java.util.Date date)

  Overrides:
    `processStatusChange` in class `PollableElement`
  Parameters:
    `date` -

### updateStatus

    public void updateStatus(PollStatus newStatus)

  Overrides:
    `updateStatus` in class `PollableElement`

### setSchedule

    public void setSchedule(Schedule schedule)

  Parameters:
    `schedule` -

### getSchedule

    public Schedule getSchedule()

### getStatusChangeTime

    public long getStatusChangeTime()

### setStatusChangeTime

    private void setStatusChangeTime(long statusChangeTime)

### isReady

    public boolean isReady()

  Description copied from interface: `ReadyRunnable`
  Returns true if the runnable is ready to start.

  Specified by:
    `isReady` in interface `ReadyRunnable`

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### delete

    public void delete()

  Overrides:
    `delete` in class `PollableElement`

### schedule

    public void schedule()

### sendDeleteEvent

    public void sendDeleteEvent()

### refreshConfig

    public void refreshConfig()

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.