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 Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final SocketInitiator.Signalprivate final SocketInitiator.SocketFutureprivate String[]private final SocketAddressprivate final SocketFactoryprivate final SocketInitiator.SignalFields inherited from class 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 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
-
run
-
complete
-
abort
-