Uses of Class
io.grpc.Context
-
Packages that use Context Package Description io.grpc The gRPC core public API.io.grpc.grpclb io.grpc.internal Interfaces and implementations that are internal to gRPC. -
-
Uses of Context in io.grpc
Subclasses of Context in io.grpc Modifier and Type Class Description static class
Context.CancellableContext
A context which inherits cancellation from its parent but which can also be independently cancelled and which will propagate cancellation to its descendants.Fields in io.grpc declared as Context Modifier and Type Field Description private Context
CompositeCallCredentials.WrappingMetadataApplier. context
private Context
Context.ExecutableListener. context
private Context
Contexts.ContextualizedServerCallListener. context
static Context
Context. ROOT
The logical root context which is the ultimate ancestor of all contexts.private Context
Context.CancellableContext. uncancellableSurrogate
Fields in io.grpc with type parameters of type Context Modifier and Type Field Description (package private) static java.lang.ThreadLocal<Context>
ThreadLocalContextStorage. localContext
Currently bound context.Methods in io.grpc that return Context Modifier and Type Method Description Context
Context. attach()
Attach this context, thus enter a new scope within which this context iscurrent()
.Context
Context.CancellableContext. attach()
static Context
Context. current()
Return the context associated with the current scope, will never returnnull
.abstract Context
Context.Storage. current()
Implementscurrent()
.Context
ThreadLocalContextStorage. current()
abstract Context
Context.Storage. doAttach(Context toAttach)
Implementsattach()
.Context
ThreadLocalContextStorage. doAttach(Context toAttach)
Context
ServerStreamTracer. filterContext(Context context)
Called before the interceptors and the call handlers and make changes to the Context object if needed.Context
Context. fork()
Create a new context which propagates the values of this context but does not cascade its cancellation.<V> Context
Context. withValue(Context.Key<V> k1, V v1)
Create a new context with the given key value set.<V1,V2>
ContextContext. withValues(Context.Key<V1> k1, V1 v1, Context.Key<V2> k2, V2 v2)
Create a new context with the given key value set.<V1,V2,V3>
ContextContext. withValues(Context.Key<V1> k1, V1 v1, Context.Key<V2> k2, V2 v2, Context.Key<V3> k3, V3 v3)
Create a new context with the given key value set.<V1,V2,V3,V4>
ContextContext. withValues(Context.Key<V1> k1, V1 v1, Context.Key<V2> k2, V2 v2, Context.Key<V3> k3, V3 v3, Context.Key<V4> k4, V4 v4)
Create a new context with the given key value set.Methods in io.grpc with parameters of type Context Modifier and Type Method Description (package private) static Context.CancellableContext
Context. cancellableAncestor(Context parent)
Returnsparent
if it is aContext.CancellableContext
, otherwise returns the parent'scancellableAncestor
.void
Context.CancellationListener. cancelled(Context context)
Notifies that a context was cancelled.void
Context.CancellableContext. detach(Context toAttach)
void
Context. detach(Context toAttach)
Reverse anattach()
, restoring the previous context and exiting the current scope.abstract void
Context.Storage. detach(Context toDetach, Context toRestore)
Implementsdetach(io.grpc.Context)
.void
ThreadLocalContextStorage. detach(Context toDetach, Context toRestore)
void
Context.CancellableContext. detachAndCancel(Context toAttach, java.lang.Throwable cause)
Cancel this context and detach it as the current context.abstract Context
Context.Storage. doAttach(Context toAttach)
Implementsattach()
.Context
ThreadLocalContextStorage. doAttach(Context toAttach)
Context
ServerStreamTracer. filterContext(Context context)
Called before the interceptors and the call handlers and make changes to the Context object if needed.T
Context.Key. get(Context context)
Get the value from the specified context for this key.static <ReqT,RespT>
ServerCall.Listener<ReqT>Contexts. interceptCall(Context context, ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
private void
Context.CancellableContext. removeListenerInternal(Context.CancellationListener cancellationListener, Context context)
static Status
Contexts. statusFromCancelled(Context context)
Returns theStatus
of a cancelled context ornull
if the context is not cancelled.Constructors in io.grpc with parameters of type Context Constructor Description CancellableContext(Context parent)
Create a cancellable context that does not have a deadline.CancellableContext(Context parent, Deadline deadline)
Create a cancellable context that has a deadline.Context(Context parent, PersistentHashArrayMappedTrie.Node<Context.Key<?>,java.lang.Object> keyValueEntries)
Construct a context that cannot be cancelled but will cascade cancellation from its parent if it is cancellable.ContextualizedServerCallListener(ServerCall.Listener<ReqT> delegate, Context context)
ExecutableListener(java.util.concurrent.Executor executor, Context.CancellationListener listener, Context context)
WrappingMetadataApplier(CallCredentials.RequestInfo requestInfo, java.util.concurrent.Executor appExecutor, CallCredentials.MetadataApplier delegate, Context context)
-
Uses of Context in io.grpc.grpclb
Fields in io.grpc.grpclb declared as Context Modifier and Type Field Description private Context
GrpclbLoadBalancer. context
private Context
GrpclbState. context
Constructors in io.grpc.grpclb with parameters of type Context Constructor Description GrpclbLoadBalancer(LoadBalancer.Helper helper, Context context, SubchannelPool subchannelPool, TimeProvider time, com.google.common.base.Stopwatch stopwatch, BackoffPolicy.Provider backoffPolicyProvider)
GrpclbState(GrpclbConfig config, LoadBalancer.Helper helper, Context context, SubchannelPool subchannelPool, TimeProvider time, com.google.common.base.Stopwatch stopwatch, BackoffPolicy.Provider backoffPolicyProvider)
-
Uses of Context in io.grpc.internal
Fields in io.grpc.internal declared as Context Modifier and Type Field Description private Context
ClientCallImpl. context
private Context
ContextRunnable. context
private Context
DelayedClientCall. context
private Context
DelayedClientTransport.PendingStream. context
private Context
ManagedChannelImpl.ConfigSelectingClientCall. context
(package private) Context
ManagedChannelImpl.RealChannel.PendingCall. context
private Context
MetadataApplierImpl. ctx
private Context
ServerImpl. rootContext
Methods in io.grpc.internal that return Context Modifier and Type Method Description <ReqT,RespT>
ContextStatsTraceContext. serverFilterContext(Context context)
Methods in io.grpc.internal with parameters of type Context Modifier and Type Method Description void
ClientCallImpl.CancellationHandler. cancelled(Context context)
ClientStream
ClientCallImpl.ClientStreamProvider. newStream(MethodDescriptor<?,?> method, CallOptions callOptions, Metadata headers, Context context)
ClientStream
ManagedChannelImpl.ChannelStreamProvider. newStream(MethodDescriptor<?,?> method, CallOptions callOptions, Metadata headers, Context context)
<ReqT,RespT>
ContextStatsTraceContext. serverFilterContext(Context context)
Constructors in io.grpc.internal with parameters of type Context Constructor Description ContextRunnable(Context context)
PendingCall(Context context, MethodDescriptor<ReqT,RespT> method, CallOptions callOptions)
ServerImpl(ServerImplBuilder builder, InternalServer transportServer, Context rootContext)
Construct a server.
-