Interface Content.Chunk.Processor

Enclosing interface:
Content.Chunk

public static interface Content.Chunk.Processor

Implementations of this interface may process Content.Chunks being copied by the Content.copy(Source, Sink, Processor, Callback) method, so that Content.Chunks of unknown types can be copied.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    process(Content.Chunk chunk, Callback callback)
     
  • Method Details

    • process

      boolean process(Content.Chunk chunk, Callback callback)
      Parameters:
      chunk - The chunk to be considered for processing, including persistent and transient failures.
      callback - The callback that will be called once the accepted chunk is processed. Succeeding this callback will allow the processing of subsequent chunks. Failing this callback will fail the processing of all chunks.
      Returns:
      true if the chunk will be processed asynchronously and the callback will be called (or may have already been called), false otherwise, in which case subsequent chunks may be processed and the passed callback ignored.