org.opennms.netmgt.capsd
Class Capsd

java.lang.Object
  extended by org.opennms.netmgt.daemon.AbstractServiceDaemon
      extended by org.opennms.netmgt.capsd.Capsd
All Implemented Interfaces:
Fiber, PausableFiber, SpringServiceDaemon, ServiceDaemon, org.springframework.beans.factory.InitializingBean

public class Capsd
extends AbstractServiceDaemon

The Capability daemon - it is notified by the discovery process when a new node is discovered - it then polls for all the capabilities for this node and is responsible for loading the data collecte1d into the database.

Once a node is added to the database, its sends an indication back to the discovery which then flags this node as 'known'.

Author:
Mike Davidson , OpenNMS

Field Summary
 
Fields inherited from interface org.opennms.core.fiber.PausableFiber
PAUSE_PENDING, PAUSED, RESUME_PENDING
 
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
 
Constructor Summary
Capsd()
          Constructs the Capsd objec
 
Method Summary
static String getLocalHostAddress()
          Used to retrieve the local host name/address.
protected  void onInit()
          onInit
protected  void onPause()
          onPause
protected  void onResume()
          onResume
protected  void onStart()
          onStart
protected  void onStop()
          onStop
 void rescanInterfaceParent(Integer nodeId)
          This method is used to force an existing node to be capability rescanned.
 void scanSuspectInterface(String ifAddr)
          This method is used by other managed beans to forward an IP Address for capability scanning.
 void setCapsdConfig(CapsdConfig capsdConfig)
          setCapsdConfig
 void setCapsdDbSyncer(CapsdDbSyncer capsdDbSyncer)
          setCapsdDbSyncer
 void setEventListener(StoppableEventListener eventListener)
          setEventListener
 void setRescanRunner(RunnableConsumerThreadPool rescanRunner)
          setRescanRunner
 void setScheduler(org.opennms.netmgt.capsd.Scheduler scheduler)
          setScheduler
 void setSuspectEventProcessorFactory(SuspectEventProcessorFactory eventProcessorFactory)
          setSuspectEventProcessorFactory
 void setSuspectRunner(RunnableConsumerThreadPool suspectRunner)
          setSuspectRunner
 
Methods inherited from class org.opennms.netmgt.daemon.AbstractServiceDaemon
afterPropertiesSet, debugf, debugf, errorf, errorf, fatalf, fatalf, getName, getStatus, getStatusText, infof, infof, init, isPaused, isRunning, isStarting, isStartPending, log, pause, resume, setStatus, start, status, stop, waitForStatus, waitForStatus, warnf, warnf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Capsd

public Capsd()
Constructs the Capsd objec

Method Detail

onStop

protected void onStop()

onStop

Overrides:
onStop in class AbstractServiceDaemon

onInit

protected void onInit()

onInit

Specified by:
onInit in class AbstractServiceDaemon

onStart

protected void onStart()

onStart

Overrides:
onStart in class AbstractServiceDaemon

onPause

protected void onPause()

onPause

Overrides:
onPause in class AbstractServiceDaemon

onResume

protected void onResume()

onResume

Overrides:
onResume in class AbstractServiceDaemon

getLocalHostAddress

public static String getLocalHostAddress()
Used to retrieve the local host name/address. The name/address of the machine on which Capsd is running.

Returns:
a String object.

scanSuspectInterface

public void scanSuspectInterface(String ifAddr)
                          throws UnknownHostException
This method is used by other managed beans to forward an IP Address for capability scanning. The If the interface converts properly then it is scanned as a suspect interface for the discovery of all the services and other interfaces that exists on the node.

Parameters:
ifAddr - The address of the suspect interface.
Throws:
UnknownHostException - Thrown if the address cannot be converted to aa proper internet address.

rescanInterfaceParent

public void rescanInterfaceParent(Integer nodeId)
This method is used to force an existing node to be capability rescanned. The main reason for its existence is as a hook for JMX managed beans to invoke forced rescans allowing the main rescan logic to remain in the capsd agent.

Parameters:
nodeId - The node identifier from the database.

setCapsdDbSyncer

public void setCapsdDbSyncer(CapsdDbSyncer capsdDbSyncer)

setCapsdDbSyncer

Parameters:
capsdDbSyncer - a CapsdDbSyncer object.

setSuspectEventProcessorFactory

public void setSuspectEventProcessorFactory(SuspectEventProcessorFactory eventProcessorFactory)

setSuspectEventProcessorFactory

Parameters:
eventProcessorFactory - a SuspectEventProcessorFactory object.

setCapsdConfig

public void setCapsdConfig(CapsdConfig capsdConfig)

setCapsdConfig

Parameters:
capsdConfig - a CapsdConfig object.

setSuspectRunner

public void setSuspectRunner(RunnableConsumerThreadPool suspectRunner)

setSuspectRunner

Parameters:
suspectRunner - a RunnableConsumerThreadPool object.

setRescanRunner

public void setRescanRunner(RunnableConsumerThreadPool rescanRunner)

setRescanRunner

Parameters:
rescanRunner - a RunnableConsumerThreadPool object.

setEventListener

public void setEventListener(StoppableEventListener eventListener)

setEventListener

Parameters:
eventListener - a StoppableEventListener object.

setScheduler

public void setScheduler(org.opennms.netmgt.capsd.Scheduler scheduler)

setScheduler

Parameters:
scheduler - a Scheduler object.


Copyright © 2011. All Rights Reserved.