Package com.wowza.wms.http
Interface IHTTPResponse
public interface IHTTPResponse
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault void
addHtmlHeaders
(String path) boolean
containsHeader
(String name) Returns true if response header contains parameter nameGet header valueGet the current response headers as a mapint
Get the size in bytes of the HTTP headerint
getIntHeader
(String name) Get header value as intGet the output stream for the response.int
Get the upgrade request protocol, -1 means no upgrade, see UPGRADE_PROTOCOL_*boolean
returns true if the response is due to a HEAD requestvoid
removeHeader
(String name) Remove header valuevoid
Set header valuevoid
setHeadResponse
(boolean isHeadResponse) indicates if the response is a response to a HEAD requestvoid
setIntHeader
(String name, int value) Set header value as intvoid
setIsCte
(boolean b) void
setResponseCode
(int responseCode) Set the HTTP response codevoid
setUpgradeRequestProtocol
(int upgradeRequestProtocol, IWebSocketEventNotify listener) Set the upgrade request protocol, -1 means no upgrade, see UPGRADE_PROTOCOL_*
-
Field Details
-
UPGRADE_PROTOCOL_WEBSOCKETS
static final int UPGRADE_PROTOCOL_WEBSOCKETS- See Also:
-
-
Method Details
-
getOutputStream
OutputStream getOutputStream()Get the output stream for the response. You can then write directly into the output stream.- Returns:
- output stream for the response
-
containsHeader
Returns true if response header contains parameter name- Parameters:
name
- header parameter name- Returns:
- true if header contains value
-
setHeader
Set header value- Parameters:
name
- header parameter namevalue
- parameter value
-
removeHeader
Remove header value- Parameters:
name
- name
-
setIntHeader
Set header value as int- Parameters:
name
- header parameter namevalue
- parameter value
-
getHeaders
Map getHeaders()Get the current response headers as a map- Returns:
- current response headers as a map
-
getHeader
Get header value- Parameters:
name
- header parameter name- Returns:
- parameter value
-
getIntHeader
Get header value as int- Parameters:
name
- header parameter name- Returns:
- parameter value
-
setResponseCode
void setResponseCode(int responseCode) Set the HTTP response code- Parameters:
responseCode
- HTTP response code
-
getHeaderSize
int getHeaderSize()Get the size in bytes of the HTTP header- Returns:
- header size in bytes
-
setHeadResponse
void setHeadResponse(boolean isHeadResponse) indicates if the response is a response to a HEAD request- Parameters:
isHeadResponse
- indicating if this is a response to a HEAD request
-
isHeadResponse
boolean isHeadResponse()returns true if the response is due to a HEAD request- Returns:
- true if the response is due to a HEAD request
-
getUpgradeRequestProtocol
int getUpgradeRequestProtocol()Get the upgrade request protocol, -1 means no upgrade, see UPGRADE_PROTOCOL_*- Returns:
- upgrade request protocol
-
setUpgradeRequestProtocol
Set the upgrade request protocol, -1 means no upgrade, see UPGRADE_PROTOCOL_*- Parameters:
upgradeRequestProtocol
- upgrade request protocollistener
- event listener
-
setIsCte
void setIsCte(boolean b) -
addHtmlHeaders
-