Package com.wowza.wms.http
Interface IHTTPResponse
-
public interface IHTTPResponse
-
-
Field Summary
Fields Modifier and Type Field Description static int
UPGRADE_PROTOCOL_WEBSOCKETS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addHtmlHeaders(String path)
boolean
containsHeader(String name)
Returns true if response header contains parameter nameString
getHeader(String name)
Get header valuejava.util.Map
getHeaders()
Get the current response headers as a mapint
getHeaderSize()
Get the size in bytes of the HTTP headerint
getIntHeader(String name)
Get header value as intjava.io.OutputStream
getOutputStream()
Get the output stream for the response.int
getUpgradeRequestProtocol()
Get the upgrade request protocol, -1 means no upgrade, see UPGRADE_PROTOCOL_*boolean
isHeadResponse()
returns true if the response is due to a HEAD requestvoid
removeHeader(String name)
Remove header valuevoid
setHeader(String name, String value)
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 Detail
-
UPGRADE_PROTOCOL_WEBSOCKETS
static final int UPGRADE_PROTOCOL_WEBSOCKETS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOutputStream
java.io.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
boolean containsHeader(String name)
Returns true if response header contains parameter name- Parameters:
name
- header parameter name- Returns:
- true if header contains value
-
setHeader
void setHeader(String name, String value)
Set header value- Parameters:
name
- header parameter namevalue
- parameter value
-
removeHeader
void removeHeader(String name)
Remove header value- Parameters:
name
- name
-
setIntHeader
void setIntHeader(String name, int value)
Set header value as int- Parameters:
name
- header parameter namevalue
- parameter value
-
getHeaders
java.util.Map getHeaders()
Get the current response headers as a map- Returns:
- current response headers as a map
-
getHeader
String getHeader(String name)
Get header value- Parameters:
name
- header parameter name- Returns:
- parameter value
-
getIntHeader
int getIntHeader(String name)
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
void setUpgradeRequestProtocol(int upgradeRequestProtocol, IWebSocketEventNotify listener)
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
default void addHtmlHeaders(String path)
-
-