org.inria.ns.reflex.processor.xcl
Class ExitAction

java.lang.Object
  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.processor.xcl.ExitAction
All Implemented Interfaces:
Executable, Presentable, NamespaceContextFactory

public class ExitAction
extends AbstractAction

The <xcl:exit> element exits from the current procedure.

<xcl:exit/>

An optionnal attribute level indicates the number of procedures to exit (in stack order).

<xcl:exit level="2"/>

To terminate execution, use :

<xcl:exit level="0"/>

Author:
Philippe Poulard
See Also:
LogicAction, CallAction, ExitException

Nested Class Summary
 
Nested classes/interfaces inherited from class org.inria.ns.reflex.processor.core.AbstractAction
AbstractAction.ParameterAdapter, AbstractAction.UselessAction
 
Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
 
Constructor Summary
ExitAction(int level, Node node, AbstractAction parent)
          Creates a new instance of ExitAction.
ExitAction(Node node, AbstractAction parent)
          Creates a new instance of ExitAction.
 
Method Summary
 void runAction(DataSet dataSet)
          Execute the action by launching an ExitException.
static AbstractAction unmarshal(AbstractAction parent, Element e)
          XML unmarshaller for ExitAction.
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction
addAction, addFallbackAction, createContext, getCanonicalPath, getFallbackAction, getLocalFallbackAction, getLogger, getNamespaceContext, getNode, getParent, recover, recover, removeFallbackAction, reorganize, run, runActions, toPrettyString, toPrettyString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExitAction

public ExitAction(Node node,
                  AbstractAction parent)
Creates a new instance of ExitAction.

Parameters:
node - The node from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.

ExitAction

public ExitAction(int level,
                  Node node,
                  AbstractAction parent)
Creates a new instance of ExitAction.

Parameters:
level - The number of procedures to exit. 0 for all.
node - The node from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.
Method Detail

unmarshal

public static AbstractAction unmarshal(AbstractAction parent,
                                       Element e)
                                throws XMLException
XML unmarshaller for ExitAction.

Parameters:
parent - The action depending from
e - The XML element to unmarshall.
Returns:
The ExitAction created.
Throws:
UnmarshalException - When the element and its content is not those expected.
XMLException

runAction

public void runAction(DataSet dataSet)
               throws ExecutionException,
                      XPathException
Execute the action by launching an ExitException.

Overrides:
runAction in class AbstractAction
Parameters:
dataSet - The set of datas used when the action is running.
Throws:
ExecutionException - If the action can't be performed.
XPathException
See Also:
ExitException