Class ControlResponseAdapter

java.lang.Object
io.aeron.archive.client.ControlResponseAdapter

public final class ControlResponseAdapter extends Object
Encapsulate the polling, decoding, and dispatching of archive control protocol response messages.
  • Constructor Details

    • ControlResponseAdapter

      public ControlResponseAdapter(ControlResponseListener controlResponseListener, Subscription subscription, int fragmentLimit)
      Create an adapter for a given subscription to an archive for control response messages.
      Parameters:
      controlResponseListener - for dispatching responses.
      subscription - to poll for responses.
      fragmentLimit - to apply for each polling operation.
    • ControlResponseAdapter

      public ControlResponseAdapter(ControlResponseListener controlResponseListener, RecordingSignalConsumer recordingSignalConsumer, Subscription subscription, int fragmentLimit)
      Create an adapter for a given subscription to an archive for control response messages.
      Parameters:
      controlResponseListener - for dispatching responses.
      recordingSignalConsumer - for dispatching recording signals.
      subscription - to poll for responses.
      fragmentLimit - to apply for each polling operation.
  • Method Details

    • poll

      public int poll()
      Poll for recording events and dispatch them to the ControlResponseListener for this instance.
      Returns:
      the number of fragments read during the operation. Zero if no events are available.
    • dispatchDescriptor

      public static void dispatchDescriptor(io.aeron.archive.codecs.RecordingDescriptorDecoder decoder, RecordingDescriptorConsumer consumer)
      Dispatch a descriptor message to a consumer by reading the fields in the correct order.
      Parameters:
      decoder - which wraps the encoded message ready for reading.
      consumer - to which the decoded fields should be passed.