org.n0pe.asadmin
Class AsAdmin

java.lang.Object
  extended by org.n0pe.asadmin.AsAdmin

public class AsAdmin
extends Object

asadmin command execution facility built as a multipleton which discriminator is a configuration provider. TODO : allows AsAdminCommands to provide input lines for stdin, implements this command : echo y | asadmin generate-diagnostic-report --outputfile report-dosadi.jar domainName TODO : handle asadmin invocation return codes with exceptions

Author:
Paul Merlin , Christophe Souvignier

Field Summary
static String ASADMIN_COMMAND_NAME
           
static String HOST_OPT
           
static String PASSWORDFILE_OPT
           
static String PORT_OPT
           
static String SECURE_OPT
           
static String USER_OPT
           
 
Method Summary
static String[] buildProcessParams(IAsAdminCmd cmd, IAsAdminConfig config)
           
static AsAdmin getInstance(IAsAdminConfig config)
          Get a asadmin instance configured with the given configuration provider.
 void run(AsAdminCmdList cmdList)
          Run the given list of AsAdmin command.
 void run(IAsAdminCmd cmd)
          Run the given AsAdmin command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOST_OPT

public static final String HOST_OPT
See Also:
Constant Field Values

PORT_OPT

public static final String PORT_OPT
See Also:
Constant Field Values

SECURE_OPT

public static final String SECURE_OPT
See Also:
Constant Field Values

USER_OPT

public static final String USER_OPT
See Also:
Constant Field Values

PASSWORDFILE_OPT

public static final String PASSWORDFILE_OPT
See Also:
Constant Field Values

ASADMIN_COMMAND_NAME

public static String ASADMIN_COMMAND_NAME
Method Detail

getInstance

public static AsAdmin getInstance(IAsAdminConfig config)
Get a asadmin instance configured with the given configuration provider.

Parameters:
config -
Returns:

run

public void run(AsAdminCmdList cmdList)
         throws AsAdminException
Run the given list of AsAdmin command.

Parameters:
cmdList - AsAdmin commands to be run
Throws:
AsAdminException - AsAdminException

run

public void run(IAsAdminCmd cmd)
         throws AsAdminException
Run the given AsAdmin command.

Parameters:
cmd - AsAdmin command to be run
Throws:
AsAdminException - AsAdminException

buildProcessParams

public static String[] buildProcessParams(IAsAdminCmd cmd,
                                          IAsAdminConfig config)


Copyright © 2011. All Rights Reserved.