Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.command
Class CommandContextImpl

java.lang.Object
  extended by org.jboss.arquillian.ajocado.command.CommandContextImpl
All Implemented Interfaces:
CommandContext

public class CommandContextImpl
extends Object
implements CommandContext

This context holds the iterator over collection of interceptors, which will be triggered before the command will be passed to commandProcessor to execute.

Version:
$Revision$
Author:
Lukas Fryc

Method Summary
 String[] getArguments()
          Returns the arguments of the command.
 String getCommand()
          Returns the command.
 Object invoke()
           For each remaining interceptor in list call it's intercept method.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

invoke

public Object invoke()
              throws CommandInterceptorException

For each remaining interceptor in list call it's intercept method.

Watch if the following interceptor call's in it's CommandInterceptor.intercept(CommandContext) method body method invoke() at least once. If not, this interceptor will raise CommandInterceptorException.

Specified by:
invoke in interface CommandContext
Returns:
the return value of executing the command on given commandProcessor
Throws:
CommandInterceptorException - if the subsequent interceptor doesn't call invoke() in it's CommandInterceptor.intercept(CommandContext) method body.

getCommand

public String getCommand()
Returns the command.

Specified by:
getCommand in interface CommandContext
Returns:
the command

getArguments

public String[] getArguments()
Returns the arguments of the command.

Specified by:
getArguments in interface CommandContext
Returns:
the arguments of the command

toString

public String toString()
Overrides:
toString in class Object

Graphene Implementation 1.0.0.CR3

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.