|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.netty.handler.codec.http2.HttpPostRequestDecoder
public class HttpPostRequestDecoder

This decoder will decode Body and can handle POST BODY.
| Nested Class Summary | |
|---|---|
static class |
HttpPostRequestDecoder.EndOfDataDecoderException
Exception when the body is fully decoded, even if there is still data |
static class |
HttpPostRequestDecoder.ErrorDataDecoderException
Exception when an error occurs while decoding |
static class |
HttpPostRequestDecoder.IncompatibleDataDecoderException
Exception when an unappropriated method was called on a request |
static class |
HttpPostRequestDecoder.NotEnoughDataDecoderException
Exception when try reading data from request in chunked format, and not enough data are available (need more chunks) |
| Constructor Summary | |
|---|---|
HttpPostRequestDecoder(HttpDataFactory factory,
HttpRequest request)
|
|
HttpPostRequestDecoder(HttpDataFactory factory,
HttpRequest request,
Charset charset)
|
|
HttpPostRequestDecoder(HttpRequest request)
|
|
| Method Summary | |
|---|---|
void |
cleanFiles()
Clean all HttpDatas (on Disk) for the current request. |
InterfaceHttpData |
getBodyHttpData(String name)
This method returns the first InterfaceHttpData with the given name from body. |
List<InterfaceHttpData> |
getBodyHttpDatas()
This method returns a List of all HttpDatas from body. |
List<InterfaceHttpData> |
getBodyHttpDatas(String name)
This method returns a List of all HttpDatas with the given name from body. |
boolean |
hasNext()
True if at current status, there is an available decoded InterfaceHttpData from the Body. |
boolean |
isMultipart()
True if this request is a Multipart request |
InterfaceHttpData |
next()
Returns the next available InterfaceHttpData or null if, at the time it is called, there is no more available InterfaceHttpData. |
void |
offer(HttpChunk chunk)
Initialized the internals from a new chunk |
void |
removeHttpDataFromClean(InterfaceHttpData data)
Remove the given FileUpload from the list of FileUploads to clean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpPostRequestDecoder(HttpRequest request)
throws HttpPostRequestDecoder.ErrorDataDecoderException,
HttpPostRequestDecoder.IncompatibleDataDecoderException
request - the request to decode
NullPointerException - for request
HttpPostRequestDecoder.IncompatibleDataDecoderException - if the request has no body to decode
HttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errors
public HttpPostRequestDecoder(HttpDataFactory factory,
HttpRequest request)
throws HttpPostRequestDecoder.ErrorDataDecoderException,
HttpPostRequestDecoder.IncompatibleDataDecoderException
factory - the factory used to create InterfaceHttpDatarequest - the request to decode
NullPointerException - for request or factory
HttpPostRequestDecoder.IncompatibleDataDecoderException - if the request has no body to decode
HttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errors
public HttpPostRequestDecoder(HttpDataFactory factory,
HttpRequest request,
Charset charset)
throws HttpPostRequestDecoder.ErrorDataDecoderException,
HttpPostRequestDecoder.IncompatibleDataDecoderException
factory - the factory used to create InterfaceHttpDatarequest - the request to decodecharset - the charset to use as default
NullPointerException - for request or charset or factory
HttpPostRequestDecoder.IncompatibleDataDecoderException - if the request has no body to decode
HttpPostRequestDecoder.ErrorDataDecoderException - if the default charset was wrong when decoding or other errors| Method Detail |
|---|
public boolean isMultipart()
public List<InterfaceHttpData> getBodyHttpDatas()
throws HttpPostRequestDecoder.NotEnoughDataDecoderException
HttpPostRequestDecoder.NotEnoughDataDecoderException - Need more chunks
public List<InterfaceHttpData> getBodyHttpDatas(String name)
throws HttpPostRequestDecoder.NotEnoughDataDecoderException
name -
HttpPostRequestDecoder.NotEnoughDataDecoderException - need more chunks
public InterfaceHttpData getBodyHttpData(String name)
throws HttpPostRequestDecoder.NotEnoughDataDecoderException
name -
HttpPostRequestDecoder.NotEnoughDataDecoderException - need more chunks
public void offer(HttpChunk chunk)
throws HttpPostRequestDecoder.ErrorDataDecoderException
chunk - the new received chunk
HttpPostRequestDecoder.ErrorDataDecoderException - if there is a problem with the charset decoding or
other errors
public boolean hasNext()
throws HttpPostRequestDecoder.EndOfDataDecoderException
HttpPostRequestDecoder.EndOfDataDecoderException - No more data will be available
public InterfaceHttpData next()
throws HttpPostRequestDecoder.EndOfDataDecoderException
HttpPostRequestDecoder.EndOfDataDecoderException - No more data will be availablepublic void cleanFiles()
public void removeHttpDataFromClean(InterfaceHttpData data)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||