public class RequestContextAdapter extends Object implements RequestContext
Modifier and Type | Field and Description |
---|---|
static io.grpc.Context.Key<RequestContext> |
REQUEST_CONTEXT_KEY |
Constructor and Description |
---|
RequestContextAdapter() |
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Retrieve a registered variable.
|
Set<String> |
keySet()
Retrieves the keys that have been registered to this context.
|
void |
put(String key,
String value)
Register a variable and a value.
|
String |
remove(String key)
Deletes a registered variable.
|
public static final io.grpc.Context.Key<RequestContext> REQUEST_CONTEXT_KEY
public void put(String key, String value)
RequestContext
put
in interface RequestContext
key
- the variable name.value
- the value.public String get(String key)
RequestContext
get
in interface RequestContext
key
- the variable name.public Set<String> keySet()
RequestContext
keySet
in interface RequestContext
public String remove(String key)
RequestContext
remove
in interface RequestContext
Copyright © 2023 The Apache Software Foundation. All rights reserved.