public class FileUploadExecutorManager extends Object
This class is responsible for delegating the file upload requests to the different FileUploadExecutors.
The FileUploadExecutors may be registered in the following manner:
AbstractFileUploadExecutor registered as OSGi services
If a FileUploadExecutor cannot be found in the above 3 collections, as a final resort,
we will finally try to upload the file using an AnyFileUploadExecutor, if it has been
registered in the carbon.xml file. Searching for an FileUploadExecutor in the above 3 types of
items is done using the chain of execution pattern. As soon as a FileUploadExecutor which can
handle the uploaded file type is found, execution of the chain is terminated.
| Constructor and Description |
|---|
FileUploadExecutorManager(org.osgi.framework.BundleContext bundleContext,
org.apache.axis2.context.ConfigurationContext configCtx,
String webContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutor(String action,
String executorClass) |
boolean |
execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
When a FileUpload request is received, this method will be called.
|
void |
removeExecutor(String action) |
public FileUploadExecutorManager(org.osgi.framework.BundleContext bundleContext,
org.apache.axis2.context.ConfigurationContext configCtx,
String webContext)
throws org.wso2.carbon.CarbonException
org.wso2.carbon.CarbonExceptionpublic boolean execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
request - The HTTP Requestresponse - The HTTP ResponseIOException - If an unrecoverable error occurs during file uploadpublic void addExecutor(String action, String executorClass) throws org.wso2.carbon.CarbonException
org.wso2.carbon.CarbonExceptionpublic void removeExecutor(String action)
Copyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.