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(Set<Annotation> annotations,
List<? extends ParameterData<?>> parameters,
Object[] args,
CommandContext context)
Called after the parameter is invoked.
|
boolean |
preInvoke(Set<Annotation> annotations,
List<? extends ParameterData<?>> parameters,
Object[] args,
CommandContext context)
Called before the parameter is invoked.
|
boolean |
preProcess(Set<Annotation> annotations,
List<? extends ParameterData<?>> parameters,
CommandContext context)
Called before parameters are processed.
|
void |
updateDescription(Set<Annotation> annotations,
List<? extends ParameterData<?>> parameters,
SettableDescription 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 Require annotation.
For simple InvokeHandler, an object can implement both this
interface and InvokeHandler.
createInvokeHandler in interface InvokeListenerpublic boolean preProcess(Set<Annotation> annotations, List<? extends ParameterData<?>> parameters, CommandContext context) throws CommandException, ParameterException
InvokeHandlerpreProcess in interface InvokeHandlerannotations - set of annotations that apply to the commandparameters - the list of parameterscontext - the contextCommandException - can be thrown for an error, which will stop invocationParameterException - on parameter errorpublic boolean preInvoke(Set<Annotation> annotations, List<? extends ParameterData<?>> parameters, Object[] args, CommandContext context) throws ParameterException, UnconsumedParameterException
InvokeHandlerpreInvoke in interface InvokeHandlerannotations - set of annotations that apply to the commandparameters - the list of parametersargs - the arguments to be given to the methodcontext - the contextParameterException - on parameter errorUnconsumedParameterExceptionpublic void postInvoke(Set<Annotation> annotations, List<? extends ParameterData<?>> parameters, Object[] args, CommandContext context)
InvokeHandlerpostInvoke in interface InvokeHandlerannotations - set of annotations that apply to the commandparameters - the list of parametersargs - the arguments to be given to the methodcontext - the contextpublic void updateDescription(Set<Annotation> annotations, List<? extends ParameterData<?>> parameters, SettableDescription description)
InvokeListenerCommandCallable by a ParametricBuilder,
this will be called in case the description needs to be updated.updateDescription in interface InvokeListenerupdateDescription in class AbstractInvokeListenerannotations - the annotations on the commandparameters - a list of parametersdescription - the description to be updatedCopyright © 2015. All Rights Reserved.