Package com.wowza.wms.httpstreamer.model
Interface IHTTPStreamerApplicationContext
public interface IHTTPStreamerApplicationContext
IHTTPStreamerApplicationContext: HTTP streamer application context interface. Used by HTTP streaming adapter to store per-application information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addQueryStrRemoveList
(String name) Add a name to the list of query string parameters that will not be copied to the media URLs for HTTP streamingfilterQueryStr
(Map<String, String> map) InternalGet application instanceGet the cache-control header for 4xx HTTP responsesint
Get current HTTP origin mode.Get HTTP origin sessionId provider used to determine unique HTTP origin sessions.int
Get maximum number of HTTP sessions tracked per-TCP sessionGet propertiesGet the live repeater media caster definitionint
Get the response code used when an incomplete chunk (read error) is encountered.Get stream typeGet user HTTP headers.getVHost()
Get vhostvoid
init
(IApplicationInstance appInstance, com.wowza.wms.httpstreamer.model.HTTPStreamerItem httpStreamerItem) Initialize contextboolean
boolean
Returns true if HTTP origin mode is set to ON.boolean
Return true if stream domain protection is onvoid
setCacheControlStatus4xx
(String cacheControlStatus4xx) Set the cache-control header for 4xx HTTP responsesvoid
setHTTPOriginMode
(int httpOriginMode) Set current HTTP origin mode.void
setHTTPOriginSessionIdProvider
(IHTTPStreamerHTTPOriginSessionIdProvider httpOriginSessionIdProvider) Set HTTP origin sessionId provider used to determine unique HTTP origin sessions.void
setMaxHTTPSessionsPerTCPSession
(int maxHTTPSessionsPerTCPSession) Set maximum number of HTTP sessions tracked per-TCP sessionvoid
setRepeaterMediaCasterDef
(MediaCasterItem repeaterMediaCasterDef) Set the live repeater media caster definitionvoid
setResponseOnIncompleteChunk
(int responseOnIncompleteChunk) Set the response code used when an incomplete chunk (read error) is encountered.void
setStreamDomainProtectionActive
(boolean streamDomainProtectionActive) Turn on/off stream domain protectionvoid
setStreamTypeStr
(String streamTypeStr) Set stream typevoid
setUserHTTPHeader
(String name, String value) Add a user HTTP header to the header map.
-
Field Details
-
HTTPORIGINMODE_OFF
static final int HTTPORIGINMODE_OFF- See Also:
-
HTTPORIGINMODE_AUTO
static final int HTTPORIGINMODE_AUTO- See Also:
-
HTTPORIGINMODE_ON
static final int HTTPORIGINMODE_ON- See Also:
-
-
Method Details
-
init
void init(IApplicationInstance appInstance, com.wowza.wms.httpstreamer.model.HTTPStreamerItem httpStreamerItem) Initialize context- Parameters:
appInstance
- application instancehttpStreamerItem
- HTTP streamer
-
getProperties
WMSProperties getProperties()Get properties- Returns:
- properties
-
getAppInstance
IApplicationInstance getAppInstance()Get application instance- Returns:
- application instance
-
getVHost
IVHost getVHost()Get vhost- Returns:
- vhost
-
getRepeaterMediaCasterDef
MediaCasterItem getRepeaterMediaCasterDef()Get the live repeater media caster definition- Returns:
- live repeater media caster definition
-
setRepeaterMediaCasterDef
Set the live repeater media caster definition- Parameters:
repeaterMediaCasterDef
- live repeater media caster definition
-
getStreamTypeStr
String getStreamTypeStr()Get stream type- Returns:
- stream type
-
setStreamTypeStr
Set stream type- Parameters:
streamTypeStr
- stream type
-
isStreamDomainProtectionActive
boolean isStreamDomainProtectionActive()Return true if stream domain protection is on- Returns:
- true if stream domain protection is on
-
setStreamDomainProtectionActive
void setStreamDomainProtectionActive(boolean streamDomainProtectionActive) Turn on/off stream domain protection- Parameters:
streamDomainProtectionActive
- true if stream domain protection is on
-
getHTTPOriginMode
int getHTTPOriginMode()Get current HTTP origin mode. See HTTPORIGINMODE_ (auto is currently not supported)- Returns:
- HTTP origin mode
-
setHTTPOriginMode
void setHTTPOriginMode(int httpOriginMode) Set current HTTP origin mode. See HTTPORIGINMODE_ (auto is currently not supported)- Parameters:
httpOriginMode
- HTTP origin mode
-
isHTTPOriginOn
boolean isHTTPOriginOn()Returns true if HTTP origin mode is set to ON.- Returns:
- true if HTTP origin mode is set to ON.
-
setUserHTTPHeader
Add a user HTTP header to the header map. These headers will be added to every HTTP response.- Parameters:
name
- namevalue
- value (null if no value)
-
getUserHTTPHeaders
Get user HTTP headers.- Returns:
- header map
-
addQueryStrRemoveList
Add a name to the list of query string parameters that will not be copied to the media URLs for HTTP streaming- Parameters:
name
- query name
-
filterQueryStr
Internal- Parameters:
map
- query map- Returns:
- query map
-
getCacheControlStatus4xx
String getCacheControlStatus4xx()Get the cache-control header for 4xx HTTP responses- Returns:
- cache-control header for 4xx HTTP responses
-
setCacheControlStatus4xx
Set the cache-control header for 4xx HTTP responses- Parameters:
cacheControlStatus4xx
- cache-control header for 4xx HTTP responses
-
getResponseOnIncompleteChunk
int getResponseOnIncompleteChunk()Get the response code used when an incomplete chunk (read error) is encountered. If zero, chunk is sent.- Returns:
- response code
-
setResponseOnIncompleteChunk
void setResponseOnIncompleteChunk(int responseOnIncompleteChunk) Set the response code used when an incomplete chunk (read error) is encountered. If zero, chunk is sent.- Parameters:
responseOnIncompleteChunk
- response code
-
getMaxHTTPSessionsPerTCPSession
int getMaxHTTPSessionsPerTCPSession()Get maximum number of HTTP sessions tracked per-TCP session- Returns:
- maximum number of HTTP sessions tracked per-TCP session
-
setMaxHTTPSessionsPerTCPSession
void setMaxHTTPSessionsPerTCPSession(int maxHTTPSessionsPerTCPSession) Set maximum number of HTTP sessions tracked per-TCP session- Parameters:
maxHTTPSessionsPerTCPSession
- maximum number of HTTP sessions tracked per-TCP session
-
getHTTPOriginSessionIdProvider
IHTTPStreamerHTTPOriginSessionIdProvider getHTTPOriginSessionIdProvider()Get HTTP origin sessionId provider used to determine unique HTTP origin sessions.- Returns:
- sessionId provider
-
setHTTPOriginSessionIdProvider
void setHTTPOriginSessionIdProvider(IHTTPStreamerHTTPOriginSessionIdProvider httpOriginSessionIdProvider) Set HTTP origin sessionId provider used to determine unique HTTP origin sessions.- Parameters:
httpOriginSessionIdProvider
- sessionId provider
-
isApplicationRunning
boolean isApplicationRunning()
-