Top Description Fields Constructors Methods
org.eclipse.jetty.reactive.client.internal

public abstract Class AbstractBufferingProcessor<T>

extends AbstractSingleProcessor<Content.Chunk, T>
Class Inheritance
Known Direct Subclasses
org.eclipse.jetty.reactive.client.internal.ByteBufferBufferingProcessor, org.eclipse.jetty.reactive.client.internal.StringBufferingProcessor
Type Parameters
<T>
the type of the item resulted from processing the chunks
Imports
java.util.ArrayList, .List, org.eclipse.jetty.io.Content, org.eclipse.jetty.reactive.client.ReactiveResponse

A org.reactivestreams.Processor that buffers Content.Chunks up to a max capacity.

When the complete event is received from upstream, process(List) is invoked to processes the chunks and produce a single item of type T, that is then published to downstream.

Field Summary

Modifier and TypeField and Description
private int
private final List<Content.Chunk>
public static final int
private final int
private final ReactiveResponse

Constructor Summary

AccessConstructor and Description
public
AbstractBufferingProcessor(ReactiveResponse response, int maxCapacity)

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Overrides org.eclipse.jetty.reactive.client.internal.AbstractSingleProcessor.cancel.

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
public ReactiveResponse
public void
public void
public void
onNext(Content.Chunk
the element signaled
chunk
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
protected abstract T
Inherited from org.eclipse.jetty.reactive.client.internal.AbstractSingleProcessor:
downStreamdownStreamOnNextonFailureonRequestonSubscribetoStringupStreamCancelupStreamRequest

Field Detail

capacityback to summary
private int capacity
chunksback to summary
private final List<Content.Chunk> chunks
DEFAULT_MAX_CAPACITYback to summary
public static final int DEFAULT_MAX_CAPACITY
maxCapacityback to summary
private final int maxCapacity
responseback to summary
private final ReactiveResponse response

Constructor Detail

AbstractBufferingProcessorback to summary
public AbstractBufferingProcessor(ReactiveResponse response, int maxCapacity)

Method Detail

cancelback to summary
public void cancel()

Overrides org.eclipse.jetty.reactive.client.internal.AbstractSingleProcessor.cancel.

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
getResponseback to summary
public ReactiveResponse getResponse()
onCompleteback to summary
public void onComplete()

Overrides org.eclipse.jetty.reactive.client.internal.AbstractSingleProcessor.onComplete.

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable throwable)

Overrides org.eclipse.jetty.reactive.client.internal.AbstractSingleProcessor.onError.

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
throwable:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public void onNext(Content.Chunk chunk)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
chunk:Content.Chunk

the element signaled

Annotations
@Override
processback to summary
protected abstract T process(List<Content.Chunk> chunks)