Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.container
Class AdminConsolePlugin

java.lang.Object
  extended by org.jivesoftware.wildfire.container.AdminConsolePlugin
All Implemented Interfaces:
Plugin

public class AdminConsolePlugin
extends Object
implements Plugin

The admin console plugin. It starts a Jetty instance on the configured port and loads the admin console web application.

Author:
Matt Tucker

Constructor Summary
AdminConsolePlugin()
          Create a Jetty module.
 
Method Summary
 void destroyPlugin()
          Destroys the plugin.
 int getAdminSecurePort()
          Returns the SSL port on which the admin console is current operating.
 int getAdminUnsecurePort()
          Returns the non-SSL port on which the admin console is currently operating.
 org.mortbay.jetty.handler.ContextHandlerCollection getContexts()
          Returns the collection of Jetty contexts used in the admin console.
 void initializePlugin(PluginManager manager, File pluginDir)
          Initializes the plugin.
 boolean isRestartNeeded()
          Returns true if the Jetty server needs to be restarted.
 void restart()
           
 void shutdown()
          Shuts down the Jetty server.
 void startup()
          Starts the Jetty instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminConsolePlugin

public AdminConsolePlugin()
Create a Jetty module.

Method Detail

startup

public void startup()
Starts the Jetty instance.


shutdown

public void shutdown()
Shuts down the Jetty server.


initializePlugin

public void initializePlugin(PluginManager manager,
                             File pluginDir)
Description copied from interface: Plugin
Initializes the plugin.

Specified by:
initializePlugin in interface Plugin
Parameters:
manager - the plugin manager.
pluginDir - the directory where the plugin is located.

destroyPlugin

public void destroyPlugin()
Description copied from interface: Plugin
Destroys the plugin.

Implementations of this method must release all resources held by the plugin such as file handles, database or network connections, and references to core Wildfire classes. In other words, a garbage collection executed after this method is called must be able to clean up all plugin classes.

Specified by:
destroyPlugin in interface Plugin

isRestartNeeded

public boolean isRestartNeeded()
Returns true if the Jetty server needs to be restarted. This is usually required when certificates are added, deleted or modified or when server ports were modified.

Returns:
true if the Jetty server needs to be restarted.

getAdminUnsecurePort

public int getAdminUnsecurePort()
Returns the non-SSL port on which the admin console is currently operating.

Returns:
the non-SSL port on which the admin console is currently operating.

getAdminSecurePort

public int getAdminSecurePort()
Returns the SSL port on which the admin console is current operating.

Returns:
the SSL port on which the admin console is current operating.

getContexts

public org.mortbay.jetty.handler.ContextHandlerCollection getContexts()
Returns the collection of Jetty contexts used in the admin console. A root context "/" is where the admin console lives. Additional contexts can be added dynamically for other web applications that should be run as part of the admin console server process. The following pseudo code demonstrates how to do this:
   ContextHandlerCollection contexts = ((AdminConsolePlugin)pluginManager.getPlugin("admin")).getContexts();
   context = new WebAppContext(SOME_DIRECTORY, "/CONTEXT_NAME");
   contexts.addHandler(context);
   context.setWelcomeFiles(new String[]{"index.jsp"});
   context.start();
 

Returns:
the Jetty handlers.

restart

public void restart()

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.