org.apache.axis.client
Class AdminClient

java.lang.Object
  |
  +--org.apache.axis.client.AdminClient

public class AdminClient
extends java.lang.Object

An admin client object that can be used both from the command line and programmatically. The admin client supports simple logging that allows the output of its operations to be inspected in environments where System.out and System.err should not be used.

Author:
Rob Jellinghaus (robj@unrealities.com), Doug Davis (dug@us.ibm.com), Simeon Simeonov (simeons@macromedia.com)

Field Summary
protected  java.io.PrintWriter _log
           
 
Constructor Summary
AdminClient()
          Construct an admin client w/o a logger
AdminClient(java.io.OutputStream out)
          Construct an admin client with a logger
AdminClient(java.io.PrintWriter log)
          Construct an admin client with a logger
 
Method Summary
protected  void log(java.lang.String msg)
          Logs a message if a logger has been provided
static void main(java.lang.String[] args)
          Creates in instance of AdminClient and invokes process(args).
 java.lang.String process(java.lang.String[] args)
          Processes a set of administration commands.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected java.io.PrintWriter _log
Constructor Detail

AdminClient

public AdminClient()
Construct an admin client w/o a logger

AdminClient

public AdminClient(java.io.PrintWriter log)
Construct an admin client with a logger

AdminClient

public AdminClient(java.io.OutputStream out)
Construct an admin client with a logger
Method Detail

log

protected void log(java.lang.String msg)
            throws java.io.IOException
Logs a message if a logger has been provided

process

public java.lang.String process(java.lang.String[] args)
                         throws java.lang.Exception

Processes a set of administration commands.

The following commands are available:

If -l or -h -p -s are not set, the AdminClient will invoke http://localhost:8080/axis/servlet/AxisServlet.

Parameters:
args - Commands to process
Returns:
XML result or null in case of failure. In the case of multiple commands, the XML results will be concatenated, separated by \n
Throws:
java.lang.Exception - Could be an IO exception, an AxisFault or something else

main

public static void main(java.lang.String[] args)
Creates in instance of AdminClient and invokes process(args).

Diagnostic output goes to System.out.

Parameters:
args - Commands to process


Copyright © 2001 Apache XML Project. All Rights Reserved.