public class UploadHandler
extends org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandler.ErrorDispatchHandler
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
Modifier and Type | Field and Description |
---|---|
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, setServer
addBean, 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, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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.Handler
handle
in class org.eclipse.jetty.server.handler.AbstractHandler
s
- 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