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
- TheMultiPartConfig
to use for eagerly loading content; ornull
to look for aMultiPartConfig
as aContext
orServer
attribute
, using the class name as the attribute name.
-
-
Method Details
-
getApplicableMimeType
- Specified by:
getApplicableMimeType
in interfaceEagerContentHandler.ContentLoaderFactory
- Returns:
- The mimetype for which this factory is applicable to; or
null
if applicable to all types.
-
newContentLoader
public EagerContentHandler.ContentLoader newContentLoader(String contentType, String mimeType, Handler handler, Request request, Response response, Callback callback) - Specified by:
newContentLoader
in 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.ContentLoader
instance if the content can be loaded eagerly, elsenull
.
-