Interface InterfaceHttpPostRequestDecoder
-
- All Known Implementing Classes:
HttpPostMultipartRequestDecoder
,HttpPostRequestDecoder
,HttpPostStandardRequestDecoder
public interface InterfaceHttpPostRequestDecoder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
If chunked, all chunks must have been offered using offer() method.List<InterfaceHttpData>
getBodyHttpDatas()
This method returns a List of all HttpDatas from body.
If chunked, all chunks must have been offered using offer() method.List<InterfaceHttpData>
getBodyHttpDatas(String name)
This method returns a List of all HttpDatas with the given name from body.
If chunked, all chunks must have been offered using offer() method.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 requestInterfaceHttpData
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 chunkvoid
removeHttpDataFromClean(InterfaceHttpData data)
Remove the given FileUpload from the list of FileUploads to clean
-
-
-
Method Detail
-
isMultipart
boolean isMultipart()
True if this request is a Multipart request- Returns:
- True if this request is a Multipart request
-
getBodyHttpDatas
List<InterfaceHttpData> getBodyHttpDatas() throws HttpPostRequestDecoder.NotEnoughDataDecoderException
This method returns a List of all HttpDatas from body.
If chunked, all chunks must have been offered using offer() method. If not, NotEnoughDataDecoderException will be raised.- Returns:
- the list of HttpDatas from Body part for POST method
- Throws:
HttpPostRequestDecoder.NotEnoughDataDecoderException
- Need more chunks
-
getBodyHttpDatas
List<InterfaceHttpData> getBodyHttpDatas(String name) throws HttpPostRequestDecoder.NotEnoughDataDecoderException
This method returns a List of all HttpDatas with the given name from body.
If chunked, all chunks must have been offered using offer() method. If not, NotEnoughDataDecoderException will be raised.- Returns:
- All Body HttpDatas with the given name (ignore case)
- Throws:
HttpPostRequestDecoder.NotEnoughDataDecoderException
- need more chunks
-
getBodyHttpData
InterfaceHttpData getBodyHttpData(String name) throws HttpPostRequestDecoder.NotEnoughDataDecoderException
This method returns the first InterfaceHttpData with the given name from body.
If chunked, all chunks must have been offered using offer() method. If not, NotEnoughDataDecoderException will be raised.- Returns:
- The first Body InterfaceHttpData with the given name (ignore case)
- Throws:
HttpPostRequestDecoder.NotEnoughDataDecoderException
- need more chunks
-
offer
void offer(HttpChunk chunk) throws HttpPostRequestDecoder.ErrorDataDecoderException
Initialized the internals from a new chunk- Parameters:
chunk
- the new received chunk- Throws:
HttpPostRequestDecoder.ErrorDataDecoderException
- if there is a problem with the charset decoding or other errors
-
hasNext
boolean hasNext() throws HttpPostRequestDecoder.EndOfDataDecoderException
True if at current status, there is an available decoded InterfaceHttpData from the Body. This method works for chunked and not chunked request.- Returns:
- True if at current status, there is a decoded InterfaceHttpData
- Throws:
HttpPostRequestDecoder.EndOfDataDecoderException
- No more data will be available
-
next
InterfaceHttpData next() throws HttpPostRequestDecoder.EndOfDataDecoderException
Returns the next available InterfaceHttpData or null if, at the time it is called, there is no more available InterfaceHttpData. A subsequent call to offer(httpChunk) could enable more data.- Returns:
- the next available InterfaceHttpData or null if none
- Throws:
HttpPostRequestDecoder.EndOfDataDecoderException
- No more data will be available
-
cleanFiles
void cleanFiles()
Clean all HttpDatas (on Disk) for the current request.
-
removeHttpDataFromClean
void removeHttpDataFromClean(InterfaceHttpData data)
Remove the given FileUpload from the list of FileUploads to clean
-
-