Java Doc for Interpreter.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » flow » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.flow 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.components.flow.Interpreter

All known Subclasses:   org.apache.cocoon.components.flow.AbstractInterpreter,
Interpreter
public interface Interpreter (Code)
The interface to the flow scripting languages. This interface is for a component, which implements the appropriate language to be used for describing the flow. A system could have multiple components that implement this interface, each of them for a different scripting language.

A flow script defines what is the page flow in an interactive Web application. Usually the flow is defined in a high level programming language which provides the notion of continuations, which allows for the flow of the application to be described as a simple procedural program, without having to think about the application as a finite state machine which changes its internal state on each HTTP request from the client browser.

However an implementation may choose to use its own representation of an application, which may include XML representations of finite state machines. Note: this API has no provision for such implementations.

The component represented by this interface is called in three situations:

  • From the sitemap, to invoke a top level function defined in a given implementation language of the flow. This is done from the * sitemap using the construction:

     <map:call function="..." language="..."/>
     

    The language attribute can be ignored if the * default language is used.

  • From the sitemap, to continue a previously started computation. A previously started computation is saved in the form of a continuation inside the flow implementation language.

    This case is similar with the above one, but the function invoked has a special name, specific to each language implementation. See the language implementation for more information on the function name and the arguments it receives.

  • From a program in the flow layer. This is done to invoke a pipeline defined in the sitemap, to generate the response of the request.


author:
   Ovidiu Predescu
since:
   March 11, 2002
version:
   CVS $Id: Interpreter.java 433543 2006-08-22 06:22:54Z crossley $

Inner Class :public static class Argument

Field Summary
final public static  StringROLE
    


Method Summary
 voidcallFunction(String funName, List params, Redirector redirector)
     This method is called from the sitemap, using the syntax
 <map:call function="..."/>
 
The method will execute the named function, which must be defined in the given language.
 voidforwardTo(String uri, Object bizData, WebContinuation continuation, Redirector redirector)
     Forward the request to a Cocoon pipeline.
 StringgetInterpreterID()
    
 voidhandleContinuation(String continuationId, List params, Redirector redirector)
     Continues a previously started processing.
 voidsetInterpreterID(String interpreterID)
     Set the unique ID for this interpreter.

Field Detail
ROLE
final public static String ROLE(Code)





Method Detail
callFunction
void callFunction(String funName, List params, Redirector redirector) throws Exception(Code)
This method is called from the sitemap, using the syntax
 <map:call function="..."/>
 
The method will execute the named function, which must be defined in the given language. There is no assumption made on how various arguments are passed to the function.

The params argument is a List object that contains Interpreter.Argument instances, representing the parameters to be passed to the called function. An Argument instance is a key-value pair, where the key is the name of the parameter, and the value is its desired value. Most languages will ignore the name value and simply pass to the function, in a positional order, the values of the argument. Some languages however can pass the arguments in a different order than the original prototype of the function. For these languages the ability to associate the actual argument with a formal parameter using its name is essential.

A particular language implementation may decide to put the environment, request, response etc. objects in the dynamic scope available to the function at the time of the call. Other implementations may decide to pass these as arguments to the called function.

The current implementation assumes the sitemap implementation is TreeProcessor.
Parameters:
  funName - a String value, the name of thefunction to call
Parameters:
  params - a List object whose components areCallFunctionNode.Argument instances. The interpretation of theparameters is left to the actual implementation of theinterpreter.
Parameters:
  redirector - a Redirector used to call views




forwardTo
void forwardTo(String uri, Object bizData, WebContinuation continuation, Redirector redirector) throws Exception(Code)
Forward the request to a Cocoon pipeline.
Parameters:
  uri - a String, the URI of the forwarded request
Parameters:
  bizData - an Object, the business data objectto be made available to the forwarded pipeline
Parameters:
  continuation - a WebContinuation, thecontinuation to be called to resume the processing
Parameters:
  redirector - a Redirector used to call views
exception:
  Exception - if an error occurs



getInterpreterID
String getInterpreterID()(Code)
the unique ID for this interpreter.



handleContinuation
void handleContinuation(String continuationId, List params, Redirector redirector) throws Exception(Code)
Continues a previously started processing. The continuation object where the processing should start from is indicated by the continuationId string.
Parameters:
  continuationId - a String value
Parameters:
  params - a List value, containing theparameters to be passed when invoking the continuation. Asopposed to the parameters passed by callFunction,these parameters will only become available in the language'senvironment, if at all.
Parameters:
  redirector - a Redirector used to call views
exception:
  Exception - if an error occurs



setInterpreterID
void setInterpreterID(String interpreterID)(Code)
Set the unique ID for this interpreter.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.