net.jini.discovery
Class LookupDiscovery.ResponseListener
java.lang.Object
java.lang.Thread
net.jini.discovery.LookupDiscovery.ResponseListener
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- LookupDiscovery
private class LookupDiscovery.ResponseListener
- extends Thread
Thread that listens for multicast responses to the multicast requests
sent out by the Requestor Thread class. Upon receiving a multicast
response, the socket that accepted the connection request associated
with the the multicast response is added to the set of
pendingDiscoveries so that it (the socket) will be used by the
UnicastDiscoveryTask to complete the discovery process asynchronously.
Only 1 instance of this thread is run.
Field Summary |
private boolean |
interrupted
True if thread has been interrupted |
ServerSocket |
serv
Server socket for accepting connections |
Method Summary |
int |
getPort()
Return the local port of the socket |
void |
interrupt()
|
boolean |
isInterrupted()
Accessor method that returns the interrupted flag. |
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 |
serv
public ServerSocket serv
- Server socket for accepting connections
interrupted
private volatile boolean interrupted
- True if thread has been interrupted
LookupDiscovery.ResponseListener
public LookupDiscovery.ResponseListener()
throws IOException
- Create a daemon thread
- Throws:
IOException
interrupt
public void interrupt()
- Overrides:
interrupt
in class Thread
isInterrupted
public boolean isInterrupted()
- Accessor method that returns the
interrupted
flag.
- Overrides:
isInterrupted
in class Thread
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
getPort
public int getPort()
- Return the local port of the socket
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.