Identifying a parameter of an asadmin subcommand enables Enterprise Server to perform the following operations at runtime on the parameter:
Validation. The Enterprise Server determines whether all required parameters are specified and returns an error if any required parameter is omitted.
Injection. Before the subcommand runs, the Enterprise Server injects each parameter into the required field or method before the subcommand is run.
Usage message generation. The Enterprise 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 Enterprise 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.