|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcom.wowza.wms.http.HTTProvider2Base
public abstract class HTTProvider2Base
HTTProvider2Base: base class for implementing HTTP Providers.
public class HTTPHelloWowza extends HTTProvider2Base
{
public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp)
{
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(HTTPServerVersion.class).error("HTMLServerVersion: "+e.toString());
}
}
}
| Field Summary | |
|---|---|
protected IAuthenticate |
authenticateHandler
|
protected IAuthenticateHTTPProvider |
authenticateHTTPProviderHandler
|
protected String |
authenticationMethod
|
protected java.util.List<com.wowza.wms.http.HTTProvider2Base.QuickFilter> |
filters
|
protected WMSProperties |
properties
|
protected String |
requestFilters
|
| Constructor Summary | |
|---|---|
HTTProvider2Base()
|
|
| Method Summary | |
|---|---|
boolean |
canHandle(String path)
Return true if can handle the request |
boolean |
doHTTPAuthentication(IVHost vhost,
IHTTPRequest req,
IHTTPResponse resp)
Handle authentication request |
String |
getAuthenticationMethod()
Get the authentication method: digest, basic, none... |
String |
getPath(IHTTPRequest req,
boolean removeFilter)
Get the request path |
String |
getRequestFilters()
Get the request filter |
void |
init()
Initialize the HTTPProvider |
void |
onBind(IVHost vhost,
HostPort hostPort)
Called when bind is called on port |
void |
onUnbind(IVHost vhost,
HostPort hostPort)
Called when unbinid is called on port |
void |
setAuthenticationMethod(String authenticationMethod)
Set authentication method: digest, basic, none... |
void |
setProperties(WMSProperties properties)
Set properties |
void |
setRequestFilters(String requestFilters)
Set the request filter |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.wowza.wms.http.IHTTPProvider |
|---|
onHTTPRequest |
| Field Detail |
|---|
protected IAuthenticate authenticateHandler
protected IAuthenticateHTTPProvider authenticateHTTPProviderHandler
protected String authenticationMethod
protected java.util.List<com.wowza.wms.http.HTTProvider2Base.QuickFilter> filters
protected WMSProperties properties
protected String requestFilters
| Constructor Detail |
|---|
public HTTProvider2Base()
| Method Detail |
|---|
public boolean canHandle(String path)
canHandle in interface IHTTPProvider2path - request path
public boolean doHTTPAuthentication(IVHost vhost,
IHTTPRequest req,
IHTTPResponse resp)
vhost - vhostreq - requestresp - response
public String getAuthenticationMethod()
getAuthenticationMethod in interface IHTTPProvider2
public String getPath(IHTTPRequest req,
boolean removeFilter)
req - requestremoveFilter - set to true to remove filter part of URL
public String getRequestFilters()
getRequestFilters in interface IHTTPProvider2public void init()
init in interface IHTTPProvider2
public void onBind(IVHost vhost,
HostPort hostPort)
onBind in interface IHTTPProvidervhost - vhosthostPort - host port
public void onUnbind(IVHost vhost,
HostPort hostPort)
onUnbind in interface IHTTPProvidervhost - vhosthostPort - host portpublic void setAuthenticationMethod(String authenticationMethod)
setAuthenticationMethod in interface IHTTPProvider2authenticationMethod - authentication methodpublic void setProperties(WMSProperties properties)
setProperties in interface IHTTPProviderproperties - propertiespublic void setRequestFilters(String requestFilters)
setRequestFilters in interface IHTTPProvider2requestFilters - request filter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||