public class GrpcMessagingThread extends Thread
GrpcMessagingContext
for current thread.
The context is storead in a WeakReference
in order to allow the thread
to be garbage collected.
There is no GrpcMessagingContext
associated with the thread when it is first created.
It is the responsibility of thread creators to set
the thread context when appropriate.Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
GrpcMessagingThread(Runnable target,
String name)
Constructs a new
GrpcMessagingThread . |
Modifier and Type | Method and Description |
---|---|
GrpcMessagingContext |
getContext() |
void |
setContext(GrpcMessagingContext context)
Sets the Grpc messaging context.
|
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public GrpcMessagingThread(Runnable target, String name)
GrpcMessagingThread
.target
- the target runnablename
- name of the threadpublic void setContext(GrpcMessagingContext context)
context
- context to setpublic GrpcMessagingContext getContext()
Copyright © 2023. All Rights Reserved.