Class SocketInitiator.SocketRacer

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    SocketInitiator

    private class SocketInitiator.SocketRacer
    extends java.lang.Thread
    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

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void abort​(java.lang.Exception exception)  
      private void complete​(java.net.Socket socket)  
      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, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • mSocketFactory

        private final javax.net.SocketFactory mSocketFactory
      • mSocketAddress

        private final java.net.SocketAddress mSocketAddress
      • mServerNames

        private java.lang.String[] mServerNames
      • mConnectTimeout

        private final int mConnectTimeout
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • complete

        private void complete​(java.net.Socket socket)
      • abort

        void abort​(java.lang.Exception exception)