Java Doc for ElementAware.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » engine » 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 » Web Framework » rife 1.6.1 » com.uwyn.rife.engine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.uwyn.rife.engine.ElementAware

All known Subclasses:   com.uwyn.rife.engine.testelements.inheritance.InterfaceParent,  com.uwyn.rife.engine.testelements.engine.DeploymentInterface,  com.uwyn.rife.engine.testelements.continuations.SimpleInterface,  com.uwyn.rife.engine.Element,  com.uwyn.rife.engine.testelements.engine.InitializeInterface,  com.uwyn.rife.engine.testelements.engine.SimpleInterface,
ElementAware
public interface ElementAware (Code)
This interface contains all the methods that a class must implement to become an element for the web engine.

For convenience, you can also extend the abstract Element class which gives you the benefit of having local access to all its methods and having no abstract methods to implement.

Elements are the smallest logical building blocks of a RIFE web application. They are declared in the site structure and when a request arrives that maps to an element declaration, a new instance of the implementation is created. Element instances are thus never shared amongst requests, unless you are into a continuation tree that is set up to not clone its variable stack. This makes the logic inside elements fully thread-safe.

The ElementAware.processElement method is the default entry point and will be called when a request arrives.

You're free to add any other method to this class. RIFE provides a convention syntax for methods that are supposed to handle submissions. The name of the submission is capitalized and the "do" literal is prepended. RIFE then looks for a method with that name, the public void modifiers and no arguments. When such a method is found, it is executed instead of processElement(). Nothing prevents you however from handling submissions conditionally in the processElement() method though, without isolating the logic in a separate method. For example, when a submission arrives with the name "storeUser", RIFE will look for the method:

public void doStoreUser()
If it's present, it will be called instead of processElement().

Often you want to initialize common data structures, both for regular requests as for submissions. The ElementSupport.initialize method can be used for that. It will be the first element's method that is called in a fully setup element context. When extending Element , the easiest is to simply overload the ElementSupport.initialize method, otherwise an ElementInitializer has to be registered in the ElementAware.noticeElement method.

RIFE also supports setter-based dependency injection for element properties, inputs, global variables and submission parameters. If setter methods are present that correspond to declared variable names, they will be automatically invoked with the available values. Of course, you can always retrieve values through the dedicated ElementSupport methods for ElementSupport.getProperty properties , ElementSupport.getInput inputs and ElementSupport.getParametersubmission parameters .
author:
   Geert Bevin (gbevin[remove] at uwyn dot com)
version:
   $Revision: 3634 $
since:
   1.0





Method Summary
public  voidnoticeElement(ElementSupport elementSupport)
     This method is called immediately after the instantiation of the element to provide the support object that allows the element to function in the current context.
public  voidprocessElement()
     The default entry point that will be called when a request arrives.



Method Detail
noticeElement
public void noticeElement(ElementSupport elementSupport)(Code)
This method is called immediately after the instantiation of the element to provide the support object that allows the element to function in the current context. Note that the context is not setup yet, the bridge object is merely provided at this stage.

It's good practice to store the elementSupport parameter in a member variable of the element, making it possible to use it from any method in the element.

This method should also be used to provide the elementSupport instance with an ElementDeployer , an ElementInitializer and an ElementChildTrigger , if they are needed.
Parameters:
  elementSupport - the ElementSupport instance for thisrequest and this element
See Also:   ElementSupport
since:
   1.0




processElement
public void processElement() throws EngineException(Code)
The default entry point that will be called when a request arrives.
since:
   1.0



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