public class DefaultHttpDataFactory extends java.lang.Object implements HttpDataFactory
Modifier and Type | Field and Description |
---|---|
static long |
MINSIZE
Proposed default MINSIZE as 16 KB.
|
Constructor and Description |
---|
DefaultHttpDataFactory()
HttpData will be in memory if less than default size (16KB).
|
DefaultHttpDataFactory(boolean useDisk)
HttpData will be always on Disk if useDisk is True, else always in Memory if False
|
DefaultHttpDataFactory(long minSize)
HttpData will be on Disk if the size of the file is greater than minSize, else it
will be in memory.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanAllHttpDatas()
Remove all InterfaceHttpData from virtual File storage from clean list for all requests
|
void |
cleanRequestHttpDatas(HttpRequest request)
Remove all InterfaceHttpData from virtual File storage from clean list for the request
|
Attribute |
createAttribute(HttpRequest request,
java.lang.String name) |
Attribute |
createAttribute(HttpRequest request,
java.lang.String name,
java.lang.String value) |
FileUpload |
createFileUpload(HttpRequest request,
java.lang.String name,
java.lang.String filename,
java.lang.String contentType,
java.lang.String contentTransferEncoding,
java.nio.charset.Charset charset,
long size) |
void |
removeHttpDataFromClean(HttpRequest request,
InterfaceHttpData data)
Remove the given InterfaceHttpData from clean list (will not delete the file, except if the file
is still a temporary one as setup at construction)
|
public static final long MINSIZE
public DefaultHttpDataFactory()
public DefaultHttpDataFactory(boolean useDisk)
public DefaultHttpDataFactory(long minSize)
public Attribute createAttribute(HttpRequest request, java.lang.String name)
createAttribute
in interface HttpDataFactory
request
- associated requestpublic Attribute createAttribute(HttpRequest request, java.lang.String name, java.lang.String value)
createAttribute
in interface HttpDataFactory
request
- associated requestpublic FileUpload createFileUpload(HttpRequest request, java.lang.String name, java.lang.String filename, java.lang.String contentType, java.lang.String contentTransferEncoding, java.nio.charset.Charset charset, long size)
createFileUpload
in interface HttpDataFactory
request
- associated requestsize
- the size of the Uploaded filepublic void removeHttpDataFromClean(HttpRequest request, InterfaceHttpData data)
HttpDataFactory
removeHttpDataFromClean
in interface HttpDataFactory
request
- associated requestpublic void cleanRequestHttpDatas(HttpRequest request)
HttpDataFactory
cleanRequestHttpDatas
in interface HttpDataFactory
request
- associated requestpublic void cleanAllHttpDatas()
HttpDataFactory
cleanAllHttpDatas
in interface HttpDataFactory
Copyright © 2008–2018 The Netty Project. All rights reserved.