Sun GlassFish Enterprise Server v3 Add-On Component Development Guide

Setting the Context of an asadmin Subcommand

The org.glassfish.api.admin.AdminCommandContext class provides the following services to an asadmin subcommand:

To set the context of an asadmin subcommand, pass an AdminCommandContext object to the execute method of your implementation.