Ajocado API 1.0.0.Alpha2

org.jboss.arquillian.ajocado.interception
Interface CommandInterceptor


public interface CommandInterceptor

Interface for implementors of command interception.

Each implementor must satisfy, that in the intercept(CommandContext) method body will be called at least once method from current context CommandContext.invoke(). This method also returns the return value of executing given command on associated commandProcessor.

Version:
$Revision$
Author:
Lukas Fryc

Method Summary
 void intercept(CommandContext ctx)
          When processing custom logic must satisfy, that at least once will be called method CommandContext.invoke().
 

Method Detail

intercept

void intercept(CommandContext ctx)
               throws CommandInterceptionException
When processing custom logic must satisfy, that at least once will be called method CommandContext.invoke(). It's entry point for passing the logic to next interceptor until the associated interceptors aren't all triggered, then commandProcess will execute given command and it's return value will bubble back to each interceptor as return value of CommandContext.invoke() method.

Parameters:
ctx - the current command context
Throws:
CommandInterceptionException - if the subsequent interceptor doesn't call CommandContext.invoke() in it's intercept(CommandContext) method body.

Ajocado API 1.0.0.Alpha2

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.