org.inria.ns.reflex.util.wunit
Class ConversationAction

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

public class ConversationAction
extends AbstractAction

A <wunit:conversation> between non-visual Web client and an HTTP server or eventually an emulated servlet container.

An emulated servlet container offers means to examine and act on the server internals (request, response, session, servlet, context).

A servlet container can be emulated if the web deployment descriptor is supplied.

Author:
Philippe Poulard
See Also:
ServerEmulator

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
ConversationAction(Expression userAgent, Node node, AbstractAction parent)
          Create a new ConversationAction.
 
Method Summary
 String getUserAgent(DataSet dataSet)
          Return the user agent
 void runAction(DataSet dataSet)
          Execute the action by running the subactions within a Web emulator.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for ConversationAction.
 
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

ConversationAction

public ConversationAction(Expression userAgent,
                          Node node,
                          AbstractAction parent)
Create a new ConversationAction.

Parameters:
userAgent - The user agent to emulate.
node - The XML node used for unmarshalling.
parent - The parent action.
Method Detail

unmarshal

public static AbstractAction unmarshal(AbstractAction parent,
                                       Element element)
                                throws XMLException
XML unmarshaller for ConversationAction.

Parameters:
parent - The action depending from
element - The XML element to unmarshall.
Returns:
The ConversationAction 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 running the subactions within a Web emulator.

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

getUserAgent

public String getUserAgent(DataSet dataSet)
                    throws XPathException
Return the user agent

Parameters:
dataSet - The set of datas used when the action is running.
Returns:
The user agent.
Throws:
XPathException