java.lang.Object
java.util.concurrent.CompletableFuture<org.eclipse.jetty.util.Fields>
org.eclipse.jetty.io.content.ContentSourceCompletableFuture<org.eclipse.jetty.util.Fields>
org.eclipse.jetty.server.FormFields
- All Implemented Interfaces:
CompletionStage<org.eclipse.jetty.util.Fields>,Future<org.eclipse.jetty.util.Fields>
public class FormFields
extends org.eclipse.jetty.io.content.ContentSourceCompletableFuture<org.eclipse.jetty.util.Fields>
A
CompletableFuture that is completed once a application/x-www-form-urlencoded
content has been parsed asynchronously from the Content.Source.-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<org.eclipse.jetty.util.Fields> Find or create aFormFieldsfrom aContent.Source.static CompletableFuture<org.eclipse.jetty.util.Fields> Find or create aFormFieldsfrom aContent.Source.static CompletableFuture<org.eclipse.jetty.util.Fields> Find or create aFormFieldsfrom aContent.Source.static CompletableFuture<org.eclipse.jetty.util.Fields> Find or create aFormFieldsfrom aContent.Source.static CompletableFuture<org.eclipse.jetty.util.Fields> static CharsetgetFormEncodedCharset(Request request) protected org.eclipse.jetty.util.Fieldsparse(org.eclipse.jetty.io.Content.Chunk chunk) static voidset(Request request, CompletableFuture<org.eclipse.jetty.util.Fields> fields) Set aFieldsor related failure for the requestMethods inherited from class org.eclipse.jetty.io.content.ContentSourceCompletableFuture
onTransientFailure, parseMethods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, state, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
Field Details
-
MAX_FIELDS_ATTRIBUTE
- See Also:
-
MAX_LENGTH_ATTRIBUTE
- See Also:
-
-
Method Details
-
getFormEncodedCharset
-
set
Set aFieldsor related failure for the request- Parameters:
request- The request to which to associate the fields withfields- ACompletableFuturethat will provide either the fields or a failure.
-
get
- Parameters:
request- The request to enquire from- Returns:
- A
CompletableFuturethat will provide either the fields or a failure, or null if none set. - See Also:
-
from
Find or create aFormFieldsfrom aContent.Source.- Parameters:
request- TheRequestin which to look for an existingFormFieldsattribute, using the classname as the attribute name, else the request is used as aContent.Sourcefrom which to read the fields and set the attribute.- Returns:
- A
CompletableFuturethat will provide theFieldsor a failure. - See Also:
-
from
public static CompletableFuture<org.eclipse.jetty.util.Fields> from(Request request, Charset charset) Find or create aFormFieldsfrom aContent.Source.- Parameters:
request- TheRequestin which to look for an existingFormFieldsattribute, using the classname as the attribute name, else the request is used as aContent.Sourcefrom which to read the fields and set the attribute.charset- theCharsetto use for byte to string conversion.- Returns:
- A
CompletableFuturethat will provide theFieldsor a failure. - See Also:
-
from
public static CompletableFuture<org.eclipse.jetty.util.Fields> from(Request request, int maxFields, int maxLength) Find or create aFormFieldsfrom aContent.Source.- Parameters:
request- TheRequestin which to look for an existingFormFieldsattribute, using the classname as the attribute name, else the request is used as aContent.Sourcefrom which to read the fields and set the attribute.maxFields- The maximum number of fields to be parsedmaxLength- The maximum total size of the fields- Returns:
- A
CompletableFuturethat will provide theFieldsor a failure. - See Also:
-
from
public static CompletableFuture<org.eclipse.jetty.util.Fields> from(Request request, Charset charset, int maxFields, int maxLength) Find or create aFormFieldsfrom aContent.Source.- Parameters:
request- TheRequestin which to look for an existingFormFieldsattribute, using the classname as the attribute name, else the request is used as aContent.Sourcefrom which to read the fields and set the attribute.charset- theCharsetto use for byte to string conversion.maxFields- The maximum number of fields to be parsedmaxLength- The maximum total size of the fields- Returns:
- A
CompletableFuturethat will provide theFieldsor a failure. - See Also:
-
parse
protected org.eclipse.jetty.util.Fields parse(org.eclipse.jetty.io.Content.Chunk chunk) throws CharacterCodingException - Specified by:
parsein classorg.eclipse.jetty.io.content.ContentSourceCompletableFuture<org.eclipse.jetty.util.Fields>- Throws:
CharacterCodingException
-