public class OnapMrFetchResponse extends OnapMrResponse
| Constructor and Description |
|---|
OnapMrFetchResponse(int statusCode,
String statusMsg)
Construct this response with an empty set of messages and no EOF.
|
OnapMrFetchResponse(int statusCode,
String statusMsg,
List<String> msgs)
Construct this response with a finished set of messages.
|
| Modifier and Type | Method and Description |
|---|---|
String |
consumeNext(long timeoutMs)
Fetch the next message in this response.
|
List<String> |
getMessages()
Deprecated.
Client code should call consumeNext() with a timeout value set
|
boolean |
isEof()
Is this response at the end of its stream, with all pending messages consumed?
|
OnapMrFetchResponse |
markEof()
Mark the response stream as being at its end
|
OnapMrFetchResponse |
push(String msg)
Push a message into this response
|
int |
readyCount()
Get the number of pending messages in the response.
|
getStatusCode, getStatusText, isSuccesspublic OnapMrFetchResponse(int statusCode,
String statusMsg)
statusCode - the HTTP status codestatusMsg - the HTTP status textpublic OnapMrFetchResponse push(String msg)
msg - a message from the servicepublic OnapMrFetchResponse markEof()
public boolean isEof()
public int readyCount()
public String consumeNext(long timeoutMs) throws InterruptedException
timeoutMs - the length of time to wait for the next message (which could potentially be in-flight)InterruptedException - if the wait is interrupted@Deprecated public List<String> getMessages()
Copyright © 2024 continual.io. All rights reserved.