OpenNMS API 1.2.3

org.opennms.netmgt.capsd
Class Capsd

java.lang.Object
  extended byorg.opennms.netmgt.capsd.Capsd
All Implemented Interfaces:
Fiber, PausableFiber

public class Capsd
extends java.lang.Object
implements PausableFiber

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
private static java.lang.String LOG4J_CATEGORY
          The log4j category used to log messages.
private static java.lang.String m_address
           Contains dotted-decimal representation of the IP address where Capsd is running.
private static java.lang.Object m_dbSyncLock
          Database synchronization lock for synchronizing write access to the database between the SuspectEventProcessor and RescanProcessor thread pools
private  BroadcastEventProcessor m_receiver
          Event receiver.
private  RunnableConsumerThreadPool m_rescanRunner
          The pool of threads that are used to executed RescanProcessor instances queued by the rescan scheduler thread.
private  Scheduler m_scheduler
          Rescan scheduler thread
private static Capsd m_singleton
          Singleton instance of the Capsd class
private  int m_status
          Current status of this fiber
private  RunnableConsumerThreadPool m_suspectRunner
          The pool of threads that are used to executed the SuspectEventProcessor instances queued by the event processor (BroadcastEventProcessor).
 
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
(package private) static java.lang.Object getDbSyncLock()
           
static Capsd getInstance()
           
static java.lang.String getLocalHostAddress()
          Used to retrieve the local host name/address.
 java.lang.String getName()
          Returns a name/id for this process
 int getStatus()
          Returns the current status
 void init()
          Start the Capsd threads.
 void pause()
          This method is used to suspend a currently running Fiber.
 void rescanInterfaceParent(java.lang.Integer nodeId)
          This method is used to force an existing node to be capability rescaned.
 void resume()
          This method is used to resume a suspeneded Fiber.
 void scanSuspectInterface(java.lang.String ifAddr)
          This method is used by other managed beans to forward an IP Address for capability scanning.
 void start()
          Start the Capsd threads.
 void stop()
          Stop the Capsd threads.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG4J_CATEGORY

private static final java.lang.String LOG4J_CATEGORY
The log4j category used to log messages.

See Also:
Constant Field Values

m_singleton

private static final Capsd m_singleton
Singleton instance of the Capsd class


m_status

private int m_status
Current status of this fiber


m_dbSyncLock

private static java.lang.Object m_dbSyncLock
Database synchronization lock for synchronizing write access to the database between the SuspectEventProcessor and RescanProcessor thread pools


m_address

private static java.lang.String m_address

Contains dotted-decimal representation of the IP address where Capsd is running. Used when capsd sends events out


m_scheduler

private Scheduler m_scheduler
Rescan scheduler thread


m_receiver

private BroadcastEventProcessor m_receiver
Event receiver.


m_suspectRunner

private RunnableConsumerThreadPool m_suspectRunner
The pool of threads that are used to executed the SuspectEventProcessor instances queued by the event processor (BroadcastEventProcessor).


m_rescanRunner

private RunnableConsumerThreadPool m_rescanRunner
The pool of threads that are used to executed RescanProcessor instances queued by the rescan scheduler thread.

Constructor Detail

Capsd

public Capsd()
Constructs the Capsd objec

Method Detail

stop

public void stop()
Stop the Capsd threads.

Specified by:
stop in interface Fiber

init

public void init()
Start the Capsd threads.


start

public void start()
Start the Capsd threads.

Specified by:
start in interface Fiber

pause

public void pause()
Description copied from interface: PausableFiber
This method is used to suspend a currently running Fiber. When invoked the Fiber will begin the transition to a PAUSED status after changing its internal state, if applicable.

Specified by:
pause in interface PausableFiber

resume

public void resume()
Description copied from interface: PausableFiber
This method is used to resume a suspeneded Fiber. If the thread is already running then this method should have no effect on the current Fiber.

Specified by:
resume in interface PausableFiber

getName

public java.lang.String getName()
Returns a name/id for this process

Specified by:
getName in interface Fiber
Returns:
The name of the Fiber.

getStatus

public int getStatus()
Returns the current status

Specified by:
getStatus in interface Fiber
Returns:
The current status of the Fiber.

getLocalHostAddress

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


getInstance

public static Capsd getInstance()

getDbSyncLock

static java.lang.Object getDbSyncLock()

scanSuspectInterface

public void scanSuspectInterface(java.lang.String ifAddr)
                          throws java.net.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:
java.net.UnknownHostException - Thrown if the address cannot be converted to aa proper internet address.

rescanInterfaceParent

public void rescanInterfaceParent(java.lang.Integer nodeId)
This method is used to force an existing node to be capability rescaned. The main reason for its existance 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.

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.