public class UploadHandler
extends org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandler.ErrorDispatchHandlerorg.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerorg.eclipse.jetty.util.component.LifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
private static CentralLogger |
LOG
Logger
|
private java.util.function.Supplier<javax.servlet.MultipartConfigElement> |
multipartConfigSupplier
The multipart POST payload configuration supplier
|
private FileUploadStorage |
storage
The storage of active uploads.
|
private static java.util.regex.Pattern |
TARGET_REGEXP
The regular expression that is matched against the request path.
|
| Constructor and Description |
|---|
UploadHandler(FileUploadStorage storage,
java.util.function.Supplier<javax.servlet.MultipartConfigElement> multipartConfig)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handle(java.lang.String s,
org.eclipse.jetty.server.Request request,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
The main logic of the handler.
|
destroy, doError, doStart, doStop, getServer, setServeraddBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stopprivate static final CentralLogger LOG
private static final java.util.regex.Pattern TARGET_REGEXP
private final FileUploadStorage storage
private final java.util.function.Supplier<javax.servlet.MultipartConfigElement> multipartConfigSupplier
public UploadHandler(FileUploadStorage storage, java.util.function.Supplier<javax.servlet.MultipartConfigElement> multipartConfig)
storage - The storage of active file uploads.multipartConfig - The multipart POST payload configurationpublic void handle(java.lang.String s,
org.eclipse.jetty.server.Request request,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws java.io.IOException,
javax.servlet.ServletException
handle in interface org.eclipse.jetty.server.Handlerhandle in class org.eclipse.jetty.server.handler.AbstractHandlers - The target path.request - The request.httpServletRequest - The original request.httpServletResponse - The response.java.io.IOException - when an IO error occursjavax.servlet.ServletException - when a servlet error occurs