hudson.remoting
Class PingThread
java.lang.Object
java.lang.Thread
hudson.remoting.PingThread
- All Implemented Interfaces:
- Runnable
public abstract class PingThread
- extends Thread
Periodically perform a ping.
Useful when a connection needs to be kept alive by sending data,
or when the disconnection is not properly detected.
onDead() method needs to be overrided to define
what to do when a connection appears to be dead.
- Since:
- 1.170
- Author:
- Kohsuke Kawaguchi
|
Method Summary |
protected abstract void |
onDead()
Called when ping failed. |
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 |
PingThread
public PingThread(Channel channel,
long timeout,
long interval)
PingThread
public PingThread(Channel channel,
long interval)
PingThread
public PingThread(Channel channel)
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
onDead
protected abstract void onDead()
- Called when ping failed.
Copyright © 2004-2011. All Rights Reserved.