com.sun.jini.mercury
Class MailboxImpl.Notifier

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.jini.thread.InterruptedStatusThread
          extended by com.sun.jini.mercury.MailboxImpl.Notifier
All Implemented Interfaces:
TimeConstants, Runnable
Enclosing class:
MailboxImpl

private class MailboxImpl.Notifier
extends InterruptedStatusThread
implements TimeConstants

The notifier thread. This thread is responsible for delivering events to client supplied notification targets when their associated registrations are enabled.

The constructor calls start() so there is no need to explicitly start this thread.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private static long PAUSE_TIME
          Time to wait between notification checks
private  Random rand
          Random number generator that will be used for implementing a simple load balancing scheme.
private  TaskManager taskManager
          TaskManager that will be handling the notification tasks
private  WakeupManager wakeupMgr
          wakeup manager for NotifyTask
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface com.sun.jini.constants.TimeConstants
DAYS, HOURS, MINUTES, SECONDS
 
Constructor Summary
MailboxImpl.Notifier(Configuration config)
          Simple constructor.
 
Method Summary
 void run()
          Schedule delivery tasks for any enabled registrations.
 
Methods inherited from class com.sun.jini.thread.InterruptedStatusThread
hasBeenInterrupted, interrupt
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

taskManager

private TaskManager taskManager
TaskManager that will be handling the notification tasks


wakeupMgr

private final WakeupManager wakeupMgr
wakeup manager for NotifyTask


rand

private Random rand
Random number generator that will be used for implementing a simple load balancing scheme. Seed it with the current time.


PAUSE_TIME

private static final long PAUSE_TIME
Time to wait between notification checks

See Also:
Constant Field Values
Constructor Detail

MailboxImpl.Notifier

MailboxImpl.Notifier(Configuration config)
               throws ConfigurationException
Simple constructor.

Throws:
ConfigurationException
Method Detail

run

public void run()
Schedule delivery tasks for any enabled registrations.

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.