Interface RequestMatcherBuilderStep<BUILDER extends RequestMatcherBuilderStep<BUILDER,ReqT>,ReqT>
- All Superinterfaces:
BuilderStep
- All Known Subinterfaces:
RequestPatternBuilderStep<ReqT>,ServerStreamingMethodStubBuilderStep<ReqT,,RespT> UnaryMethodStubBuilderStep<ReqT,RespT>
- All Known Implementing Classes:
RequestMatcherBuilderImpl,RequestPatternBuilderImpl,ServerStreamingMethodStubBuilderImpl,UnaryMethodStubBuilderImpl
public interface RequestMatcherBuilderStep<BUILDER extends RequestMatcherBuilderStep<BUILDER,ReqT>,ReqT>
extends BuilderStep
- Author:
- Fadelis
-
Method Summary
Modifier and TypeMethodDescriptionwithRequest(Predicate<ReqT> requestPredicate) Adds a request matcher for the stub, which will trigger only if incoming request satisfies givenPredicate.default BUILDERwithRequest(ReqT request) Adds a request matcher for the stub, which will trigger only if incoming request is equal to the provided one.
-
Method Details
-
withRequest
Adds a request matcher for the stub, which will trigger only if incoming request satisfies given
Predicate.Only applicable to unary or server streaming methods.
Subsequent request matchers will replace the old one.
-
withRequest
Adds a request matcher for the stub, which will trigger only if incoming request is equal to the provided one.
Only applicable to unary or server streaming methods.
Subsequent request matchers will replace the old one.
-