Reset Application through an HTTP Provider

This is a simple HTTP Provider that will allow you to run an HTTP request to restart a given application (in the event of a application configuration change or otherwise). The core of this provider surrounds the vhost.shutdownApplication() function to handle the disconnection of all client from all application instances. Please see the following excerpt:

String applicationName = null;
if (params.containsKey("application"))
	applicationName = params.get("application").get(0);

if(applicationName!=null){
	if(vhost.getApplication(applicationName)!=null){
		vhost.shutdownApplication(applicationName, false);
	}
}

Below is the HTTP Provider snippet that you’ll add to your VHost.xml under the 8086 hostport.

<HTTPProvider>
<BaseClass>guru.thewowza.RestartApplication</BaseClass>
<RequestFilters>restart*</RequestFilters>
<AuthenticationMethod>admin-digest</AuthenticationMethod>
</HTTPProvider>

Please download the entire HTTP Provider here.


Comments are closed.