org.jboss.test.selenium.interception
Class CommandContext

java.lang.Object
  extended by org.jboss.test.selenium.interception.CommandContext

public class CommandContext
extends Object

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 CommandInterceptionException

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 CommandInterceptionException.

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

getCommand

public String getCommand()
Returns the command.

Returns:
the command

getArguments

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

Returns:
the arguments of the command

toString

public String toString()
Overrides:
toString in class Object


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