org.springframework.shell.core
Interface ExecutionProcessor

All Superinterfaces:
CommandMarker

public interface ExecutionProcessor
extends CommandMarker

Extension interface allowing command provider to be called in a generic fashion just before, and right after, executing a command.


Method Summary
 void afterReturningInvocation(ParseResult invocationContext, Object result)
          Method called after successfully invoking the target command (described by ParseResult).
 void afterThrowingInvocation(ParseResult invocationContext, Throwable thrown)
          Method called after invoking the target command (described by ParseResult) had thrown an exception .
 ParseResult beforeInvocation(ParseResult invocationContext)
          Method called before invoking the target command (described by ParseResult).
 

Method Detail

beforeInvocation

ParseResult beforeInvocation(ParseResult invocationContext)
Method called before invoking the target command (described by ParseResult). Additionally, for advanced cases, the parse result itself effectively changing the invocation calling site.

Parameters:
invocationContext - target command context
Returns:
the invocation target

afterReturningInvocation

void afterReturningInvocation(ParseResult invocationContext,
                              Object result)
Method called after successfully invoking the target command (described by ParseResult).

Parameters:
invocationContext - target command context
result - the invocation result

afterThrowingInvocation

void afterThrowingInvocation(ParseResult invocationContext,
                             Throwable thrown)
Method called after invoking the target command (described by ParseResult) had thrown an exception .

Parameters:
invocationContext - target command context
thrown - the thrown object