public class DefaultGrpcClientMetadata extends Object implements GrpcClientMetadata
DefaultGrpcClientMetadata.| Modifier and Type | Field and Description |
|---|---|
static GrpcClientMetadata |
INSTANCE
Deprecated.
Use
DefaultGrpcClientMetadata() to create a new instance instead.
GrpcClientMetadata contains modifiable GrpcMetadata.requestContext() and
GrpcMetadata.responseContext() now. Using this constant there will be no access to the actual
context and both mentioned methods will throw UnsupportedOperationException. |
| Modifier | Constructor and Description |
|---|---|
|
DefaultGrpcClientMetadata()
|
|
DefaultGrpcClientMetadata(BufferEncoder requestEncoding)
Creates a new instance.
|
|
DefaultGrpcClientMetadata(BufferEncoder requestEncoding,
Duration timeout)
Creates a new instance.
|
protected |
DefaultGrpcClientMetadata(DefaultGrpcClientMetadata rhs)
Create a new instance, by copying an existing instance.
|
|
DefaultGrpcClientMetadata(Duration timeout)
Create a new instance.
|
|
DefaultGrpcClientMetadata(GrpcExecutionStrategy strategy,
BufferEncoder requestEncoding)
Create a new instance.
|
|
DefaultGrpcClientMetadata(GrpcExecutionStrategy strategy,
BufferEncoder requestEncoding,
Duration timeout)
Create a new instance.
|
protected |
DefaultGrpcClientMetadata(String path)
Deprecated.
|
protected |
DefaultGrpcClientMetadata(String path,
ContentCodec requestEncoding)
Deprecated.
|
protected |
DefaultGrpcClientMetadata(String path,
ContentCodec requestEncoding,
Duration timeout)
Deprecated.
|
protected |
DefaultGrpcClientMetadata(String path,
Duration timeout)
Deprecated.
|
protected |
DefaultGrpcClientMetadata(String path,
GrpcClientMetadata rhs)
Deprecated.
|
protected |
DefaultGrpcClientMetadata(String path,
GrpcExecutionStrategy strategy)
Deprecated.
|
protected |
DefaultGrpcClientMetadata(String path,
GrpcExecutionStrategy strategy,
ContentCodec requestEncoding)
Deprecated.
|
protected |
DefaultGrpcClientMetadata(String path,
GrpcExecutionStrategy strategy,
ContentCodec requestEncoding,
Duration timeout)
|
protected |
DefaultGrpcClientMetadata(String path,
GrpcExecutionStrategy strategy,
Duration timeout)
|
protected |
DefaultGrpcClientMetadata(String path,
Supplier<ContextMap> requestContext,
Supplier<ContextMap> responseContext,
GrpcExecutionStrategy strategy,
ContentCodec requestEncoding,
Duration timeout)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
String |
path()
Deprecated.
|
BufferEncoder |
requestCompressor()
Get the
BufferEncoder to use to compress the request associated with this object. |
ContextMap |
requestContext()
A request context associated with this
GrpcMetadata that translates into
HttpMetaData.context(). |
ContentCodec |
requestEncoding()
Deprecated.
|
ContextMap |
responseContext()
A response context associated with this
GrpcMetadata that translates into
HttpMetaData.context(). |
GrpcExecutionStrategy |
strategy()
GrpcExecutionStrategy to use for the associated
gRPC method. |
Duration |
timeout()
Returns timeout duration after which the response is no longer wanted.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpath, requestContext, responseContext@Deprecated public static final GrpcClientMetadata INSTANCE
DefaultGrpcClientMetadata() to create a new instance instead.
GrpcClientMetadata contains modifiable GrpcMetadata.requestContext() and
GrpcMetadata.responseContext() now. Using this constant there will be no access to the actual
context and both mentioned methods will throw UnsupportedOperationException.default characteristics.public DefaultGrpcClientMetadata()
@Deprecated protected DefaultGrpcClientMetadata(String path)
DefaultGrpcClientMetadata().DefaultGrpcClientMetadata(String, GrpcExecutionStrategy, ContentCodec, Duration).path - for the associated gRPC method.@Deprecated
protected DefaultGrpcClientMetadata(String path,
ContentCodec requestEncoding)
DefaultGrpcClientMetadata(BufferEncoder)DefaultGrpcClientMetadata(String, GrpcExecutionStrategy, ContentCodec, Duration).public DefaultGrpcClientMetadata(BufferEncoder requestEncoding)
requestEncoding - Used to compress the request.public DefaultGrpcClientMetadata(Duration timeout)
timeout - A timeout after which the response is no longer wanted.@Deprecated
protected DefaultGrpcClientMetadata(String path,
ContentCodec requestEncoding,
Duration timeout)
DefaultGrpcClientMetadata(BufferEncoder, Duration).DefaultGrpcClientMetadata(String, GrpcExecutionStrategy, ContentCodec, Duration).public DefaultGrpcClientMetadata(BufferEncoder requestEncoding,
Duration timeout)
requestEncoding - Used to compress the request.timeout - A timeout after which the response is no longer wanted.@Deprecated
protected DefaultGrpcClientMetadata(String path,
@Nullable
GrpcExecutionStrategy strategy)
DefaultGrpcClientMetadata(GrpcExecutionStrategy, BufferEncoder).DefaultGrpcClientMetadata(String, GrpcExecutionStrategy, ContentCodec, Duration).path - for the associated gRPC method.strategy - GrpcExecutionStrategy to use for the associated gRPC
method.@Deprecated
protected DefaultGrpcClientMetadata(String path,
@Nullable
GrpcExecutionStrategy strategy,
ContentCodec requestEncoding)
DefaultGrpcClientMetadata(GrpcExecutionStrategy, BufferEncoder).DefaultGrpcClientMetadata(String, GrpcExecutionStrategy, ContentCodec, Duration).path - for the associated gRPC method.strategy - GrpcExecutionStrategy to use for the associated gRPC
method.requestEncoding - ContentCodec to use for the associated gRPC
method.public DefaultGrpcClientMetadata(@Nullable
GrpcExecutionStrategy strategy,
BufferEncoder requestEncoding)
strategy - GrpcExecutionStrategy to use for the associated gRPC
call.requestEncoding - Used to compress the request.@Deprecated
protected DefaultGrpcClientMetadata(String path,
@Nullable
Duration timeout)
DefaultGrpcClientMetadata(BufferEncoder, Duration).DefaultGrpcClientMetadata(String, GrpcExecutionStrategy, ContentCodec, Duration).path - for the associated gRPC method.timeout - A timeout after which the response is no longer wanted.@Deprecated
protected DefaultGrpcClientMetadata(String path,
@Nullable
GrpcExecutionStrategy strategy,
@Nullable
Duration timeout)
DefaultGrpcClientMetadata(String, GrpcExecutionStrategy, ContentCodec, Duration).path - for the associated gRPC method.strategy - GrpcExecutionStrategy to use for the associated gRPC
method.timeout - A timeout after which the response is no longer wanted.@Deprecated
protected DefaultGrpcClientMetadata(String path,
@Nullable
GrpcExecutionStrategy strategy,
ContentCodec requestEncoding,
@Nullable
Duration timeout)
path - for the associated gRPC method.strategy - GrpcExecutionStrategy to use for the associated gRPC
method.requestEncoding - ContentCodec to use for the associated gRPC
method.timeout - A timeout after which the response is no longer wanted.@Deprecated
protected DefaultGrpcClientMetadata(String path,
Supplier<ContextMap> requestContext,
Supplier<ContextMap> responseContext,
@Nullable
GrpcExecutionStrategy strategy,
ContentCodec requestEncoding,
@Nullable
Duration timeout)
@Deprecated
protected DefaultGrpcClientMetadata(String path,
GrpcClientMetadata rhs)
DefaultGrpcClientMetadata(DefaultGrpcClientMetadata).path - for the associated gRPC method.rhs - Copy everything except the path from this object.protected DefaultGrpcClientMetadata(DefaultGrpcClientMetadata rhs)
rhs - Right hand side to copy from.public DefaultGrpcClientMetadata(@Nullable
GrpcExecutionStrategy strategy,
@Nullable
BufferEncoder requestEncoding,
@Nullable
Duration timeout)
strategy - GrpcExecutionStrategy to use for the associated gRPC
call.requestEncoding - Used to compress the request.timeout - A timeout after which the response is no longer wanted.public final GrpcExecutionStrategy strategy()
GrpcClientMetadataGrpcExecutionStrategy to use for the associated
gRPC method.strategy in interface GrpcClientMetadataGrpcExecutionStrategy to use for the associated
gRPC method.@Deprecated public ContentCodec requestEncoding()
GrpcClientMetadataContentCodec to use for the associated gRPC method.requestEncoding in interface GrpcClientMetadataContentCodec to use for the associated gRPC method.@Nullable public BufferEncoder requestCompressor()
GrpcClientMetadataBufferEncoder to use to compress the request associated with this object.requestCompressor in interface GrpcClientMetadataBufferEncoder to use to compress the request associated with this object.@Nullable public Duration timeout()
GrpcClientMetadatatimeout in interface GrpcClientMetadataDuration of associated timeout or null for no timeout@Deprecated public String path()
GrpcMetadatapath in interface GrpcMetadatapublic ContextMap requestContext()
GrpcMetadataGrpcMetadata that translates into
HttpMetaData.context().
Context can be used to associate a state with a request without serializing its state on the wire or transmit a state between HTTP and gRPC layers.
requestContext in interface GrpcMetadataGrpcMetadata that translates into
HttpMetaData.context().public ContextMap responseContext()
GrpcMetadataGrpcMetadata that translates into
HttpMetaData.context().
Context can be used to associate a state with a response without serializing its state on the wire or transmit a state between HTTP and gRPC layers.
responseContext in interface GrpcMetadataGrpcMetadata that translates into
HttpMetaData.context().