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 GrpcClientFilterFactory
public abstract class GrpcClientFactory<Client extends GrpcClient<BlockingClient>,BlockingClient extends BlockingGrpcClient<Client>,Filter extends FilterableClient,FilterableClient extends FilterableGrpcClient,FilterFactory extends GrpcClientFilterFactory<Filter,FilterableClient>>
extends java.lang.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 . |
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 appliedthis
protected 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
- FilterFactory
Filter
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.