public class LegacyCommandsHandler extends AbstractInvokeListener implements InvokeHandler
| Constructor and Description |
|---|
LegacyCommandsHandler() |
| Modifier and Type | Method and Description |
|---|---|
InvokeHandler |
createInvokeHandler()
Create a new invocation handler.
|
void |
postInvoke(Object object,
Method method,
ParameterData[] parameters,
Object[] args,
CommandContext context)
Called after the parameter is invoked.
|
void |
preInvoke(Object object,
Method method,
ParameterData[] parameters,
Object[] args,
CommandContext context)
Called before the parameter is invoked.
|
void |
preProcess(Object object,
Method method,
ParameterData[] parameters,
CommandContext context)
Called before parameters are processed.
|
void |
updateDescription(Object object,
Method method,
ParameterData[] parameters,
SimpleDescription description)
During creation of a
CommandCallable by a ParametricBuilder,
this will be called in case the description needs to be updated. |
public InvokeHandler createInvokeHandler()
InvokeListenerAn example use of an InvokeHandler would be to verify permissions
added by the CommandPermissions annotation.
For simple InvokeHandler, an object can implement both this
interface and InvokeHandler.
createInvokeHandler in interface InvokeListenerpublic void preProcess(Object object, Method method, ParameterData[] parameters, CommandContext context) throws CommandException, ParameterException
InvokeHandlerpreProcess in interface InvokeHandlerobject - the objectmethod - the methodparameters - the list of parameterscontext - the contextCommandException - can be thrown for an error, which will stop invocationParameterException - on parameter errorpublic void preInvoke(Object object, Method method, ParameterData[] parameters, Object[] args, CommandContext context) throws ParameterException
InvokeHandlerpreInvoke in interface InvokeHandlerobject - the objectmethod - the methodparameters - the list of parametersargs - the arguments to be given to the methodcontext - the contextParameterException - on parameter errorpublic void postInvoke(Object object, Method method, ParameterData[] parameters, Object[] args, CommandContext context)
InvokeHandlerpostInvoke in interface InvokeHandlerobject - the objectmethod - the methodparameters - the list of parametersargs - the arguments to be given to the methodcontext - the contextpublic void updateDescription(Object object, Method method, ParameterData[] parameters, SimpleDescription description)
InvokeListenerCommandCallable by a ParametricBuilder,
this will be called in case the description needs to be updated.updateDescription in interface InvokeListenerupdateDescription in class AbstractInvokeListenerobject - the objectmethod - the methodparameters - a list of parametersdescription - the description to be updatedCopyright © 2010-2014. All Rights Reserved.