Module io.inverno.mod.grpc.client
Package io.inverno.mod.grpc.client
Interface GrpcClient.Stub<A extends ExchangeContext,B extends GrpcClient.Stub<A,B>>
- Type Parameters:
A
- the exchange context typeB
- the stub type
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
GrpcClient
public static interface GrpcClient.Stub<A extends ExchangeContext,B extends GrpcClient.Stub<A,B>>
extends AutoCloseable
A base gRPC client stub definition.
This is intended to be used when generating gRPC client stub from Protocol buffer definitions.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
Subscribes toshutdownGracefully()
in order to eventually close the underlying endpoint.shutdown()
Shutdowns the underlying endpoint right away.Gracefully shutdwon the underlying endpoint.withMetadata
(Consumer<GrpcOutboundRequestMetadata> metadataConfigurer) Returns a new stub configured with the specified metadata.
-
Method Details
-
withMetadata
Returns a new stub configured with the specified metadata.
- Parameters:
metadataConfigurer
- a gRPC request metadata configurer- Returns:
- a configured stub
-
close
default void close()Subscribes to
shutdownGracefully()
in order to eventually close the underlying endpoint.This method should return right away before the endpoint is actually closed, you should prefer
shutdown()
orshutdownGracefully()
to control when the endpoint is actually closed.- Specified by:
close
in interfaceAutoCloseable
-
shutdown
Shutdowns the underlying endpoint right away.
- Returns:
- a mono which completes once the underlying endpoint is shutdown
-
shutdownGracefully
Gracefully shutdwon the underlying endpoint.
- Returns:
- a mono which completes once the underlying endpoint is shutdown
-