Package one.nio.server
Class PayloadThread
- java.lang.Object
-
- java.lang.Thread
-
- one.nio.server.PayloadThread
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
SelectorThread
public class PayloadThread extends Thread
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Objectpayloadprotected SchedulingPolicyschedulingPolicy-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description PayloadThread(Runnable target)PayloadThread(Runnable target, String name)PayloadThread(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PayloadThreadcurrent()Objectpayload()voidrun()SchedulingPolicyschedulingPolicy()voidsetPayload(Object payload)voidsetSchedulingPolicy(SchedulingPolicy schedulingPolicy)-
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
-
-
-
-
Field Detail
-
payload
protected Object payload
-
schedulingPolicy
protected SchedulingPolicy schedulingPolicy
-
-
Method Detail
-
payload
public final Object payload()
-
setPayload
public final void setPayload(Object payload)
-
schedulingPolicy
public final SchedulingPolicy schedulingPolicy()
-
setSchedulingPolicy
public final void setSchedulingPolicy(SchedulingPolicy schedulingPolicy)
-
current
public static PayloadThread current()
-
-