Module jtrim.query

Interface ChannelProcessor.StateListener

Enclosing interface:
ChannelProcessor<DataType,ChannelType extends Channel>

public static interface ChannelProcessor.StateListener
The interface through which the ChannelProcessor may set the current state of progress of the processing of the channel.

The processChannel method of the ChannelProcessor may invoke the setState method of this interface to notify the caller that it progressed in processing the channel.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the current state of progress of the processing of the channel.
  • Method Details

    • setState

      void setState(AsyncDataState state)
      Sets the current state of progress of the processing of the channel. Invoking this method overwrites the state value set by previous invocations to this method.

      The state of progress set by this method is intended to be retrievable through the getDataState method of the AsyncDataController for the threads inspecting the progress of the data retrieval process backed by a ChannelProcessor.

      Parameters:
      state - the new state of progress of the processing of the channel. This argument can be null since AsyncDataController supports null states but it is not recommended to specify null for this argument.