Identifying a parameter of an asadmin subcommand enables GlassFish Server to perform the following operations at runtime on the parameter:
Validation. The GlassFish Server determines whether all required parameters are specified and returns an error if any required parameter is omitted.
Injection. Before the subcommand runs, the GlassFish Server injects each parameter into the required field or method before the subcommand is run.
Usage message generation. The GlassFish Server uses reflection to obtain the list of parameters for a subcommand and to generate the usage message from this list.
Localized string display. If the subcommand supports internationalization and if localized strings are available, the GlassFish Server can automatically obtain the localized strings for a subcommand and display them to the user.
To identify a parameter of a subcommand, annotate the declaration of the item that is associated with the parameter with the org.glassfish.api.Param annotation. This item is either the field or setter method that is associated with the parameter.
To specify the properties of the parameter, use the elements of the @Param annotation as explained in the sections that follow.