Interface IInterceptorRequest
- All Known Implementing Classes:
ServerServicesInterceptorRequestWrapper
public interface IInterceptorRequest
-
Method Summary
Modifier and TypeMethodDescriptionMethod to fetch character encodingint
Method to get length of the content in the requestlong
Method to get length of the content in the requestMethod to fetch content-type of the requestReturns the value of the specified request header as a StringgetHeaders
(String name) Returns all the values of the specified request header as an Enumeration of String objects.jakarta.servlet.ServletInputStream
Retrieves the body of the request as binary data using a ServletInputStream.Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.getParameter
(String name) Returns the value of a request parameter as a String, or null if the parameter does not existReturns a java.util.Map of the parameters of this request.Returns an Enumeration of String objects containing the names of the parameters contained in this request.String[]
getParameterValues
(String name) Returns an array of String objects containing all the values the given request parameter has, or null if the parameter does not exist.jakarta.servlet.http.Part
Gets the Part with the given name.Collection<jakarta.servlet.http.Part>
getParts()
Gets all the Part components of this requestRetrieves the body of the request as binary data using a BufferedReader.Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request
-
Method Details
-
getHeader
Returns the value of the specified request header as a String- Parameters:
name
- - a String specifying the header name- Returns:
- a String containing the value of the requested header, or null if the request does not have a header of that name
-
getHeaders
Returns all the values of the specified request header as an Enumeration of String objects.- Parameters:
name
- - a String specifying the header name- Returns:
- an Enumeration containing the values of the requested header. If the request does not have any headers of that name return an empty enumeration
-
getMethod
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.- Returns:
- a String specifying the name of the method with which this request was made
-
getParts
Collection<jakarta.servlet.http.Part> getParts() throws IOException, jakarta.servlet.ServletExceptionGets all the Part components of this request- Returns:
- Collection of the Part components of this request
- Throws:
IOException
- if an I/O error occurred during the retrieval of the Part components of this requestjakarta.servlet.ServletException
- if this request is not of type multipart/form-data
-
getPart
Gets the Part with the given name.- Parameters:
name
- - the name of the requested Part- Returns:
- The Part with the given name
- Throws:
IOException
- if an I/O error occurred during the retrieval of the requested Partjakarta.servlet.ServletException
- if this request is not of type multipart/form-data
-
getRequestURI
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request- Returns:
- a String containing the part of the URL from the protocol name up to the query string
-
getInputStream
Retrieves the body of the request as binary data using a ServletInputStream.- Returns:
- a ServletInputStream object containing the body of the request
- Throws:
IOException
-
getReader
Retrieves the body of the request as binary data using a BufferedReader.- Returns:
- a BufferedReader object containing the body of the request
- Throws:
IOException
-
getParameterMap
Map<String,String[]> getParameterMap()Returns a java.util.Map of the parameters of this request.- Returns:
- an immutable java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
-
getParameter
Returns the value of a request parameter as a String, or null if the parameter does not exist- Parameters:
name
- - a String specifying the name of the parameter- Returns:
- a String representing the single value of the parameter
-
getParameterValues
Returns an array of String objects containing all the values the given request parameter has, or null if the parameter does not exist.- Parameters:
name
- - a String containing the name of the parameter whose value is requested- Returns:
- an array of String objects containing the parameter's values
-
getParameterNames
Returns an Enumeration of String objects containing the names of the parameters contained in this request. If the request has no parameters, the method returns an empty Enumeration.- Returns:
- an Enumeration of String objects, each String containing the name of a request parameter; or an empty Enumeration if the request has no parameters
-
getCharacterEncoding
Method to fetch character encoding- Returns:
- A String that indicates the character encoding
-
getContentLength
int getContentLength()Method to get length of the content in the request- Returns:
- An int value of the length of request contents
-
getContentLengthLong
long getContentLengthLong()Method to get length of the content in the request- Returns:
- Long value of the length of request contents
-
getContentType
Method to fetch content-type of the request- Returns:
- String that indicates the type of the request contents
-