Package com.wowza.wms.http
Interface IHTTPProvider
- All Known Subinterfaces:
IHTTPProvider2
- All Known Implementing Classes:
HTTPProvider2Base
,com.wowza.wms.http.HTTProvider2Base
public interface IHTTPProvider
IHTTPProvider: HTTP provider class for a given HostPort definition. Receive all HTTP requests that are not RTMPT requests. See IHTTPProvider2 for the extended version of this interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCORSHeaders
(IHTTPRequest req, IHTTPResponse resp) Called to provide CORS Headers to the outputvoid
addCORSHeaders
(IHTTPResponse resp) Called to provide CORS Headers to the output, no dynamic CORS outputvoid
addDateHeader
(IHTTPResponse resp) Called to provide Date Header to the outputvoid
addWebSocketSession
(IWebSocketSession webSocketSession) Add WebSocket sessionint
Broadcast a WebSocket message to all connected WebSocket sessions.int
Get total count of WebSocket sessions for this HTTPProviderGet a list of all WebSocket sessions for this HTTPProvidervoid
Triggered after hostPort binds to socketvoid
onHTTPRequest
(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) Triggered for each HTTP request to the given hostPort that is not an RTMPT request.void
Triggered after hostPort unbindsboolean
removeWebSocketSession
(IWebSocketSession webSocketSession) Remove WebSocket sessiondefault void
setPasswordEncodingScheme
(String passwordEncodingScheme) Called to provide passwordEncodingScheme set in configuration filesvoid
setProperties
(WMSProperties properties) Called to provide properties set in configuration filesboolean
validatePath
(String path) Called to check path request is within scope
-
Method Details
-
onBind
Triggered after hostPort binds to socket- Parameters:
vhost
- parent vhosthostPort
- host port definition
-
onHTTPRequest
Triggered for each HTTP request to the given hostPort that is not an RTMPT request.- Parameters:
vhost
- parent vhostreq
- HTML requestion objectresp
- HTML response object
-
onUnbind
Triggered after hostPort unbinds- Parameters:
vhost
- parent vhosthostPort
- host port definition
-
setProperties
Called to provide properties set in configuration files -
setPasswordEncodingScheme
Called to provide passwordEncodingScheme set in configuration files- Parameters:
passwordEncoding
- password encoding
-
addCORSHeaders
Called to provide CORS Headers to the output, no dynamic CORS output- Parameters:
resp
-
-
addCORSHeaders
Called to provide CORS Headers to the output- Parameters:
resp
-
-
addDateHeader
Called to provide Date Header to the output- Parameters:
resp
-
-
validatePath
Called to check path request is within scope- Parameters:
path
-- Returns:
-
addWebSocketSession
Add WebSocket session- Parameters:
webSocketSession
- WebSocket session
-
removeWebSocketSession
Remove WebSocket session- Parameters:
webSocketSession
- WebSocket session- Returns:
- true, if session removed
-
getWebSocketSessions
List<IWebSocketSession> getWebSocketSessions()Get a list of all WebSocket sessions for this HTTPProvider- Returns:
- list of all WebSocket sessions
-
getWebSocketSessionCount
int getWebSocketSessionCount()Get total count of WebSocket sessions for this HTTPProvider- Returns:
- total count of WebSocket sessions for this HTTPProvider
-
broadcastWebSocketMessage
Broadcast a WebSocket message to all connected WebSocket sessions.- Parameters:
message
- message to broadcast- Returns:
- number of sessions the message was sent to
-