Package org.glassfish.api.admin
Class CommandSupport
java.lang.Object
org.glassfish.api.admin.CommandSupport
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
CommandSupport
public CommandSupport()
-
-
Method Details
-
getParamValue
Get parameter value for a command.- Parameters:
command
-name
- parameter name- Returns:
- parameter value or null in case of any problem.
-
getParamValue
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.
-