How-to implement the IVHostHTTPStreamerRequestValidator interface

In order to handle/receive/validate each http based request, you will need to implement the IVHostHTTPStreamerRequestValidator interface. First, you will want to create a small class as follows:

public class HTTPEventHandler implements IVHostHTTPStreamerRequestValidator{
	public boolean validateHTTPStreamerRequest(RtmpRequestMessage arg0,HostPort arg1, String arg2) {
                   String asset = arg0.getPath();
                   // do validation on this request
                   return true;

Then you will want to set this validator within the onVHostCreate event from the IVHostNotify inteface:

public class ServerVHostListener implements IVHostNotify{
	public void onVHostCreate(IVHost vhost) {
		vhost.setHTTPStreamerRequestValidator(new HTTPEventHandler());

To initiate this event, you must add it as a vhost listener within your Server.xml file as follows:


Comments are closed.