public static class HTMLContext.HTTPReply
extends java.lang.Object
HTTPReply wraps the data sent as GET or POST to the web
server. It supports simple strings, attachments (that is binary data and/or
uploaded files) as well as lists of both types. Attachments may only be
provided by multipart form-content while normal POST (or GET) may contain
URL-encoded form data. HTMLContext. If a parameter (or form element name) occurs
several times and therefore has several values, they will be provided via the
appropriate list-methods of this HTTPReply. Simple parameters
occurring only once are provided via the simple maps.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.util.List<HTMLContext.Attachment>> |
attachmentLists
Field for
getAttachmentLists(). |
protected java.util.Map<java.lang.String,HTMLContext.Attachment> |
attachments
Field for
getAttachments(). |
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
parameterLists
Field for
getParameterLists(). |
protected java.util.Map<java.lang.String,java.lang.String> |
parameters
Field for
getParameters(). |
| Constructor and Description |
|---|
HTTPReply(java.util.Map<java.lang.String,java.lang.String> parameters,
java.util.Map<java.lang.String,HTMLContext.Attachment> attachments,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameterLists,
java.util.Map<java.lang.String,java.util.List<HTMLContext.Attachment>> attachmentLists)
Creates a new
HTTPReply with the designated attributes. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.util.List<HTMLContext.Attachment>> |
getAttachmentLists()
Gets the parameters (mapping from parameter name to several attachments)
that are binary data and/or files and occur several times in the
HTTP-reply.
|
java.util.Map<java.lang.String,HTMLContext.Attachment> |
getAttachments()
Gets the parameters (mapping from parameter name to attachment) that are
binary data and/or files and occur only once in the HTTP-reply.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getParameterLists()
Gets the parameters (mapping from parameter name to several values) that
occur several times in the HTTP-reply and therefore have several values.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Gets the parameters (mapping from parameter name to value) that occur only
once in the HTTP-reply and therefore have only one value.
|
protected final java.util.Map<java.lang.String,java.util.List<HTMLContext.Attachment>> attachmentLists
getAttachmentLists().protected final java.util.Map<java.lang.String,HTMLContext.Attachment> attachments
getAttachments().protected final java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameterLists
getParameterLists().protected final java.util.Map<java.lang.String,java.lang.String> parameters
getParameters().public HTTPReply(java.util.Map<java.lang.String,java.lang.String> parameters,
java.util.Map<java.lang.String,HTMLContext.Attachment> attachments,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameterLists,
java.util.Map<java.lang.String,java.util.List<HTMLContext.Attachment>> attachmentLists)
HTTPReply with the designated attributes. All
maps are stored unmodifiable including the lists in the map. Do not modify
the maps or lists after calling this constructor. This may cause unwanted
side-effects since neither the maps nor the lists are copied.parameters - The map containing all simple parameters having only one
value. This must not be null.attachments - The map containing all attachment parameters (uploaded
files) having only one value/attachment. This must not be null!parameterLists - The map containing all simple parameters having
several value. This must not be null.attachmentLists - The map containing all attachment parameters
(uploaded files) having several values/attachments. This must not
be null!public java.util.Map<java.lang.String,java.lang.String> getParameters()
public java.util.Map<java.lang.String,HTMLContext.Attachment> getAttachments()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getParameterLists()
public java.util.Map<java.lang.String,java.util.List<HTMLContext.Attachment>> getAttachmentLists()