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. |
ControlResponsePoller(Subscription subscription,
int fragmentLimit)
Create a poller for a given subscription to an archive for control response messages.
|
| Modifier and Type | Method and Description |
|---|---|
ControlResponseCode |
code()
Get the response code of the last response.
|
long |
controlSessionId()
Control session id of polled message or
Aeron.NULL_VALUE if poll returned nothing. |
long |
correlationId()
Correlation id of the 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 response.
|
boolean |
isPollComplete()
Has the last polling action received a complete message?
|
int |
poll()
Poll for control response events.
|
long |
position()
Position of polled
RecordingSignal or Aeron.NULL_VALUE if poll returned nothing. |
long |
recordingId()
Recording id of polled
RecordingSignal or Aeron.NULL_VALUE if poll returned nothing. |
RecordingSignal |
recordingSignal()
Enum of polled
RecordingSignal or null if poll returned nothing. |
long |
relevantId()
Get the relevant id returned with the response, e.g.
|
Subscription |
subscription()
Get the
Subscription used for polling responses. |
long |
subscriptionId()
Subscription id of polled
RecordingSignal or Aeron.NULL_VALUE if poll returned nothing. |
int |
templateId()
SBE template id of polled message or
Aeron.NULL_VALUE if poll returned nothing. |
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 ControlResponsePoller(Subscription subscription, int fragmentLimit)
subscription - to poll for new events.fragmentLimit - to apply when polling.public Subscription subscription()
Subscription used for polling responses.Subscription used for polling responses.public int poll()
public int templateId()
Aeron.NULL_VALUE if poll returned nothing.Aeron.NULL_VALUE if poll returned nothing.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 long recordingId()
RecordingSignal or Aeron.NULL_VALUE if poll returned nothing.RecordingSignal or Aeron.NULL_VALUE if poll returned nothing.public long subscriptionId()
RecordingSignal or Aeron.NULL_VALUE if poll returned nothing.RecordingSignal or Aeron.NULL_VALUE if poll returned nothing.public long position()
RecordingSignal or Aeron.NULL_VALUE if poll returned nothing.RecordingSignal or Aeron.NULL_VALUE if poll returned nothing.public RecordingSignal recordingSignal()
RecordingSignal or null if poll returned nothing.RecordingSignal or null if poll returned nothing.public int version()
public boolean isPollComplete()
public ControlResponseCode code()
public String errorMessage()
public boolean wasChallenged()
public byte[] encodedChallenge()
Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.