Package com.wowza.wms.http
Interface IHTTPProvider2
- 
- All Superinterfaces:
- IHTTPProvider
 - All Known Implementing Classes:
- HTTPProvider2Base,- com.wowza.wms.http.HTTProvider2Base
 
 public interface IHTTPProvider2 extends IHTTPProvider IHTTPProvider2: Extension of IHTTPProvider that adds support for multiple HTTProviders attached to a single HostPort along with authentication. Multiple HTTPProviders can be added to a HostPort definition. They are configured as follows: <HTTPProvider> <BaseClass>com.wowza.wms.http.HTTPServerVersion</BaseClass> <RequestFilters>*serverversion</RequestFilters> <AuthenticationMethod>none</AuthenticationMethod> </HTTPProvider>Below is an sample implementation of the HTTPServerVersion provider: import java.io.*; import com.wowza.wms.server.*; import com.wowza.wms.stream.*; import com.wowza.wms.vhost.*; import com.wowza.wms.logging.*; public class HTTPServerVersion extends HTTProvider2Base { public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) { if (!doHTTPAuthentication(vhost, req, resp)) return; String version = MediaStreamBase.p+" "+ReleaseInfo.getVersion()+" build"+ReleaseInfo.getBuildNumber(); String retStr = "<html><head><title>"+version+"</title></head><body>"+version+"</body></html>"; try { OutputStream out = resp.getOutputStream(); byte[] outBytes = retStr.getBytes(); out.write(outBytes); } catch (Exception e) { WMSLoggerFactory.getLogger(HTTPServerVersion.class).error("HTMLServerVersion ", e); } } }
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanHandle(String path)StringgetAuthenticationMethod()StringgetRequestFilters()voidinit()voidsetAuthenticationMethod(String authenticationMethod)voidsetRequestFilters(String requestFilters)- 
Methods inherited from interface com.wowza.wms.http.IHTTPProvideraddCORSHeaders, addCORSHeaders, addDateHeader, addWebSocketSession, broadcastWebSocketMessage, getWebSocketSessionCount, getWebSocketSessions, onBind, onHTTPRequest, onUnbind, removeWebSocketSession, setPasswordEncodingScheme, setProperties, validatePath
 
- 
 
- 
- 
- 
Method Detail- 
canHandleboolean canHandle(String path) 
 - 
setRequestFiltersvoid setRequestFilters(String requestFilters) 
 - 
getRequestFiltersString getRequestFilters() 
 - 
initvoid init() 
 - 
getAuthenticationMethodString getAuthenticationMethod() 
 - 
setAuthenticationMethodvoid setAuthenticationMethod(String authenticationMethod) 
 
- 
 
-