Package io.servicetalk.grpc.api
Interface GrpcServiceFilterFactory<Filter extends Service,Service>
-
- Type Parameters:
Filter- Type for service filterService- Type for service
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface GrpcServiceFilterFactory<Filter extends Service,Service>A factory to create gRPC service filters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default GrpcServiceFilterFactory<Filter,Service>append(GrpcServiceFilterFactory<Filter,Service> before)Returns a composed factory that first applies thebeforefactory to its input, and then applies this factory to the result.Filtercreate(Service service)Create aGrpcServiceFilterFactoryusing the providedGrpcServiceFilterFactory.
-
-
-
Method Detail
-
create
Filter create(Service service)
Create aGrpcServiceFilterFactoryusing the providedGrpcServiceFilterFactory.- Parameters:
service-GrpcServiceFilterFactoryto filter.- Returns:
GrpcServiceFilterFactoryusing the providedGrpcServiceFilterFactory.
-
append
default GrpcServiceFilterFactory<Filter,Service> append(GrpcServiceFilterFactory<Filter,Service> before)
Returns a composed factory that first applies thebeforefactory to its input, and then applies this factory to the result.The order of execution of these filters are in order of append. If 3 filters are added as follows:
builder.append(filter1).append(filter2).append(filter3)accepting a request by a service wrapped by this filter chain, the order of invocation of these filters will be:filter1 => filter2 => filter3 => service- Parameters:
before- the factory to apply before this factory is applied.- Returns:
- a composed factory that first applies the
beforefactory and then applies this factory.
-
-