Class WebHubConnection.CallWorker

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

    private static class WebHubConnection.CallWorker
    extends java.lang.Thread
    Thread that performs repeated long polls to pull callbacks from the hub and passes them on to this connection's CallableClient for execution.
    • 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
      void run()  
      private void seriousError​(java.lang.Throwable e)
      Invoked if there is a serious (non-timeout) error when polling for callbacks.
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

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

      • CallWorker

        CallWorker​(XmlRpcHubConnection xconn,
                   CallableClient client,
                   java.lang.String appName)
        Constructor.
        Parameters:
        xconn - hub connection
        appName - client's name
    • Method Detail

      • run

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

        private void seriousError​(java.lang.Throwable e)
        Invoked if there is a serious (non-timeout) error when polling for callbacks. This currently stops the polling for good. That may be a drastic response, but at least it prevents repeated high-frequency polling attempts to a broken server, which might otherwise result.