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
Fields Modifier and Type Field Description static int
HTTPORIGINMODE_AUTO
static int
HTTPORIGINMODE_OFF
static int
HTTPORIGINMODE_ON
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addQueryStrRemoveList(String name)
Add a name to the list of query string parameters that will not be copied to the media URLs for HTTP streamingjava.util.Map<String,String>
filterQueryStr(java.util.Map<String,String> map)
InternalIApplicationInstance
getAppInstance()
Get application instanceString
getCacheControlStatus4xx()
Get the cache-control header for 4xx HTTP responsesint
getHTTPOriginMode()
Get current HTTP origin mode.IHTTPStreamerHTTPOriginSessionIdProvider
getHTTPOriginSessionIdProvider()
Get HTTP origin sessionId provider used to determine unique HTTP origin sessions.int
getMaxHTTPSessionsPerTCPSession()
Get maximum number of HTTP sessions tracked per-TCP sessionWMSProperties
getProperties()
Get propertiesMediaCasterItem
getRepeaterMediaCasterDef()
Get the live repeater media caster definitionint
getResponseOnIncompleteChunk()
Get the response code used when an incomplete chunk (read error) is encountered.String
getStreamTypeStr()
Get stream typejava.util.Map<String,String>
getUserHTTPHeaders()
Get user HTTP headers.IVHost
getVHost()
Get vhostvoid
init(IApplicationInstance appInstance, com.wowza.wms.httpstreamer.model.HTTPStreamerItem httpStreamerItem)
Initialize contextboolean
isApplicationRunning()
boolean
isHTTPOriginOn()
Returns true if HTTP origin mode is set to ON.boolean
isStreamDomainProtectionActive()
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 Detail
-
HTTPORIGINMODE_OFF
static final int HTTPORIGINMODE_OFF
- See Also:
- Constant Field Values
-
HTTPORIGINMODE_AUTO
static final int HTTPORIGINMODE_AUTO
- See Also:
- Constant Field Values
-
HTTPORIGINMODE_ON
static final int HTTPORIGINMODE_ON
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void setRepeaterMediaCasterDef(MediaCasterItem repeaterMediaCasterDef)
Set the live repeater media caster definition- Parameters:
repeaterMediaCasterDef
- live repeater media caster definition
-
getStreamTypeStr
String getStreamTypeStr()
Get stream type- Returns:
- stream type
-
setStreamTypeStr
void setStreamTypeStr(String streamTypeStr)
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
void setUserHTTPHeader(String name, String value)
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
java.util.Map<String,String> getUserHTTPHeaders()
Get user HTTP headers.- Returns:
- header map
-
addQueryStrRemoveList
void addQueryStrRemoveList(String name)
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
java.util.Map<String,String> filterQueryStr(java.util.Map<String,String> map)
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
void setCacheControlStatus4xx(String cacheControlStatus4xx)
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()
-
-