| |
|
| java.lang.Object org.w3c.jigsaw.admin.JigKill
JigKill | public class JigKill (Code) | | Simple class used to save and/or kill Jigsaw.
- Options:
-u username User name (defaults to "admin")
-p password Password (required)
--username username Same as -u
--password password Same as -p
--save Save configuration of all servers
--stop Stop all servers
--ping check if servers are reachable
(The last argument is assumed to be the URL to the Admin server,
see Usage examples below...)
- Example usage:
- (be sure that jigsaw's
*.jar file is in CLASSPATH,
e.g. export CLASSPATH=~/Jigsaw/classes/jigsaw.zip:
${CLASSPATH} )
- - Save and exit the server
http://gyros.informatik.med.uni-giessen.de:
java org.w3c.jigsaw.admin.JigKill -u admin -p for#8pj
http://gyros.informatik.med.uni-giessen.de:8009/
- OR (using explicit options)
java org.w3c.jigsaw.admin.JigKill -u admin -p for#8pj
--save --stop http://gyros.informatik.med.uni-giessen.de:8009/
- - Stop a server (as fast as possible, e.g. for system shutdown):
java org.w3c.jigsaw.admin.JigKill -u admin -p for#8pj
--stop http://gyros.informatik.med.uni-giessen.de:8009/
- - Save the servers current configuration:
java org.w3c.jigsaw.admin.JigKill -u admin -p for#8pj
--save http://gyros.informatik.med.uni-giessen.de:8009/
- - Check if a server is still alive:
java org.w3c.jigsaw.admin.JigKill -u admin -p for#8pj
--ping http://gyros.informatik.med.uni-giessen.de:8009/
- Changes from V1.1 to 1.2:
- - Added
--stop option: Simply stop jigsaw quick&savely.
- - Added
--save option: Snapshot the current config
(something for a daily crontab job).
- - Added
--ping option to see if the server is still
running (usefull for scripts).
- - Added
--username and --password options
as aliases for -u and -p .
- JigKill now returns 0 for success and non-0 for failure
(of the requested operation) EVERYTIMES
(except the JVM cores) to make script-processing as much as easy.
- -u option now defaults to "admin", as jigsaw's
default config does.
- JigKill now saves all servers first before stopping them all
(first backup, then destroy...).
- ToDo:
- - Adding a
--restart option.
version: $Revision: 1.4 $ author: Benoît Mahé (bmahe@w3.org) author: Roland Mainz (Roland.Mainz@informatik.med.uni-giessen.de) |
Method Summary | |
protected void | doLoadResource(String cmd) Send a "command" to all servers and the admin server. | protected RemoteResource[] | getControls(RemoteResource admin) Get all the server's ControlResource.
Parameters: admin - the admin server (a RemoteResource) an array of RemoteResource exception: RemoteAccessException - if any remote error occurs. | public void | kill() Save the configuration of the servers and the admin server
and then kill all servers (including the admin server). | public static void | main(String args) Main program entry.
This method exits the JVM with either
JigKill.EXIT_SUCCESS EXIT_SUCCESS or
JigKill.EXIT_FAILURE EXIT_FAILURE for the requested operation. | public void | save() Save the configuration of the servers and the admin server. | public void | stop() Stop the servers and the admin server. | protected static void | usage() |
EXIT_FAILURE | final protected static int EXIT_FAILURE(Code) | | Exit value of the JVM on failure of the requested operation.
|
EXIT_SUCCESS | final protected static int EXIT_SUCCESS(Code) | | Exit value of the JVM on success of the requested operation.
|
JigKill | public JigKill(URL adminURL, String username, String password) throws RemoteAccessException(Code) | | Contructor.
Parameters: adminURL - the admin server URL Parameters: username - the username Parameters: password - the password |
|
|
|