Class FakeOngoingRequest

  • All Implemented Interfaces:
    com.spotify.apollo.request.OngoingRequest

    public class FakeOngoingRequest
    extends Object
    implements com.spotify.apollo.request.OngoingRequest
    A mock service request used when injecting a request into an Apollo application.
    • Field Summary

      • Fields inherited from interface com.spotify.apollo.request.OngoingRequest

        PORT_ZERO, UNKNOWN_SERVER_INFO
    • Constructor Summary

      Constructors 
      Constructor Description
      FakeOngoingRequest​(com.spotify.apollo.Request request)
      Create a new mock service request holding an Apollo Request.
    • Constructor Detail

      • FakeOngoingRequest

        public FakeOngoingRequest​(com.spotify.apollo.Request request)
        Create a new mock service request holding an Apollo Request.
        Parameters:
        request - The request.
    • Method Detail

      • request

        public com.spotify.apollo.Request request()
        Specified by:
        request in interface com.spotify.apollo.request.OngoingRequest
      • reply

        public void reply​(com.spotify.apollo.Response<okio.ByteString> response)
        Specified by:
        reply in interface com.spotify.apollo.request.OngoingRequest
      • drop

        public void drop()
        Specified by:
        drop in interface com.spotify.apollo.request.OngoingRequest
      • isExpired

        public boolean isExpired()
        Specified by:
        isExpired in interface com.spotify.apollo.request.OngoingRequest
      • metadata

        public com.spotify.apollo.RequestMetadata metadata()
        Specified by:
        metadata in interface com.spotify.apollo.request.OngoingRequest
      • getReply

        public CompletionStage<com.spotify.apollo.Response<okio.ByteString>> getReply()
        Get a future holding the reply.
        Returns:
        A CompletionStage holding the reply.