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 Type
    Method
    Description
    withFirstRequest(Predicate<ReqT> requestPredicate)
    Adds a request matcher for the stub, which will trigger only if incoming first request satisfies given Predicate.
    default BUILDER
    Adds a request matcher for the stub, which will trigger only if incoming first request is equal to the provided one.
  • Method Details

    • withFirstRequest

      BUILDER withFirstRequest(@Nonnull Predicate<ReqT> requestPredicate)

      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

      default BUILDER withFirstRequest(@Nonnull ReqT request)

      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.