Interface FirstRequestMatcherBuilderStep<BUILDER extends FirstRequestMatcherBuilderStep<BUILDER,ReqT>,ReqT>
- All Superinterfaces:
BuilderStep
- All Known Subinterfaces:
BidiStreamingMethodStubBuilderStep<ReqT,,RespT> ClientStreamingMethodStubBuilderStep<ReqT,RespT>
- All Known Implementing Classes:
BidiStreamingMethodStubBuilderImpl,ClientStreamingMethodStubBuilderImpl
public interface FirstRequestMatcherBuilderStep<BUILDER extends FirstRequestMatcherBuilderStep<BUILDER,ReqT>,ReqT>
extends BuilderStep
- Author:
- Fadelis
-
Method Summary
Modifier and TypeMethodDescriptionwithFirstRequest(Predicate<ReqT> requestPredicate) Adds a request matcher for the stub, which will trigger only if incoming first request satisfies givenPredicate.default BUILDERwithFirstRequest(ReqT request) Adds a request matcher for the stub, which will trigger only if incoming first request is equal to the provided one.
-
Method Details
-
withFirstRequest
Adds a request matcher for the stub, which will trigger only if incoming first request satisfies given
Predicate.This is used for client or bidi streaming method calls. Only the first request can be used for matching, as a stub needs to be selected at this point or the call will be rejected.
Subsequent request matchers will replace the old one.
-
withFirstRequest
Adds a request matcher for the stub, which will trigger only if incoming first request is equal to the provided one.
This is used for client or bidi streaming method calls. Only the first request can be used for matching, as a stub needs to be selected at this point or the call will be rejected.
Subsequent request matchers will replace the old one.
-