public final class ControlResponsePoller extends Object
Modifier and Type | Field and Description |
---|---|
static int |
FRAGMENT_LIMIT
Limit to apply when polling response messages.
|
Constructor and Description |
---|
ControlResponsePoller(Subscription subscription)
Create a poller for a given subscription to an archive for control response messages with a default
fragment limit for polling as
FRAGMENT_LIMIT . |
Modifier and Type | Method and Description |
---|---|
ControlResponseCode |
code()
Get the response code of the last response.
|
long |
controlSessionId()
Control session id of the last polled message or
Aeron.NULL_VALUE if poll returned nothing. |
long |
correlationId()
Correlation id of the last polled message or
Aeron.NULL_VALUE if poll returned nothing. |
byte[] |
encodedChallenge()
Get the encoded challenge of the last challenge.
|
String |
errorMessage()
Get the error message of the last response.
|
boolean |
isPollComplete()
Has the last polling action received a complete message?
|
int |
poll()
Poll for control response events.
|
long |
relevantId()
Get the relevant id returned with the response, e.g.
|
Subscription |
subscription()
Get the
Subscription used for polling responses. |
String |
toString() |
int |
version()
Version response from the server in semantic version form.
|
boolean |
wasChallenged()
Was the last polling action received a challenge message?
|
public static final int FRAGMENT_LIMIT
public ControlResponsePoller(Subscription subscription)
FRAGMENT_LIMIT
.subscription
- to poll for new events.public Subscription subscription()
Subscription
used for polling responses.Subscription
used for polling responses.public int poll()
public long controlSessionId()
Aeron.NULL_VALUE
if poll returned nothing.Aeron.NULL_VALUE
if poll returned nothing.public long correlationId()
Aeron.NULL_VALUE
if poll returned nothing.Aeron.NULL_VALUE
if poll returned nothing.public long relevantId()
public int version()
public boolean isPollComplete()
public ControlResponseCode code()
public String errorMessage()
public boolean wasChallenged()
public byte[] encodedChallenge()
Copyright © 2014-2021 Real Logic Limited. All Rights Reserved.