Rename HttpDataFactory.*datas to *data. Fixes #2094
This commit is contained in:
parent
6a954d5b47
commit
75cb91ed0c
@ -34,6 +34,7 @@ import java.util.concurrent.ConcurrentMap;
|
||||
* according to the constructor.
|
||||
*/
|
||||
public class DefaultHttpDataFactory implements HttpDataFactory {
|
||||
|
||||
/**
|
||||
* Proposed default MINSIZE as 16 KB.
|
||||
*/
|
||||
@ -54,7 +55,7 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
|
||||
private Charset charset = HttpConstants.DEFAULT_CHARSET;
|
||||
|
||||
/**
|
||||
* Keep all HttpDatas until cleanAllHttpDatas() is called.
|
||||
* Keep all HttpDatas until cleanAllHttpData() is called.
|
||||
*/
|
||||
private final ConcurrentMap<HttpRequest, List<HttpData>> requestFileDeleteMap =
|
||||
PlatformDependent.newConcurrentHashMap();
|
||||
@ -223,7 +224,7 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanRequestHttpDatas(HttpRequest request) {
|
||||
public void cleanRequestHttpData(HttpRequest request) {
|
||||
List<HttpData> fileToDelete = requestFileDeleteMap.remove(request);
|
||||
if (fileToDelete != null) {
|
||||
for (HttpData data: fileToDelete) {
|
||||
@ -234,7 +235,7 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanAllHttpDatas() {
|
||||
public void cleanAllHttpData() {
|
||||
for (HttpRequest request : requestFileDeleteMap.keySet()) {
|
||||
List<HttpData> fileToDelete = requestFileDeleteMap.get(request);
|
||||
if (fileToDelete != null) {
|
||||
|
@ -23,6 +23,7 @@ import java.nio.charset.Charset;
|
||||
* Interface to enable creation of InterfaceHttpData objects
|
||||
*/
|
||||
public interface HttpDataFactory {
|
||||
|
||||
/**
|
||||
* To set a max size limitation on fields. Exceeding it will generate an ErrorDataDecoderException.
|
||||
* A value of -1 means no limitation (default).
|
||||
@ -31,10 +32,10 @@ public interface HttpDataFactory {
|
||||
void setMaxLimit(long max);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param request associated request
|
||||
* @return a new Attribute with no value
|
||||
*/
|
||||
*
|
||||
* @param request associated request
|
||||
* @return a new Attribute with no value
|
||||
*/
|
||||
Attribute createAttribute(HttpRequest request, String name);
|
||||
|
||||
/**
|
||||
@ -64,10 +65,10 @@ public interface HttpDataFactory {
|
||||
*
|
||||
* @param request associated request
|
||||
*/
|
||||
void cleanRequestHttpDatas(HttpRequest request);
|
||||
void cleanRequestHttpData(HttpRequest request);
|
||||
|
||||
/**
|
||||
* Remove all InterfaceHttpData from virtual File storage from clean list for all requests
|
||||
*/
|
||||
void cleanAllHttpDatas();
|
||||
void cleanAllHttpData();
|
||||
}
|
||||
|
@ -914,7 +914,7 @@ public class HttpPostMultipartRequestDecoder implements InterfaceHttpPostRequest
|
||||
public void cleanFiles() {
|
||||
checkDestroyed();
|
||||
|
||||
factory.cleanRequestHttpDatas(request);
|
||||
factory.cleanRequestHttpData(request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -212,7 +212,7 @@ public class HttpPostRequestEncoder implements ChunkedInput<HttpContent> {
|
||||
* Clean all HttpDatas (on Disk) for the current request.
|
||||
*/
|
||||
public void cleanFiles() {
|
||||
factory.cleanRequestHttpDatas(request);
|
||||
factory.cleanRequestHttpData(request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -718,7 +718,7 @@ public class HttpPostStandardRequestDecoder implements InterfaceHttpPostRequestD
|
||||
public void cleanFiles() {
|
||||
checkDestroyed();
|
||||
|
||||
factory.cleanRequestHttpDatas(request);
|
||||
factory.cleanRequestHttpData(request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,14 +130,14 @@ public class HttpUploadClient {
|
||||
// Simple Get form: no factory used (not usable)
|
||||
List<Entry<String, String>> headers = formGet(b, host, port, get, uriSimple);
|
||||
if (headers == null) {
|
||||
factory.cleanAllHttpDatas();
|
||||
factory.cleanAllHttpData();
|
||||
return;
|
||||
}
|
||||
|
||||
// Simple Post form: factory used for big attributes
|
||||
List<InterfaceHttpData> bodylist = formPost(b, host, port, uriSimple, file, factory, headers);
|
||||
if (bodylist == null) {
|
||||
factory.cleanAllHttpDatas();
|
||||
factory.cleanAllHttpData();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ public class HttpUploadClient {
|
||||
group.shutdownGracefully();
|
||||
|
||||
// Really clean all temporary files if they still exist
|
||||
factory.cleanAllHttpDatas();
|
||||
factory.cleanAllHttpData();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user