TURBINE

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 » TURBINE 
Turbine
License:Apache Software License
URL:http://turbine.apache.org/
Description:Turbine is a servlet based framework
Package NameComment
org.apache.turbine Turbine Servlet and Constants.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules Modules (Action, Screen, Layout, Navigation, Page) classes for the Turbine view.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules.actions Action class implementations.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules.actions.sessionvalidator Session validator classes to be used with Turbine apps that use security.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules.layouts Layout class implementations.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules.navigations Navigation class implementations.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules.pages Page class implementations.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules.scheduledjob
org.apache.turbine.modules.screens Screen class implementations.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.modules.screens.error Error Screen classes.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.om
org.apache.turbine.om.security Security object definitions for the Security Service.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.om.security.peer Hand rolled peers for the DB Security Service.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services Contains the Service framework for Turbine.

Services are singletons that have pluggable implementation and can participate in Turbine startup and shutdown.

What is a service?

  • Is a singleton - there is only one instance of it in the system i.e. memory or connections are allocated once only, and the internal state is common to all requesting clients.
  • Has pluggable implementation - you can use your own implementation if you need, just change an entry in TurbineResources.properties, and there you go.
  • Can access ServletConfig at system startup time to process relative paths and the like.
  • Can access RunData on the first Turbine doGet execution to get URL we're running under and the like.
  • Can initialize itself (allocate memory, make connctions) just before the client requests it for the first time. Services that are never used by the application will not allocate resources.
  • Can execute some action upon system shutdown e.g. close the opened connections.

The life cycle of a Service

A Service (or any other Initable, if we had any) is not supposed to do much in it's constructor. Especialy it should not allocate any costly resources like large memory structures, DB or network connections and the like. It may well happen that the Service is sitting in the config file, but the application does not need it, so allocating all resources at system startup might be a loss.

Early initialization is similar to the constructor. It is used to pass some information that the Service will need in it's future operation. UniqueId Service uses the HttpRequest object from the first Turbine invocation to determine URL this instance is runnign under, to generate instance ID. Early initialization method should process the configuration, store some values, but NOT allocate resources. There is still a chance that the Service will not be used. If the Service is ready to work (i.e. does not need any more objects being sent to it), and does not to allocate any resources during late initialization, the internal state can be changed so that getInit() returns true.

Late initialization happens when the Service is requested by the application for the first time. It should allocate any resources needed and chnge the state so that getInit() returns true. If getInit() returns false after init() is executed, the Service has malfunctioned.

After late initialization, the Service is ready to perform actions on behalf of the application.

When the Service is no longer needed (this usually happens when system is shutting down), the shutdown() method is called. shutdown() should deallocate all resources. If any error conditions occur they are ignored.

Initialization of services outside of the Turbine servlet

In the case where specific Turbine services are desired outside the context of the Turbine servlet, a Turbine JAR file can be used in conjunction with a properly configured TurbineResources.properties file to initialize a specific set of services to use in your application. The following sample code performs such initialization:

String webAppRoot = "/var/httpd/webapps";
String trProps = "/var/httpd/TurbineResources.properties";
try
{
    TurbineConfig cfg = new TurbineConfig(webAppRoot, trProps);
    cfg.init();
}
catch (Exception e)
{
    // If Turine fails to initialize, no logging service will be available.
    String msg = "Failed to initialize Turbine: " + e.getMessage();
    // Write directly to stderr to preserve the full stack trace.
    System.err.println(msg);
    e.printStackTrace();
    throw new Error(msg);
}

$Id: package.html 534527 2007-05-02 16:10:59Z tv $

org.apache.turbine.services.assemblerbroker Assemblerbroker Service looks for action, screen, page, layout classes based on class fragments.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.assemblerbroker.util The various lookup factories for the Assemblerbroker service.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.assemblerbroker.util.java Factories for the java class based view (all template views).
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.assemblerbroker.util.python Factory for the python / jython based view.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.avaloncomponent Avalon based component service to provide access to avalon components for Turbine applications.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.cache Global caching service for java objects.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.crypto Contains the Crypto Service providing you with a variety of Crypto algorithms.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.crypto.impl
org.apache.turbine.services.crypto.provider Algorithm providers for the Crypto Service.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.factory Contains a generic factory for generating new objects.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.intake The intake service can validate user input from HTML forms.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.intake.model
org.apache.turbine.services.intake.transform
org.apache.turbine.services.intake.validator Validators for the various intake field types.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.intake.xmlmodel
org.apache.turbine.services.jsonrpc The JSON-RPC Service supports JavaScript to Java AJAX communications between browsers and Turbine applications.
$Id$
org.apache.turbine.services.jsp JSP Service is used to provide Turbine with a Java Server page (JSP) based view.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.jsp.tags
org.apache.turbine.services.jsp.util
org.apache.turbine.services.localization This service provides access and tools for multilingual applications in Turbine.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.mimetype Provides mapping between MIME types and their corresponding file extensions.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.mimetype.util
org.apache.turbine.services.naming Naming Service provides access to JNDI naming contexts.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.pool The pool service can keep a stock of objects and recycle them.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.pull Provides application tools that are put into the context of a template view.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.pull.tools Pull Tools to be used in a template based view.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.pull.util
org.apache.turbine.services.rundata Rundata Service provides a factory for the request cycle data objects.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.schedule The scheduler service can run tasks in the background.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.security The security service can be used to authenticate users based on database information.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.security.db A security service implementation that used an SQL database for authentication.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.security.ldap An LDAP based security service implementation.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.security.passive Dummy Service to be used if no security is required.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.security.torque A security service implementation based on Torque generated peer classes.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.servlet Provides access to various resources from the web container.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.session The session service allows you to access session information of the servlet container.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.template Template Service maps template references to a view service and a template name.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.template.mapper The various mappers used by the Template service.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.template.modules.layouts
org.apache.turbine.services.template.modules.layouts.existing
org.apache.turbine.services.template.modules.layouts.existing.dflt
org.apache.turbine.services.template.modules.navigations
org.apache.turbine.services.template.modules.navigations.existing
org.apache.turbine.services.template.modules.navigations.existing.dflt
org.apache.turbine.services.template.modules.screens
org.apache.turbine.services.template.modules.screens.existing
org.apache.turbine.services.template.modules.screens.existing.dflt
org.apache.turbine.services.ui Provides skinning facilities for a Turbine web application.
$Id$
org.apache.turbine.services.uniqueid Returns unique identifiers for session tracking, cookies etc.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.upload The upload service processes data uploaded by the user from the browser.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.velocity Velocity Service is used to provide Turbine with a Velocity based view.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.xmlrpc The XML-RPC Service can be used to communicate with a remote application.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.services.xmlrpc.util
org.apache.turbine.services.xslt The XSLT Service can be used to translate XML documents into various output formats.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.test
org.apache.turbine.util Various utilities used in Turbine and for Turbine based applications.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.util.db.map
org.apache.turbine.util.hibernate
org.apache.turbine.util.jsp
org.apache.turbine.util.parser Parser for CGI parameters and path info data.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.util.pool Some helper classes and interfaces for the Pool Service.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.util.security Some helper classes and interfaces for the Security Service.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.util.template Template related utilities.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.util.uri URI generation and processing from Turbine based applications.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
org.apache.turbine.util.velocity Velocity related utility code.
$Id: package.html 534527 2007-05-02 16:10:59Z tv $
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.