Package com.wowza.wms.http
Interface IHTTPRequest
- 
 public interface IHTTPRequest
- 
- 
Field SummaryFields Modifier and Type Field Description static StringHTTP_HEADER_X_FORWARDED_FORstatic StringHTTP_HEADER_X_REAL_IPstatic StringPROPERTY_X_FORWARDED_LIST
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetContentLength()Get the content length of the body of the messageStringgetContentType()Get the request content typeStringgetForwardedIP(String excludeAddresses)Get X-[real-forwarded] addressStringgetHeader(String name)Get a HTTP header value such as 'Content-Length'byte[]getHeaderBytes()Returns the header as bytesjava.util.Map<String,String>getHeaderMap()Get a copy of the HTTP request header mapjava.util.Set<String>getHeaderNames()Get a Set of the header namesStringgetHost()Returns the domain name and possibly the port of the server for which the HTTP Request is being sent to, for both HTTP 1.1 and HTTP 2.0java.io.InputStreamgetInputStream()Get the body of the message as an input streamintgetIntHeader(String name)Get a HTTP header value such as 'Content-Length' and return as intjava.util.LocalegetLocale()Get locale of request (Example: en-us)StringgetMethod()Get the method invokation method: GET, POST, HEADbyte[]getMsgBytes()Return the message bytesStringgetParameter(String name)Get a parameter valuejava.util.Map<String,java.util.List<String>>getParameterMap()Get the entire parameter Mapjava.util.Set<String>getParameterNames()Get a Set of parameter namesString[]getParameterValues(String name)Get a multi-value parameter as an array of StringStringgetPath()Returns the HTTP path element of the requestStringgetProtocol()Get the request protocol (example: HTTP/1.1)StringgetQueryString()Get the query string part of the url (everything after the ?)StringgetRemoteAddr()Get the remote ip address of the requestStringgetRemoteHost()Get the remote host name (if known) if not return ip addressStringgetRequestURI()Get the full request URIStringgetRequestURL()Get the request url (same as URI minus the query string)StringgetScheme()Get the request scheme (Example "http")StringgetServerName()Get the name of the server (Example: "Wowza Streaming Engine")intgetServerPort()Get the port this request was received onbooleanisHeadRequest()Returns true if the request is a HEAD requestbooleanisSecure()Returns true is the request is protected by SSLbooleanisUpgradeRequest()Returns true if upgrade request (WebSocket,...)voidparseBodyForParams()If the body of the message contains parameter data (data in name value pairs separated by & character) call this routine to decode those parameters and add them to the parameter map.voidparseBodyForParams(boolean doDecode)If the body of the message contains parameter data (data in name value pairs separated by & character) call this routine to decode those parameters and add them to the parameter map.
 
- 
- 
- 
Field Detail- 
HTTP_HEADER_X_REAL_IPstatic final String HTTP_HEADER_X_REAL_IP - See Also:
- Constant Field Values
 
 - 
HTTP_HEADER_X_FORWARDED_FORstatic final String HTTP_HEADER_X_FORWARDED_FOR - See Also:
- Constant Field Values
 
 - 
PROPERTY_X_FORWARDED_LISTstatic final String PROPERTY_X_FORWARDED_LIST - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getHeaderMapjava.util.Map<String,String> getHeaderMap() Get a copy of the HTTP request header map- Returns:
- copy of the HTTP request header map
 
 - 
getHeaderString getHeader(String name) Get a HTTP header value such as 'Content-Length'- Parameters:
- name- header name
- Returns:
- header value
 
 - 
getIntHeaderint getIntHeader(String name) Get a HTTP header value such as 'Content-Length' and return as int- Parameters:
- name- header name
- Returns:
- header value
 
 - 
getHeaderNamesjava.util.Set<String> getHeaderNames() Get a Set of the header names- Returns:
- Set of header names
 
 - 
getMethodString getMethod() Get the method invokation method: GET, POST, HEAD- Returns:
- method
 
 - 
getQueryStringString getQueryString() Get the query string part of the url (everything after the ?)- Returns:
- query string
 
 - 
getContentLengthint getContentLength() Get the content length of the body of the message- Returns:
- content length of the body of the message
 
 - 
getRequestURIString getRequestURI() Get the full request URI- Returns:
- full request URI
 
 - 
getRequestURLString getRequestURL() Get the request url (same as URI minus the query string)- Returns:
- request url
 
 - 
getContentTypeString getContentType() Get the request content type- Returns:
- request content type
 
 - 
parseBodyForParamsvoid parseBodyForParams(boolean doDecode) If the body of the message contains parameter data (data in name value pairs separated by & character) call this routine to decode those parameters and add them to the parameter map.- Parameters:
- doDecode- true to decode the params as though they are url params
 
 - 
parseBodyForParamsvoid parseBodyForParams() If the body of the message contains parameter data (data in name value pairs separated by & character) call this routine to decode those parameters and add them to the parameter map.
 - 
getParameterString getParameter(String name) Get a parameter value- Parameters:
- name- parameter name
- Returns:
- parameter value
 
 - 
getParameterNamesjava.util.Set<String> getParameterNames() Get a Set of parameter names- Returns:
- Set of parameter names
 
 - 
getParameterValuesString[] getParameterValues(String name) Get a multi-value parameter as an array of String- Parameters:
- name- parameter name
- Returns:
- multi-value parameter as an array of String
 
 - 
getParameterMapjava.util.Map<String,java.util.List<String>> getParameterMap() Get the entire parameter Map- Returns:
- parameter Map
 
 - 
getInputStreamjava.io.InputStream getInputStream() Get the body of the message as an input stream- Returns:
- body of the message as an input stream
 
 - 
getProtocolString getProtocol() Get the request protocol (example: HTTP/1.1)- Returns:
- request protocol
 
 - 
getSchemeString getScheme() Get the request scheme (Example "http")- Returns:
- request scheme
 
 - 
getServerNameString getServerName() Get the name of the server (Example: "Wowza Streaming Engine")- Returns:
- name of the server
 
 - 
getServerPortint getServerPort() Get the port this request was received on- Returns:
- the port this request was received on
 
 - 
getRemoteAddrString getRemoteAddr() Get the remote ip address of the request- Returns:
- remote ip address of the request
 
 - 
getForwardedIPString getForwardedIP(String excludeAddresses) Get X-[real-forwarded] address
 - 
getRemoteHostString getRemoteHost() Get the remote host name (if known) if not return ip address- Returns:
- remote host name
 
 - 
getLocalejava.util.Locale getLocale() Get locale of request (Example: en-us)- Returns:
- locale of request
 
 - 
isSecureboolean isSecure() Returns true is the request is protected by SSL- Returns:
- true is the request is protected by SSL
 
 - 
getPathString getPath() Returns the HTTP path element of the request- Returns:
- HTTP path element of the request
 
 - 
getHeaderBytesbyte[] getHeaderBytes() Returns the header as bytes- Returns:
- header as bytes
 
 - 
getMsgBytesbyte[] getMsgBytes() Return the message bytes- Returns:
- message bytes
 
 - 
isHeadRequestboolean isHeadRequest() Returns true if the request is a HEAD request- Returns:
- true if the request is a HEAD request
 
 - 
isUpgradeRequestboolean isUpgradeRequest() Returns true if upgrade request (WebSocket,...)- Returns:
- Returns true if upgrade request
 
 - 
getHostString getHost() Returns the domain name and possibly the port of the server for which the HTTP Request is being sent to, for both HTTP 1.1 and HTTP 2.0- Returns:
- the domain name, to possibly include the port for the service requested ( if it is non-standard ), or an empty string if it is not defined
 
 
- 
 
-