Module io.inverno.mod.grpc.base
Package io.inverno.mod.grpc.base
Interface GrpcOutboundRequestMetadata
- All Superinterfaces:
GrpcInboundMetadata
,GrpcInboundRequestMetadata
,GrpcOutboundMetadata<GrpcOutboundRequestMetadata>
public interface GrpcOutboundRequestMetadata
extends GrpcInboundRequestMetadata, GrpcOutboundMetadata<GrpcOutboundRequestMetadata>
Represents mutable outbound gRPC request metadata.
This extends the GrpcOutboundMetadata
to expose request specific information like accepted message encodings, message encoding, message type and timeout.
An outbound request is sent by a client in a client exchange.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionacceptMessageEncoding
(List<String> messageEncodings) Sets the list of message encodings accepted by a client.messageEncoding
(String messageEncoding) Sets the encoding of messages sent by a client.messageType
(String messageType) Sets the type of messages sent by a client.Sets the gRPC timeout.Methods inherited from interface io.inverno.mod.grpc.base.GrpcInboundMetadata
contains, contains, containsBinary, containsBinary, get, getAll, getAllBinary, getBinary, getBinaryNames, getNames
Methods inherited from interface io.inverno.mod.grpc.base.GrpcInboundRequestMetadata
getAcceptMessageEncoding, getMessageEncoding, getMessageType, getTimeout
Methods inherited from interface io.inverno.mod.grpc.base.GrpcOutboundMetadata
add, addBinary, isWritten, remove, removeBinary, set, setBinary
-
Method Details
-
acceptMessageEncoding
Sets the list of message encodings accepted by a client.
- Parameters:
messageEncodings
- a list of message encodings- Returns:
- the request metadata
-
messageEncoding
Sets the encoding of messages sent by a client.
Note that no error is reported here if an unsupported encoding is specified, the exchange will fail eventually when the request message publisher is subscribed to actually sent messages to the server.
- Parameters:
messageEncoding
- a message encoding- Returns:
- the request metadata
-
messageType
Sets the type of messages sent by a client.
- Parameters:
messageType
- a message type- Returns:
- the request metadata
-
timeout
Sets the gRPC timeout.
- Parameters:
timeout
- a timeout- Returns:
- the request metadata
- Throws:
IllegalArgumentException
- if the specified duration is invalid- See Also:
-