The org.glassfish.api.admin.AdminCommandContext class provides the following services to an asadmin command:
Access to the parameters of the command
Logging
Reporting
To set the context of an asadmin command, pass an AdminCommandContext object to the execute method of your implementation.