Class CommandSupport

java.lang.Object
org.glassfish.api.admin.CommandSupport

public final class CommandSupport extends Object
Utility class for command framework. Currently it just provides hooks for command runner, to extend command functionality using aspects. It might be extended in future with more listeners for command life cycle phases, and additional utility methods. This class is in development and is subject to change.
Author:
andriy.zhdanov
  • Constructor Details

    • CommandSupport

      public CommandSupport()
  • Method Details

    • getParamValue

      public static String getParamValue(AdminCommand command, String name)
      Get parameter value for a command.
      Parameters:
      command -
      name - parameter name
      Returns:
      parameter value or null in case of any problem.
    • getParamValue

      public static <T> T getParamValue(AdminCommand command, String name, Class<T> paramType)
      Get parameter value for a command.
      Parameters:
      command -
      name - parameter name
      paramType - expected return type
      Returns:
      parameter value or null in case of any problem.
    • init

      public static void init(org.glassfish.hk2.api.ServiceLocator serviceLocator, AdminCommand command, AdminCommandContext context, Job instance)
      Execute aspects when command is just completely initialized, i..e injected with parameters.
    • done

      public static void done(org.glassfish.hk2.api.ServiceLocator serviceLocator, AdminCommand command, Job instance, boolean isNotify)
      Execute aspects when command is finished successfully or not.
    • done

      public static void done(org.glassfish.hk2.api.ServiceLocator serviceLocator, AdminCommand command, Job instance)
    • createWrappers

      public static AdminCommand createWrappers(org.glassfish.hk2.api.ServiceLocator serviceLocator, CommandModel model, AdminCommand command, ActionReport report)
      Execute wrapping aspects, see AsyncImpl for example.