org.springframework.roo.shell
Interface ExecutionStrategy


public interface ExecutionStrategy

Strategy interface to permit the controlled execution of methods.

This interface is used to enable a Shell to execute methods in a consistent, system-wide manner. A typical use case is to ensure user interface commands are not executed concurrently when other background threads are performing certain operations.

Since:
1.0
Author:
Ben Alex

Method Summary
 Object execute(ParseResult parseResult)
          Executes the method indicated by the ParseResult.
 boolean isReadyForCommands()
          Indicates commands are able to be presented.
 

Method Detail

execute

Object execute(ParseResult parseResult)
               throws RuntimeException
Executes the method indicated by the ParseResult.

Parameters:
parseResult - that should be executed (never presented as null)
Returns:
an object which will be rendered by the Shell implementation (may return null)
Throws:
RuntimeException - which is handled by the Shell implementation

isReadyForCommands

boolean isReadyForCommands()
Indicates commands are able to be presented. This generally means all important system startup activities have completed.

Returns:
whether commands can be presented for processing at this time


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.