Package com.wowza.wms.http
Class HTTPProvider2Base
- Object
-
- com.wowza.wms.http.HTTProvider2Base
-
- com.wowza.wms.http.HTTPProvider2Base
-
- All Implemented Interfaces:
IHTTPProvider
,IHTTPProvider2
public abstract class HTTPProvider2Base extends com.wowza.wms.http.HTTProvider2Base
HTTPProvider2Base: public base class for implementing HTTP Providers.
Simple HTTPProvider class
package com.wowza.wms.plugin.test.http; public class HTTPHelloWowza extends HTTPProvider2Base { public void onBind(IVHost vhost, HostPort hostPort) { super.onBind(vhost, hostPort); // Called when the HTTP Provider is added to the VHost it is configured for. } public void onUnbind(IVHost vhost, HostPort hostPort) { // Called when the VHost is shutting down for the hostPort configured } public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) { // If you omit this no authentication is checked regardless of the configuration if (!doHTTPAuthentication(vhost, req, resp)) return; String retStr = "
Hello Wowza Hello Wowza"; try { OutputStream out = resp.getOutputStream(); byte[] outBytes = retStr.getBytes(); out.write(outBytes); } catch (Exception e) { WMSLoggerFactory.getLogger(HTTPHelloWowza.class).error("HTTPHelloWowza ", e); } } } Can be added with the following HTTPProvider XML configurationcom.wowza.wms.plugin.test.http.HTTPHelloWowza hellowowza* none
-
-
Field Summary
-
Fields inherited from class com.wowza.wms.http.HTTProvider2Base
authenticateHandler, authenticateHTTPProviderHandler, authenticationMethod, corsHeaders, DATEFORMAT, DATEFORMAT_LOCALE, DATEFORMAT_LOCALE_COUNTRY, DATEFORMAT_LOCALE_lANGUAGE, DATEFORMAT_ZONE, DATEHEADER_ENABLE, dateHeaderFormat, dateHeaderLocale, dateHeaderLocaleString, dateHeaderZone, enableDate, fastDateFormat, filters, passwordEncodingScheme, properties, PROPERTY_DATE_HEADER_ENABLE, PROPERTY_DATE_HEADER_FORMAT, PROPERTY_DATE_HEADER_LOCALE, PROPERTY_DATE_HEADER_ZONE, requestFilters, webSocketSessions
-
-
Constructor Summary
Constructors Constructor Description HTTPProvider2Base()
-
Method Summary
-
Methods inherited from class com.wowza.wms.http.HTTProvider2Base
addCORSHeaders, addCORSHeaders, addDateHeader, addWebSocketSession, broadcastWebSocketMessage, canHandle, doHTTPAuthentication, getAuthenticationMethod, getHostPort, getPath, getRequestFilters, getWebSocketSessionCount, getWebSocketSessions, init, onBind, onUnbind, removeWebSocketSession, setAuthenticationMethod, setPasswordEncodingScheme, setProperties, setRequestFilters, validatePath
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.wowza.wms.http.IHTTPProvider
onHTTPRequest
-
-