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()
           
protected  void onPause()
           
protected  void onResume()
           
protected  void onStart()
           
protected  void 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)
           
 void setCapsdDbSyncer(CapsdDbSyncer capsdDbSyncer)
           
 void setEventListener(StoppableEventListener eventListener)
           
 void setRescanRunner(RunnableConsumerThreadPool rescanRunner)
           
 void setScheduler(org.opennms.netmgt.capsd.Scheduler scheduler)
           
 void setSuspectEventProcessorFactory(SuspectEventProcessorFactory eventProcessorFactory)
           
 void setSuspectRunner(RunnableConsumerThreadPool suspectRunner)
           
 
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()
Overrides:
onStop in class AbstractServiceDaemon

onInit

protected void onInit()
Specified by:
onInit in class AbstractServiceDaemon

onStart

protected void onStart()
Overrides:
onStart in class AbstractServiceDaemon

onPause

protected void onPause()
Overrides:
onPause in class AbstractServiceDaemon

onResume

protected void 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.


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)

setSuspectEventProcessorFactory

public void setSuspectEventProcessorFactory(SuspectEventProcessorFactory eventProcessorFactory)

setCapsdConfig

public void setCapsdConfig(CapsdConfig capsdConfig)

setSuspectRunner

public void setSuspectRunner(RunnableConsumerThreadPool suspectRunner)

setRescanRunner

public void setRescanRunner(RunnableConsumerThreadPool rescanRunner)

setEventListener

public void setEventListener(StoppableEventListener eventListener)

setScheduler

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


Copyright © 2009. All Rights Reserved.