net.customware.gwt.dispatch.shared
Class BatchAction

java.lang.Object
  extended by net.customware.gwt.dispatch.shared.BatchAction
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable, Action<BatchResult>

public class BatchAction
extends Object
implements Action<BatchResult>

This provides a simple way to send multiple actions to be executed in sequence. If any fail, the rules for the BatchAction.OnException value provided in the constructor determine the outcome.

Author:
David Peterson

Nested Class Summary
static class BatchAction.OnException
           
 
Constructor Summary
BatchAction(BatchAction.OnException onException, Action<?>... actions)
          Constructs a new batch action, which will attempt to execute the provided list of actions in order.
 
Method Summary
 Action<?>[] getActions()
          The list of actions to execute.
 BatchAction.OnException getOnException()
          The expected behaviour if any of the sub-actions throw an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchAction

public BatchAction(BatchAction.OnException onException,
                   Action<?>... actions)
Constructs a new batch action, which will attempt to execute the provided list of actions in order. If there is a failure, it will follow the rules specified by onException.

Parameters:
onException - If there is an exception, specify the behaviour.
actions - The list of actions to execute.
Method Detail

getOnException

public BatchAction.OnException getOnException()
The expected behaviour if any of the sub-actions throw an exception.

Returns:
The exception handling behaviour.

getActions

public Action<?>[] getActions()
The list of actions to execute.

Returns:
The actions.


Copyright © 2011 customware.net. All Rights Reserved.