|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.authz.common.http.JettyAdminService
public class JettyAdminService
A Jetty instance that listens on a give port for command requests. This command starts a separate Jetty instance that binds to 127.0.0.1 on a port given during service construction. Incoming requests are delegated to registered command objects based on their path. This service also registers a special shutdown command for itself. When the shutdown command, registered at /shutdown is run a set of registered shutdown tasks are executed after which this service is also shutdown.
Constructor Summary | |
---|---|
JettyAdminService(java.lang.String hostname,
int port,
java.lang.String password)
Constructor. |
Method Summary | |
---|---|
protected org.mortbay.jetty.Server |
buildAdminService()
Builds the Jetty server that will receive admin requests. |
protected AbstractAdminCommand |
buildShutdownCommand()
Builds an AbstractAdminCommand which shutdowns this admin service. |
void |
registerAdminCommand(AbstractAdminCommand command)
Registers a new administration command. |
void |
registerShutdownTask(java.lang.Runnable task)
Registers a task to be run at shutdown time. |
void |
start()
Creates and starts the shutdown service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JettyAdminService(java.lang.String hostname, int port, java.lang.String password)
hostname
- hostname upon which the admin service listensport
- port upon which the admin service listenspassword
- password required to execute admin commands, may be null if no password is requiredMethod Detail |
---|
public void registerAdminCommand(AbstractAdminCommand command)
command
- command to registerpublic void registerShutdownTask(java.lang.Runnable task)
task
- shutdown task to run at service shutdown timepublic void start()
protected org.mortbay.jetty.Server buildAdminService()
protected AbstractAdminCommand buildShutdownCommand()
AbstractAdminCommand
which shutdowns this admin service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |