Package com.neovisionaries.ws.client
Class SocketInitiator.SocketFuture
java.lang.Object
com.neovisionaries.ws.client.SocketInitiator.SocketFuture
- Enclosing class:
SocketInitiator
The socket future is shared across all
SocketInitiator.SocketRacer threads and
aggregates the results. A socket future is considered fulfilled when...
- any racer thread has established a socket in which case all other racers will be stopped, or
- all racer threads returned with an exception, or
- there was no racer thread (e.g. in case there is no network interface).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Exceptionprivate CountDownLatchprivate List<SocketInitiator.SocketRacer> private Socket -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Socketawait(List<SocketInitiator.SocketRacer> racers) (package private) boolean(package private) voidsetException(Exception exception) (package private) voidsetSocket(SocketInitiator.SocketRacer current, Socket socket)
-
Field Details
-
mLatch
-
mRacers
-
mSocket
-
mException
-
-
Constructor Details
-
SocketFuture
private SocketFuture()
-
-
Method Details
-
hasSocket
boolean hasSocket() -
setSocket
-
setException
-
await
- Throws:
Exception
-