Package de.xima.fc.mdl.request
Class HeaderParameters
- java.lang.Object
-
- de.xima.fc.mdl.request.HeaderParameters
-
- All Implemented Interfaces:
Serializable
public class HeaderParameters extends Object implements Serializable
Represents the parameters of form HTTP request as key-value pairs. They are grouped according to their type. For each key, there may exists multiple values. This class also provides some utility methods such as to get the first value for a certain key.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HeaderParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHeader(String headerName)
Map<String,List<String>>
getHeaderMap()
List<String>
getHeaders(String headerName)
boolean
isHasHeader(String headerName)
void
setHeaderMap(Map<String,List<String>> headerMap)
-
-
-
Method Detail
-
getHeader
public String getHeader(String headerName)
- Parameters:
headerName
- The key of a header to retrieve.- Returns:
- The first header value for the given name. When no value exists for the given key, returns the empty string.
-
getHeaderMap
public Map<String,List<String>> getHeaderMap()
- Returns:
- A map with all available header parameters.
-
getHeaders
public List<String> getHeaders(String headerName)
- Parameters:
headerName
- The key of a header to retrieve.- Returns:
- All header values for the given name. When no value exists for the given key, returns an empty list.
-
isHasHeader
public boolean isHasHeader(String headerName)
- Parameters:
headerName
- The key of a header to retrieve.- Returns:
- Whether a header with the given name exists.
-
-