Class ContextRunnable

java.lang.Object
io.grpc.internal.ContextRunnable
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
DelayedClientCall.CloseListenerRunnable

abstract class ContextRunnable extends Object implements Runnable
Utility base implementation of Runnable that performs the same function as Context.wrap(Runnable) without requiring the construction of an additional object.
  • Field Details

    • context

      private final Context context
  • Constructor Details

    • ContextRunnable

      protected ContextRunnable(Context context)
  • Method Details

    • run

      public final void run()
      Specified by:
      run in interface Runnable
    • runInContext

      public abstract void runInContext()