Package com.spotify.apollo.test
Class FakeOngoingRequest
- java.lang.Object
-
- com.spotify.apollo.test.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.
-
-
Constructor Summary
Constructors Constructor Description FakeOngoingRequest(com.spotify.apollo.Request request)
Create a new mock service request holding an ApolloRequest
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
drop()
CompletionStage<com.spotify.apollo.Response<okio.ByteString>>
getReply()
Get a future holding the reply.boolean
isExpired()
com.spotify.apollo.RequestMetadata
metadata()
void
reply(com.spotify.apollo.Response<okio.ByteString> response)
com.spotify.apollo.Request
request()
-
-
-
Method Detail
-
request
public com.spotify.apollo.Request request()
- Specified by:
request
in interfacecom.spotify.apollo.request.OngoingRequest
-
reply
public void reply(com.spotify.apollo.Response<okio.ByteString> response)
- Specified by:
reply
in interfacecom.spotify.apollo.request.OngoingRequest
-
drop
public void drop()
- Specified by:
drop
in interfacecom.spotify.apollo.request.OngoingRequest
-
isExpired
public boolean isExpired()
- Specified by:
isExpired
in interfacecom.spotify.apollo.request.OngoingRequest
-
metadata
public com.spotify.apollo.RequestMetadata metadata()
- Specified by:
metadata
in interfacecom.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.
-
-