Package com.neovisionaries.ws.client
Class SocketInitiator.SocketRacer
java.lang.Object
java.lang.Thread
com.neovisionaries.ws.client.SocketInitiator.SocketRacer
- All Implemented Interfaces:
Runnable
- Enclosing class:
SocketInitiator
This thread connects to a socket and notifies a
SocketInitiator.SocketFuture
shared across all racer threads when it is done. A racer thread is done
when...
- it has established a connection, or
- when establishing a connection failed with an exception, or
- another racer established a connection.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final SocketInitiator.Signal
private final SocketInitiator.SocketFuture
private String[]
private final SocketAddress
private final SocketFactory
private final SocketInitiator.Signal
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionSocketRacer
(SocketInitiator.SocketFuture future, SocketFactory socketFactory, SocketAddress socketAddress, String[] serverNames, int connectTimeout, SocketInitiator.Signal startSignal, SocketInitiator.Signal doneSignal) -
Method Summary
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, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
-
Field Details
-
mFuture
-
mSocketFactory
-
mSocketAddress
-
mServerNames
-
mConnectTimeout
private final int mConnectTimeout -
mStartSignal
-
mDoneSignal
-
-
Constructor Details
-
SocketRacer
SocketRacer(SocketInitiator.SocketFuture future, SocketFactory socketFactory, SocketAddress socketAddress, String[] serverNames, int connectTimeout, SocketInitiator.Signal startSignal, SocketInitiator.Signal doneSignal)
-
-
Method Details