Client - gRPC service that any client built from this
factory represents.BlockingClient - Blocking gRPC service that any client
built from this builder represents.Filter - Type for client filterFilterableClient - Type of filterable client.FilterFactory - Type of GrpcClientFilterFactorypublic abstract class GrpcClientFactory<Client extends GrpcClient<BlockingClient>,BlockingClient extends BlockingGrpcClient<Client>,Filter extends FilterableClient,FilterableClient extends FilterableGrpcClient,FilterFactory extends GrpcClientFilterFactory<Filter,FilterableClient>>
extends Object
Client
contract.| Constructor and Description |
|---|
GrpcClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
GrpcClientFactory<Client,BlockingClient,Filter,FilterableClient,FilterFactory> |
appendClientFilter(FilterFactory before)
Appends the passed
FilterFactory to this factory. |
protected abstract FilterFactory |
appendClientFilterFactory(FilterFactory existing,
FilterFactory append)
Appends the passed
FilterFactory to this client factory. |
protected abstract BlockingClient |
newBlockingClient(GrpcClientCallFactory clientCallFactory)
Create a new client that follows the specified gRPC
BlockingClient contract using the passed GrpcClientCallFactory. |
protected abstract Client |
newClient(FilterableClient filterableClient)
Create a new
Client using the passed FilterableClient. |
protected abstract Client |
newClient(GrpcClientCallFactory clientCallFactory)
Create a new client that follows the specified gRPC
Client contract using the passed GrpcClientCallFactory. |
protected abstract Filter |
newFilter(Client client,
FilterFactory filterFactory)
Create a new
Filter using the passed Client and FilterFactory. |
protected Set<GrpcMessageEncoding> |
supportedEncodings()
Return the list of supported
GrpcMessageEncodings for this client factory. |
GrpcClientFactory<Client,BlockingClient,Filter,FilterableClient,FilterFactory> |
supportedEncodings(Set<GrpcMessageEncoding> supportedEncodings)
Sets the supported message encodings for this client factory.
|
public GrpcClientFactory<Client,BlockingClient,Filter,FilterableClient,FilterFactory> appendClientFilter(FilterFactory before)
FilterFactory to this factory.
The order of execution of these filters are in order of append. If 3 filters are added as follows:
filter1.append(filter2).append(filter3)
making a request to a client wrapped by this filter chain the order of invocation of these filters will be:
filter1 => filter2 => filter3 => client
before - the factory to apply before this factory is appliedthispublic GrpcClientFactory<Client,BlockingClient,Filter,FilterableClient,FilterFactory> supportedEncodings(Set<GrpcMessageEncoding> supportedEncodings)
GrpcMessageEncodings.none() is supportedsupportedEncodings - GrpcMessageEncoding supported encodings for this client.thisprotected Set<GrpcMessageEncoding> supportedEncodings()
GrpcMessageEncodings for this client factory.GrpcMessageEncodings for this client factoryprotected abstract FilterFactory appendClientFilterFactory(FilterFactory existing, FilterFactory append)
FilterFactory to this client factory.existing - Existing FilterFactory.append - FilterFactory to append to existing.before factory and then applies existing
factoryprotected abstract Client newClient(GrpcClientCallFactory clientCallFactory)
Client contract using the passed GrpcClientCallFactory.clientCallFactory - GrpcClientCallFactory to use for creating client calls.
The returned Client should own the lifecycle of this factory.Client contract.protected abstract Filter newFilter(Client client, FilterFactory filterFactory)
Filter using the passed Client and FilterFactory.client - Client to use for creating a Filter through the FilterFactory.filterFactory - FilterFactoryFilter filtering the passed Client.protected abstract Client newClient(FilterableClient filterableClient)
Client using the passed FilterableClient.protected abstract BlockingClient newBlockingClient(GrpcClientCallFactory clientCallFactory)
BlockingClient contract using the passed GrpcClientCallFactory.clientCallFactory - GrpcClientCallFactory to use for creating client calls.
The returned Client should own the lifecycle of this factory.BlockingClient contract.