Package org.glassfish.api.admin
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 Summary
Constructors Constructor Description CommandSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AdminCommand
createWrappers(org.glassfish.hk2.api.ServiceLocator serviceLocator, CommandModel model, AdminCommand command, ActionReport report)
Execute wrapping aspects, seeAsyncImpl
for example.static void
done(org.glassfish.hk2.api.ServiceLocator serviceLocator, AdminCommand command, Job instance)
static void
done(org.glassfish.hk2.api.ServiceLocator serviceLocator, AdminCommand command, Job instance, boolean isNotify)
Execute aspects when command is finished successfully or not.static String
getParamValue(AdminCommand command, String name)
Get parameter value for a command.static <T> T
getParamValue(AdminCommand command, String name, Class<T> paramType)
Get parameter value for a command.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.
-
-
-
Method Detail
-
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 nameparamType
- 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, seeAsyncImpl
for example.
-
-