public interface InvokeHandler
ParametricBuilder
.
Invocation handlers are created by InvokeListener
s. Multiple
listeners and handlers can be registered, and all be run. However, if one handler
throws an exception, future handlers will not execute and the command will
not execute (if thrown in
preInvoke(Object, Method, ParameterData[], Object[], CommandContext)
).
the factory
Modifier and Type | Method and Description |
---|---|
void |
postInvoke(java.lang.Object object,
java.lang.reflect.Method method,
ParameterData[] parameters,
java.lang.Object[] args,
CommandContext context)
Called after the parameter is invoked.
|
void |
preInvoke(java.lang.Object object,
java.lang.reflect.Method method,
ParameterData[] parameters,
java.lang.Object[] args,
CommandContext context)
Called before the parameter is invoked.
|
void |
preProcess(java.lang.Object object,
java.lang.reflect.Method method,
ParameterData[] parameters,
CommandContext context)
Called before parameters are processed.
|
void preProcess(java.lang.Object object, java.lang.reflect.Method method, ParameterData[] parameters, CommandContext context) throws CommandException, ParameterException
object
- the objectmethod
- the methodparameters
- the list of parameterscontext
- the contextCommandException
- can be thrown for an error, which will stop invocationParameterException
- on parameter errorvoid preInvoke(java.lang.Object object, java.lang.reflect.Method method, ParameterData[] parameters, java.lang.Object[] args, CommandContext context) throws CommandException, ParameterException
object
- the objectmethod
- the methodparameters
- the list of parametersargs
- the arguments to be given to the methodcontext
- the contextCommandException
- can be thrown for an error, which will stop invocationParameterException
- on parameter errorvoid postInvoke(java.lang.Object object, java.lang.reflect.Method method, ParameterData[] parameters, java.lang.Object[] args, CommandContext context) throws CommandException, ParameterException
object
- the objectmethod
- the methodparameters
- the list of parametersargs
- the arguments to be given to the methodcontext
- the contextCommandException
- can be thrown for an errorParameterException
- on parameter error