public class ControlResponseAdapter extends Object implements FragmentHandler
| Constructor and Description |
|---|
ControlResponseAdapter(ControlResponseListener listener,
Subscription subscription,
int fragmentLimit)
Create an adapter for a given subscription to an archive for control response messages.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
dispatchDescriptor(RecordingDescriptorDecoder decoder,
RecordingDescriptorConsumer consumer)
Dispatch a descriptor message to a consumer by reading the fields in the correct order.
|
void |
onFragment(DirectBuffer buffer,
int offset,
int length,
Header header)
Callback for handling fragments of data being read from a log.
|
int |
poll()
Poll for recording events and dispatch them to the
ControlResponseListener for this instance. |
public ControlResponseAdapter(ControlResponseListener listener, Subscription subscription, int fragmentLimit)
listener - to which responses are dispatched.subscription - to poll for new events.fragmentLimit - to apply for each polling operation.public int poll()
ControlResponseListener for this instance.public static void dispatchDescriptor(RecordingDescriptorDecoder decoder, RecordingDescriptorConsumer consumer)
decoder - which wraps the encoded message ready for reading.consumer - to which the decoded fields should be passed.public void onFragment(DirectBuffer buffer, int offset, int length, Header header)
FragmentHandler
Within this callback reentrant calls to the Aeron client are not permitted and
will result in undefined behaviour.
onFragment in interface FragmentHandlerbuffer - containing the data.offset - at which the data begins.length - of the data in bytes.header - representing the meta data for the data.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.