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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
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
broadcastWebSocketMessage(WebSocketMessage message)
Broadcast a WebSocket message to all connected WebSocket sessions.int
getWebSocketSessionCount()
Get total count of WebSocket sessions for this HTTPProviderjava.util.List<IWebSocketSession>
getWebSocketSessions()
Get a list of all WebSocket sessions for this HTTPProvidervoid
onBind(IVHost vhost, HostPort hostPort)
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
onUnbind(IVHost vhost, HostPort hostPort)
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 Detail
-
onBind
void onBind(IVHost vhost, HostPort hostPort)
Triggered after hostPort binds to socket- Parameters:
vhost
- parent vhosthostPort
- host port definition
-
onHTTPRequest
void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp)
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
void onUnbind(IVHost vhost, HostPort hostPort)
Triggered after hostPort unbinds- Parameters:
vhost
- parent vhosthostPort
- host port definition
-
setProperties
void setProperties(WMSProperties properties)
Called to provide properties set in configuration files
-
setPasswordEncodingScheme
default void setPasswordEncodingScheme(String passwordEncodingScheme)
Called to provide passwordEncodingScheme set in configuration files- Parameters:
passwordEncoding
- password encoding
-
addCORSHeaders
void addCORSHeaders(IHTTPResponse resp)
Called to provide CORS Headers to the output, no dynamic CORS output- Parameters:
resp
-
-
addCORSHeaders
void addCORSHeaders(IHTTPRequest req, IHTTPResponse resp)
Called to provide CORS Headers to the output- Parameters:
resp
-
-
addDateHeader
void addDateHeader(IHTTPResponse resp)
Called to provide Date Header to the output- Parameters:
resp
-
-
validatePath
boolean validatePath(String path)
Called to check path request is within scope- Parameters:
path
-- Returns:
-
addWebSocketSession
void addWebSocketSession(IWebSocketSession webSocketSession)
Add WebSocket session- Parameters:
webSocketSession
- WebSocket session
-
removeWebSocketSession
boolean removeWebSocketSession(IWebSocketSession webSocketSession)
Remove WebSocket session- Parameters:
webSocketSession
- WebSocket session- Returns:
- true, if session removed
-
getWebSocketSessions
java.util.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
int broadcastWebSocketMessage(WebSocketMessage message)
Broadcast a WebSocket message to all connected WebSocket sessions.- Parameters:
message
- message to broadcast- Returns:
- number of sessions the message was sent to
-
-