Package org.apache.velocity.app.event
Class MethodExceptionEventHandler.MethodExceptionExecutor
- java.lang.Object
-
- org.apache.velocity.app.event.MethodExceptionEventHandler.MethodExceptionExecutor
-
- All Implemented Interfaces:
EventHandlerMethodExecutor
- Enclosing interface:
- MethodExceptionEventHandler
public static class MethodExceptionEventHandler.MethodExceptionExecutor extends java.lang.Object implements EventHandlerMethodExecutor
Defines the execution strategy for methodException- Since:
- 1.5
-
-
Constructor Summary
Constructors Constructor Description MethodExceptionExecutor(Context context, java.lang.Class claz, java.lang.String method, java.lang.Exception e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(EventHandler handler)
Call the method methodException()java.lang.Object
getReturnValue()
Get return value at end of all the iterationsboolean
isDone()
Only run the first MethodExceptionEventHandler
-
-
-
Field Detail
-
context
private Context context
-
claz
private java.lang.Class claz
-
method
private java.lang.String method
-
e
private java.lang.Exception e
-
result
private java.lang.Object result
-
executed
private boolean executed
-
-
Constructor Detail
-
MethodExceptionExecutor
MethodExceptionExecutor(Context context, java.lang.Class claz, java.lang.String method, java.lang.Exception e)
-
-
Method Detail
-
execute
public void execute(EventHandler handler) throws java.lang.Exception
Call the method methodException()- Specified by:
execute
in interfaceEventHandlerMethodExecutor
- Parameters:
handler
- call the appropriate method on this handler- Throws:
java.lang.Exception
- generic exception thrown by methodException event handler method call
-
getReturnValue
public java.lang.Object getReturnValue()
Description copied from interface:EventHandlerMethodExecutor
Get return value at end of all the iterations- Specified by:
getReturnValue
in interfaceEventHandlerMethodExecutor
- Returns:
- null if no return value is required
-
isDone
public boolean isDone()
Only run the first MethodExceptionEventHandler- Specified by:
isDone
in interfaceEventHandlerMethodExecutor
- Returns:
- true after this is executed once.
-
-