Interface HttpContentProcessor
- All Superinterfaces:
Toggleable
@Deprecated(forRemoval=true,
since="4.0.0")
public interface HttpContentProcessor
extends Toggleable
Deprecated, for removal: This API element is subject to removal in a future version.
This class represents the first step of the HTTP body parsing pipeline. It transforms
Processors are stateful. They can receive repeated calls to
ByteBufHolder instances that come from a
StreamedHttpRequest into parsed objects, e.g. json nodes
or form data fragments.Processors are stateful. They can receive repeated calls to
add(ByteBufHolder, Collection) with more data,
followed by a call to complete(Collection) to finish up. Both of these methods accept a
Collection out parameter that is populated with the processed items.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(io.netty.buffer.ByteBufHolder data, Collection<Object> out) Deprecated, for removal: This API element is subject to removal in a future version.Process more data.default voidcancel()Deprecated, for removal: This API element is subject to removal in a future version.Cancel processing, clean up any data.default voidcomplete(Collection<Object> out) Deprecated, for removal: This API element is subject to removal in a future version.Finish processing data.default @Nullable ObjectprocessSingle(io.netty.buffer.ByteBuf data) Deprecated, for removal: This API element is subject to removal in a future version.Process a singleByteBufinto a single item, if possible.default HttpContentProcessorresultType(Argument<?> type) Deprecated, for removal: This API element is subject to removal in a future version.Set the type of the values returned by this processor.Methods inherited from interface Toggleable
isEnabled
-
Method Details
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Process more data.- Parameters:
data- The input dataout- The collection to add output items to- Throws:
Throwable
-
complete
Deprecated, for removal: This API element is subject to removal in a future version.Finish processing data.- Parameters:
out- The collection to add remaining output items to- Throws:
Throwable
-
cancel
Deprecated, for removal: This API element is subject to removal in a future version.Cancel processing, clean up any data. After this, there should be no more calls toadd(ByteBufHolder, Collection)andcomplete(Collection).- Throws:
Throwable
-
resultType
Deprecated, for removal: This API element is subject to removal in a future version.Set the type of the values returned by this processor. Most processors do not respect this setting.- Parameters:
type- The type produced by this processor- Returns:
- This processor, for chaining
-
processSingle
Deprecated, for removal: This API element is subject to removal in a future version.Process a singleByteBufinto a single item, if possible.- Parameters:
data- The input data- Returns:
- The output value, or
nullif this is unsupported. - Throws:
Throwable- Any failure
-
MessageBodyReaderAPI instead. This interface has not been used or implemented by the server since 4.0.0, and, as with any API marked for removal, it will be removed in a future major release rather than in a 5.x minor.