public class FakeOngoingRequest extends Object implements OngoingRequest
PORT_ZERO, UNKNOWN_SERVER_INFO
Constructor and Description |
---|
FakeOngoingRequest(Request request)
Create a new mock service request holding an Apollo
Request . |
Modifier and Type | Method and Description |
---|---|
void |
drop()
Drop the request.
|
CompletionStage<Response<okio.ByteString>> |
getReply()
Get a future holding the reply.
|
boolean |
isExpired() |
void |
reply(Response<okio.ByteString> response)
Reply to the request with a
Response . |
Request |
request()
Returns the
Request . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
arrivalTimeNanos, serverInfo
public Request request()
OngoingRequest
Request
.request
in interface OngoingRequest
public void reply(Response<okio.ByteString> response)
OngoingRequest
Response
.reply
in interface OngoingRequest
response
- Response to send as replypublic void drop()
OngoingRequest
drop
in interface OngoingRequest
public boolean isExpired()
isExpired
in interface OngoingRequest
public CompletionStage<Response<okio.ByteString>> getReply()
CompletionStage
holding the reply.Copyright © 2016. All rights reserved.