org.opennms.bb.dp.discovery.components
Class IPGenerator

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.opennms.bb.dp.common.components.PollerThread
              |
              +--org.opennms.bb.dp.discovery.components.IPGenerator
All Implemented Interfaces:
Runnable

public class IPGenerator
extends PollerThread

IPGenerator queues the list of specific IPAddresses to be pinged and then expands the m_ranges and queues those addresses one at a time It adds the addresses to a 'm_generatedQ' to be read by the DiscPingManager.

Version:
$Revision: 1.15 $
Author:
Sowmya, OpenNMS

Field Summary
private  PCQueue m_generatedQ
          The output queue for placing generated addresses
private  Set m_knownNodes
          The list of items that are known by the application (to be excluded from ping)
private  List m_ranges
          The range of items to be enumerated through
private  List m_specifics
          The specific list items to be iterated through
 
Fields inherited from class org.opennms.bb.dp.common.components.PollerThread
m_curOpStatus, STATUS_MASK, STATUS_NORMAL, STATUS_PAUSED, STATUS_PAUSING, STATUS_RESUMING, STATUS_SHUTDOWN, STATUS_STARTING, STATUS_TERMINATING
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ
 
Constructor Summary
IPGenerator(List ranges, List specifics, Set knownNodes, PCQueue Q)
          Constructs a generator object that iterates through the list of specific addresses.
 
Method Summary
private  void checkKnownNodeContents(String addr, boolean bCheck)
          Checking the contents of knownNodes ..
 void run()
          The main routine invoked by the base class java.lang.Thread.
 void shutdown()
          Initiates the shutdown of the active thread and waits for the generator to terminate before returnning.
 
Methods inherited from class org.opennms.bb.dp.common.components.PollerThread
getCtrlStatus, getOpStatus, pauseOperation, pauseThread, resumeOperation, resumeThread, setCtrlStatus, setOpStatus, setUserStatus, shutdownThread
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_specifics

private List m_specifics
The specific list items to be iterated through

m_ranges

private List m_ranges
The range of items to be enumerated through

m_knownNodes

private Set m_knownNodes
The list of items that are known by the application (to be excluded from ping)

m_generatedQ

private PCQueue m_generatedQ
The output queue for placing generated addresses
Constructor Detail

IPGenerator

public IPGenerator(List ranges,
                   List specifics,
                   Set knownNodes,
                   PCQueue Q)

Constructs a generator object that iterates through the list of specific addresses. It also generates new addresses from the ranges. All generated addresses are placed into the output queue if they are not found in the knownNodes list.

Parameters:
ranges - The range list for address generation
specific - The list of specific nodes.
knownNodes - The list of known nodes
Q - The output queue
Method Detail

run

public void run()

The main routine invoked by the base class java.lang.Thread.

Overrides:
run in class Thread

shutdown

public void shutdown()

Initiates the shutdown of the active thread and waits for the generator to terminate before returnning. When this method returns the operational status will be set to STATUS_SHUTDOWN and the objects notifyAll() method will have been invoked.

Overrides:
shutdown in class PollerThread
Following copied from class: org.opennms.bb.dp.common.components.PollerThread
See Also:
PollerThread.STATUS_TERMINATING, Object.notifyAll()

checkKnownNodeContents

private void checkKnownNodeContents(String addr,
                                    boolean bCheck)
Checking the contents of knownNodes ..