de.fh_mannheim.mm.dms.indexserver
Class AdjustWeightsThread

java.lang.Object
  extended byjava.lang.Thread
      extended byde.fh_mannheim.mm.dms.indexserver.AdjustWeightsThread
All Implemented Interfaces:
IMonitor, IViewer, java.lang.Runnable

public class AdjustWeightsThread
extends java.lang.Thread
implements java.lang.Runnable, IMonitor

AdjustWeightsThread adjusts weights with the help of contentmanager.

Version:
$Revision: 1.9 $
Author:
Jan Löffler, mail@jlsoft.de

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AdjustWeightsThread(java.lang.ThreadGroup group, java.lang.String strName, ContentManager cntMgr)
          Constructor.
AdjustWeightsThread(java.lang.ThreadGroup group, java.lang.String strName, IViewer viewer, ContentManager cntMgr)
          Constructor.
 
Method Summary
 FormattedDate getRunTime()
          Get the runtime of thread.
 boolean hasFinished()
          Has adjusting finished.
 void registerViewer(IViewer viewer)
          Register a viewer with callback.
 void run()
          Start the thread.
 void stateHasChanged()
          Call all callbacks and send onChanged.
 void unregisterViewer(IViewer viewer)
          Unregister a viewer with callback.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdjustWeightsThread

public AdjustWeightsThread(java.lang.ThreadGroup group,
                           java.lang.String strName,
                           ContentManager cntMgr)
Constructor.

Parameters:
group - Threadgroup
strName - Name of thread

AdjustWeightsThread

public AdjustWeightsThread(java.lang.ThreadGroup group,
                           java.lang.String strName,
                           IViewer viewer,
                           ContentManager cntMgr)
Constructor.

Parameters:
group - Threadgroup
strName - Name of thread
viewer - Viewer
Method Detail

getRunTime

public FormattedDate getRunTime()
Get the runtime of thread.

Returns:
time

hasFinished

public boolean hasFinished()
Has adjusting finished.

Returns:
true, if finished

registerViewer

public void registerViewer(IViewer viewer)
Register a viewer with callback.

Specified by:
registerViewer in interface IMonitor
Parameters:
viewer - Callback

run

public void run()
Start the thread.

Specified by:
run in interface java.lang.Runnable

stateHasChanged

public void stateHasChanged()
Call all callbacks and send onChanged.

Specified by:
stateHasChanged in interface IMonitor

unregisterViewer

public void unregisterViewer(IViewer viewer)
Unregister a viewer with callback.

Specified by:
unregisterViewer in interface IMonitor
Parameters:
viewer - Callback