private class AbstractLookupDiscovery.AnnouncementListener extends Thread
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.
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private boolean |
interrupted
True if thread has been interrupted
|
private ArrayList<NetworkInterface> |
retryNics |
private MulticastSocket |
sock
Multicast socket for receiving packets
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
AnnouncementListener() |
Modifier and Type | Method and Description |
---|---|
void |
interrupt() |
boolean |
isInterrupted()
Accessor method that returns the
interrupted flag. |
private void |
retryBadNics()
Convenience method that retries any previously failed interfaces.
|
void |
run() |
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
private final MulticastSocket sock
private ArrayList<NetworkInterface> retryNics
private volatile boolean interrupted
public AnnouncementListener() throws IOException
IOException
public boolean isInterrupted()
interrupted
flag.isInterrupted
in class Thread
private void retryBadNics()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.