|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
net.jini.discovery.LookupDiscovery.AnnouncementListener
private class LookupDiscovery.AnnouncementListener
Thread that listens for multicast announcements from lookup services.
If the announcements are from a lookup service that has not already been discovered, and if it is determined that the lookup service belongs to at least one group of interest, a "pendingDiscovery" is queued for the UnicastDiscoveryTask to process asynchronously, completing the discovery process by performing unicast discovery.
If the announcements are from a lookup service that has already been discovered, the lookup service's member groups - as indicated in the announcements - are analyzed for changes that may result in either the lookup service being discarded, or in a changed event being sent.
Only 1 instance of this thread is run.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private boolean |
interrupted
True if thread has been interrupted |
private ArrayList |
retryNics
|
private MulticastSocket |
sock
Multicast socket for receiving packets |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LookupDiscovery.AnnouncementListener()
Create a daemon thread |
Method Summary | |
---|---|
void |
interrupt()
|
boolean |
isInterrupted()
Accessor method that returns the interrupted flag. |
private void |
retryBadNics()
Convenience method that retries any previously failed interfaces. |
void |
run()
|
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, 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 |
---|
private MulticastSocket sock
private ArrayList retryNics
private volatile boolean interrupted
Constructor Detail |
---|
public LookupDiscovery.AnnouncementListener() throws IOException
IOException
Method Detail |
---|
public void interrupt()
interrupt
in class Thread
public boolean isInterrupted()
interrupted
flag.
isInterrupted
in class Thread
private void retryBadNics()
public void run()
run
in interface Runnable
run
in class Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |