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 Detail

      • onBind

        void onBind​(IVHost vhost,
                    HostPort hostPort)
        Triggered after hostPort binds to socket
        Parameters:
        vhost - parent vhost
        hostPort - 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 vhost
        req - HTML requestion object
        resp - HTML response object
      • onUnbind

        void onUnbind​(IVHost vhost,
                      HostPort hostPort)
        Triggered after hostPort unbinds
        Parameters:
        vhost - parent vhost
        hostPort - 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