Interface Request
-
public interface RequestThis interface represents the request of the current user interaction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetBody()Get the body.java.util.List<Cookie>getCookies()Get the cookies.java.lang.StringgetHeader(java.lang.String name)Get the first value of the header with the specified name.java.util.List<java.lang.String>getHeaders(java.lang.String name)Get the value list of the header with the specified name.java.lang.StringgetMethod()Get the method of the request.java.lang.StringgetParameter(java.lang.String name)Get the first value of the parameter with the specified name.java.util.List<java.lang.String>getParameters(java.lang.String name)Get the value list of the parameter with the specified name.java.lang.StringgetUri()Get the URI of the request.
-
-
-
Method Detail
-
getMethod
java.lang.String getMethod()
Get the method of the request. Examples of methods are GET, POST, PUT, and DELETE.- Returns:
- The method.
-
getUri
java.lang.String getUri()
Get the URI of the request.- Returns:
- The URI.
-
getHeader
java.lang.String getHeader(java.lang.String name)
Get the first value of the header with the specified name. If such header does not exist, this method returns NULL.- Parameters:
name- The name.- Returns:
- The first value.
-
getHeaders
java.util.List<java.lang.String> getHeaders(java.lang.String name)
Get the value list of the header with the specified name. If such header does not exist, this method returns an empty value list.- Parameters:
name- The name.- Returns:
- The value list.
-
getCookies
java.util.List<Cookie> getCookies()
Get the cookies. If no cookies exist, this method returns an empty list.- Returns:
- The cookies.
-
getBody
java.io.InputStream getBody()
Get the body.- Returns:
- The body.
-
getParameter
java.lang.String getParameter(java.lang.String name)
Get the first value of the parameter with the specified name. If such parameter does not exist, this method returns NULL.- Parameters:
name- The name.- Returns:
- The first value.
-
getParameters
java.util.List<java.lang.String> getParameters(java.lang.String name)
Get the value list of the parameter with the specified name. If such parameter does not exist, this method returns an empty value list.- Parameters:
name- The name.- Returns:
- The value list.
-
-