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

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

public final class DiscPingReplyReceiver
extends PollerThread

The DiscPingReplyReceiver is designed as a single thread that receives all data messages from the icmpd. The message are then decoded and the appropiate messages are placed into the received queue for used by the object reading the queue.

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

Field Summary
private  Object m_informer
          This is the object to signal whenever a new reply is stuffed into the queue.
private  DaemonConnection m_portal
          The connection to the icmp daemon.
private  PCQueue m_replyQ
          The queue to write the received replies
 
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
private DiscPingReplyReceiver()
          The default constructor is marked private to prevent it's used.
  DiscPingReplyReceiver(DaemonConnection dc, PCQueue pingReplyQ, Object informer)
          Constructs a ping reciever thread that reads the messages from the connection and stores them in the queue.
 
Method Summary
 void run()
          The run() method does the actual work of reading messages from the daemon and placing those messages in the appropoiate queue for use by other threads.
 
Methods inherited from class org.opennms.bb.dp.common.components.PollerThread
getCtrlStatus, getOpStatus, pauseOperation, pauseThread, resumeOperation, resumeThread, setCtrlStatus, setOpStatus, setUserStatus, shutdown, 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_replyQ

private PCQueue m_replyQ
The queue to write the received replies

m_portal

private DaemonConnection m_portal
The connection to the icmp daemon.

m_informer

private Object m_informer
This is the object to signal whenever a new reply is stuffed into the queue.
Constructor Detail

DiscPingReplyReceiver

private DiscPingReplyReceiver()
                       throws UnsupportedOperationException
The default constructor is marked private to prevent it's used. The constructor always throws an UnsupportedOperationException.
Throws:
UnsupportedOperationException - Always thrown.

DiscPingReplyReceiver

public DiscPingReplyReceiver(DaemonConnection dc,
                             PCQueue pingReplyQ,
                             Object informer)
Constructs a ping reciever thread that reads the messages from the connection and stores them in the queue.
Parameters:
dc - The connection to the daemon
pingReplyQ - Location where received messages are written.
informer - The object to call notifyAll upon when a new reply is received.
Method Detail

run

public void run()
The run() method does the actual work of reading messages from the daemon and placing those messages in the appropoiate queue for use by other threads.
Overrides:
run in class Thread