Class MultipartReadHandler
java.lang.Object
org.glassfish.grizzly.http.multipart.MultipartReadHandler
- All Implemented Interfaces:
ReadHandler
ReadHandler, which implements the miltipart message parsing logic and delegates control to a
MultipartEntryHandler, when MultipartEntry data becomes available.- Since:
- 2.0.1
- Author:
- Alexey Stashok
-
Constructor Summary
ConstructorsConstructorDescriptionMultipartReadHandler(MultipartEntry parentMultipartEntry, MultipartEntryHandler multipartHandler, CompletionHandler<MultipartEntry> completionHandler, MultipartContext multipartContext) MultipartReadHandler(Request request, MultipartEntryHandler multipartHandler, CompletionHandler<Request> completionHandler, MultipartContext multipartContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when all data for the current request has been read.voidInvoked when data is available to be read without blocking.voidInvoked when an error occurs processing the request asynchronously.
-
Constructor Details
-
MultipartReadHandler
public MultipartReadHandler(Request request, MultipartEntryHandler multipartHandler, CompletionHandler<Request> completionHandler, MultipartContext multipartContext) -
MultipartReadHandler
public MultipartReadHandler(MultipartEntry parentMultipartEntry, MultipartEntryHandler multipartHandler, CompletionHandler<MultipartEntry> completionHandler, MultipartContext multipartContext)
-
-
Method Details
-
onDataAvailable
Description copied from interface:ReadHandlerInvoked when data is available to be read without blocking. Data must be consumed by the handler implementation before re-registering.
- Specified by:
onDataAvailablein interfaceReadHandler- Throws:
Exception-Exceptionmight be thrown by the custom handler code. This exception will be delegated for processing toReadHandler.onError(java.lang.Throwable).
-
onAllDataRead
Description copied from interface:ReadHandlerInvoked when all data for the current request has been read.
- Specified by:
onAllDataReadin interfaceReadHandler- Throws:
Exception-Exceptionmight be thrown by the custom handler code. This exception will be delegated for processing toReadHandler.onError(java.lang.Throwable).
-
onError
Description copied from interface:ReadHandlerInvoked when an error occurs processing the request asynchronously.
- Specified by:
onErrorin interfaceReadHandler- Parameters:
t- the error
-