org.glassfish.grizzly.http.multipart
Class MultipartReadHandler

java.lang.Object
  extended by org.glassfish.grizzly.http.multipart.MultipartReadHandler
All Implemented Interfaces:
ReadHandler

public class MultipartReadHandler
extends Object
implements 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
MultipartReadHandler(MultipartEntry parentMultipartEntry, MultipartEntryHandler multipartHandler, CompletionHandler<MultipartEntry> completionHandler, MultipartContext multipartContext)
           
MultipartReadHandler(Request request, MultipartEntryHandler multipartHandler, CompletionHandler<Request> completionHandler, MultipartContext multipartContext)
           
 
Method Summary
 void onAllDataRead()
           Invoked when all data for the current request has been read.
 void onDataAvailable()
           Invoked when data is available to be read without blocking.
 void onError(Throwable t)
           Invoked when an error occurs processing the request asynchronously.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

onDataAvailable

public void onDataAvailable()
                     throws Exception
Description copied from interface: ReadHandler

Invoked when data is available to be read without blocking. Data must be consumed by the handler implementation before re-registering.

Specified by:
onDataAvailable in interface ReadHandler
Throws:
Exception

onAllDataRead

public void onAllDataRead()
                   throws Exception
Description copied from interface: ReadHandler

Invoked when all data for the current request has been read.

Specified by:
onAllDataRead in interface ReadHandler
Throws:
Exception

onError

public void onError(Throwable t)
Description copied from interface: ReadHandler

Invoked when an error occurs processing the request asynchronously.

Specified by:
onError in interface ReadHandler


Copyright © 2013 Oracle Corporation. All Rights Reserved.