wtanaka.praya
Class RecipientResolver

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--wtanaka.praya.RecipientResolver
All Implemented Interfaces:
java.lang.Runnable

public class RecipientResolver
extends java.lang.Thread

RecipientResolver is a thread that resolves recipients. It has a pleaseDie method which can be called to cancel the resolver.

Return to Sourceforge or the Praya Homepage

Version:
$Name: $ $Date: 2002/07/09 02:45:19 $
Author:
Wesley Tanaka

Field Summary
private  java.lang.Exception m_cannotResolveException
           
private  long m_delay
           
private  boolean m_isFinished
           
private  boolean m_isResolved
           
private  RecipientResolverListener m_listener
           
private  Recipient m_recipient
           
private  ResolvedRecipient m_resolvedRecipient
           
private  boolean m_shouldDie
           
 
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
RecipientResolver(Recipient recipient, RecipientResolverListener listener, long delay)
          Constructor.
 
Method Summary
 Recipient getRecipient()
           
 void pleaseDie()
          Instructs this RecipientResolver to stop resolution.
 void run()
           
 ResolvedRecipient waitForResolvedRecipient(long timeout)
           
 
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_shouldDie

private boolean m_shouldDie

m_recipient

private Recipient m_recipient

m_listener

private RecipientResolverListener m_listener

m_isFinished

private boolean m_isFinished

m_isResolved

private boolean m_isResolved

m_resolvedRecipient

private ResolvedRecipient m_resolvedRecipient

m_cannotResolveException

private java.lang.Exception m_cannotResolveException

m_delay

private long m_delay
Constructor Detail

RecipientResolver

public RecipientResolver(Recipient recipient,
                         RecipientResolverListener listener,
                         long delay)
Constructor.
Parameters:
delay - the number of milliseconds that this should wait before it actually starts resolving.
Method Detail

pleaseDie

public void pleaseDie()
Instructs this RecipientResolver to stop resolution.

run

public void run()
Overrides:
run in class java.lang.Thread

getRecipient

public Recipient getRecipient()

waitForResolvedRecipient

public ResolvedRecipient waitForResolvedRecipient(long timeout)
                                           throws CannotResolveException,
                                                  java.lang.InterruptedException