com.wowza.wms.http
Interface IHTTPRequest


public interface IHTTPRequest


Method Summary
 int getContentLength()
          Get the content length of the body of the message
 String getContentType()
          Get the request content type
 String getHeader(String name)
          Get a HTTP header value such as 'Content-Length'
 java.util.Set<String> getHeaderNames()
          Get a Set of the header names
 java.io.InputStream getInputStream()
          Get the body of the message as an input stream
 int getIntHeader(String name)
          Get a HTTP header value such as 'Content-Length' and return as int
 java.util.Locale getLocale()
          Get locale of request (Example: en-us)
 String getMethod()
          Get the method invokation method: GET, POST, HEAD
 String getParameter(String name)
          Get a parameter value
 java.util.Map<String,java.util.List<String>> getParameterMap()
          Get the entire parameter Map
 java.util.Set<String> getParameterNames()
          Get a Set of parameter names
 String[] getParameterValues(String name)
          Get a multi-value parameter as an array of String
 String getProtocol()
          Get the request protocol (example: HTTP/1.1)
 String getQueryString()
          Get the query string part of the url (everything after the ?)
 String getRemoteAddr()
          Get the remote ip address of the request
 String getRemoteHost()
          Get the remote host name (if known) if not return ip address
 String getRequestURI()
          Get the full request URI
 String getRequestURL()
          Get the request url (same as URI minus the query string)
 String getScheme()
          Get the request scheme (Example "http")
 String getServerName()
          Get the name of the server (Example: "Wowza Media Server Pro")
 int getServerPort()
          Get the port this request was received on
 boolean isSecure()
          Returns true is the request is protected by SSL
 void 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.
 void 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.
 

Method Detail

getContentLength

int getContentLength()
Get the content length of the body of the message

Returns:
content length of the body of the message

getContentType

String getContentType()
Get the request content type

Returns:
request content type

getHeader

String getHeader(String name)
Get a HTTP header value such as 'Content-Length'

Parameters:
name - header name
Returns:
header value

getHeaderNames

java.util.Set<String> getHeaderNames()
Get a Set of the header names

Returns:
Set of header names

getInputStream

java.io.InputStream getInputStream()
Get the body of the message as an input stream

Returns:
body of the message as an input stream

getIntHeader

int getIntHeader(String name)
Get a HTTP header value such as 'Content-Length' and return as int

Parameters:
name - header name
Returns:
header value

getLocale

java.util.Locale getLocale()
Get locale of request (Example: en-us)

Returns:
locale of request

getMethod

String getMethod()
Get the method invokation method: GET, POST, HEAD

Returns:
method

getParameter

String getParameter(String name)
Get a parameter value

Parameters:
name - parameter name
Returns:
parameter value

getParameterMap

java.util.Map<String,java.util.List<String>> getParameterMap()
Get the entire parameter Map

Returns:
parameter Map

getParameterNames

java.util.Set<String> getParameterNames()
Get a Set of parameter names

Returns:
Set of parameter names

getParameterValues

String[] 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

getProtocol

String getProtocol()
Get the request protocol (example: HTTP/1.1)

Returns:
request protocol

getQueryString

String getQueryString()
Get the query string part of the url (everything after the ?)

Returns:
query string

getRemoteAddr

String getRemoteAddr()
Get the remote ip address of the request

Returns:
remote ip address of the request

getRemoteHost

String getRemoteHost()
Get the remote host name (if known) if not return ip address

Returns:
remote host name

getRequestURI

String getRequestURI()
Get the full request URI

Returns:
full request URI

getRequestURL

String getRequestURL()
Get the request url (same as URI minus the query string)

Returns:
request url

getScheme

String getScheme()
Get the request scheme (Example "http")

Returns:
request scheme

getServerName

String getServerName()
Get the name of the server (Example: "Wowza Media Server Pro")

Returns:
name of the server

getServerPort

int getServerPort()
Get the port this request was received on

Returns:
the port this request was received on

isSecure

boolean isSecure()
Returns true is the request is protected by SSL

Returns:
true is the request is protected by SSL

parseBodyForParams

void 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.


parseBodyForParams

void 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