public class DefaultHttpDataFactory extends Object implements HttpDataFactory
| Modifier and Type | Field and Description |
|---|---|
static long |
MAXSIZE
Proposed default MAXSIZE = -1 as UNLIMITED
|
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,
String name) |
Attribute |
createAttribute(HttpRequest request,
String name,
String value) |
FileUpload |
createFileUpload(HttpRequest request,
String name,
String filename,
String contentType,
String contentTransferEncoding,
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)
|
void |
setMaxLimit(long max)
To set a max size limitation on fields.
|
public static final long MINSIZE
public static final long MAXSIZE
public DefaultHttpDataFactory()
public DefaultHttpDataFactory(boolean useDisk)
public DefaultHttpDataFactory(long minSize)
public void setMaxLimit(long max)
HttpDataFactorysetMaxLimit in interface HttpDataFactorypublic Attribute createAttribute(HttpRequest request, String name)
createAttribute in interface HttpDataFactoryrequest - associated requestpublic Attribute createAttribute(HttpRequest request, String name, String value)
createAttribute in interface HttpDataFactoryrequest - associated requestpublic FileUpload createFileUpload(HttpRequest request, String name, String filename, String contentType, String contentTransferEncoding, Charset charset, long size)
createFileUpload in interface HttpDataFactoryrequest - associated requestsize - the size of the Uploaded filepublic void removeHttpDataFromClean(HttpRequest request, InterfaceHttpData data)
HttpDataFactoryremoveHttpDataFromClean in interface HttpDataFactoryrequest - associated requestpublic void cleanRequestHttpDatas(HttpRequest request)
HttpDataFactorycleanRequestHttpDatas in interface HttpDataFactoryrequest - associated requestpublic void cleanAllHttpDatas()
HttpDataFactorycleanAllHttpDatas in interface HttpDataFactoryCopyright © 2008-2016 The Netty Project. All Rights Reserved.