Class EagerContentHandler.MultiPartContentLoaderFactory
java.lang.Object
org.eclipse.jetty.server.handler.EagerContentHandler.MultiPartContentLoaderFactory
- All Implemented Interfaces:
EagerContentHandler.ContentLoaderFactory
- Enclosing class:
EagerContentHandler
public static class EagerContentHandler.MultiPartContentLoaderFactory
extends Object
implements EagerContentHandler.ContentLoaderFactory
An
EagerContentHandler.ContentLoaderFactory for MimeTypes.Type.MULTIPART_FORM_DATA content, that uses
MultiPartFormData.onParts(Content.Source, Attributes, String, MultiPartConfig, Promise.Invocable)
to asynchronously load and parse the content.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MultiPartContentLoaderFactory
public MultiPartContentLoaderFactory() -
MultiPartContentLoaderFactory
- Parameters:
multiPartConfig- TheMultiPartConfigto use for eagerly loading content; ornullto look for aMultiPartConfigas aContextorServerattribute, using the class name as the attribute name.
-
-
Method Details
-
getApplicableMimeType
- Specified by:
getApplicableMimeTypein interfaceEagerContentHandler.ContentLoaderFactory- Returns:
- The mimetype for which this factory is applicable to; or
nullif applicable to all types.
-
newContentLoader
public EagerContentHandler.ContentLoader newContentLoader(String contentType, String mimeType, Handler handler, Request request, Response response, Callback callback) - Specified by:
newContentLoaderin interfaceEagerContentHandler.ContentLoaderFactory- Parameters:
contentType- The content type of the requestmimeType- The mime type extracted from the requesthandler- The next handler to callrequest- The requestresponse- The responsecallback- The callback- Returns:
- An
EagerContentHandler.ContentLoaderinstance if the content can be loaded eagerly, elsenull.
-