Java Doc for ItsNatServlet.java in  » Ajax » ItsNat » org » itsnat » core » 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 » Ajax » ItsNat » org.itsnat.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.itsnat.core.ItsNatServlet

All known Subclasses:   org.itsnat.impl.core.ItsNatServletImpl,
ItsNatServlet
public interface ItsNatServlet (Code)
Is the ItsNat wrapper of the javax.servlet.Servlet object. Bridges the normal servlet infrastructure with ItsNat.

To bridge a standard Servlet with ItsNat call ItsNat.get().createItsNatServlet(this) into the overloaded Servlet.init(ServletConfig) method. This call creates a new ItsNatServlet bound to the standard Servlet.

Use this init method to setup the ItsNatServlet (using ItsNatServletConfig ), to register page and fragment templates (calling ItsNatServlet.registerDocumentTemplate(String,String,String) and ItsNatServlet.registerDocFragmentTemplate(String,String,String) ) and to register ItsNat request listeners ( ItsNatServletRequestListener ).

To redirect normal requests to ItsNat call the method ItsNatServlet.processRequest(javax.servlet.ServletRequest,javax.servlet.ServletResponse) .


author:
   Jose Maria Arranz Santamaria
See Also:   org.itsnat.core.http.HttpServletWrapper




Method Summary
public  voidaddCreateItsNatComponentListener(CreateItsNatComponentListener listener)
     Adds a new user defined component factory.
public  voidaddItsNatServletRequestListener(ItsNatServletRequestListener listener)
     Registers a new ItsNat request listener.
public  voidaddRemoteControlEventListener(RemoteControlEventListener listener)
     Adds a remote control listener to this servlet.
public  DocFragmentTemplategetDocFragmentTemplate(String name)
     Returns the document fragment template registered with the specified name.
Parameters:
  name - the name used to look for.
public  DocumentTemplategetDocumentTemplate(String name)
     Returns the document template registered with the specified name.
Parameters:
  name - the name used to look for.
public  ItsNatgetItsNat()
     Returns the ItsNat "root" object used to create this servlet.
public  ItsNatServletConfiggetItsNatServletConfig()
     Returns the utility object used to setup the ItsNat servlet.
public  ItsNatServletContextgetItsNatServletContext()
     Returns the ItsNat application context this ItsNat servlet belongs to.
public  ServletgetServlet()
     Returns the wrapped javax.servlet.Servlet object.
public  voidprocessRequest(ServletRequest request, ServletResponse response)
     Called to redirect a normal servlet request to the ItsNat servlet.
public  DocFragmentTemplateregisterDocFragmentTemplate(String name, String mime, String path)
     Registers a file used as a document fragment template with the specified name and MIME type.

The specified MIME type may be different to the "intrinsic" MIME of the specified file.

public  DocumentTemplateregisterDocumentTemplate(String name, String mime, String path)
     Registers a file used as a document template with the specified name and MIME type.

The specified MIME type may be different to the "intrinsic" MIME of the specified file.

public  voidremoveCreateItsNatComponentListener(CreateItsNatComponentListener listener)
     Removes the specified user defined component factory.
public  voidremoveItsNatServletRequestListener(ItsNatServletRequestListener listener)
     Unregisters the specified request listener.
public  voidremoveRemoteControlEventListener(RemoteControlEventListener listener)
     Removes the specified remote control listener.



Method Detail
addCreateItsNatComponentListener
public void addCreateItsNatComponentListener(CreateItsNatComponentListener listener)(Code)
Adds a new user defined component factory. This listener is called when the framework needs to create a component instance.

The listener is called before calling the template listener counterparts (if defined).


Parameters:
  listener - the listener factory to register.
See Also:   ItsNatServlet.removeCreateItsNatComponentListener(CreateItsNatComponentListener)
See Also:   DocumentTemplate.addCreateItsNatComponentListener(CreateItsNatComponentListener)



addItsNatServletRequestListener
public void addItsNatServletRequestListener(ItsNatServletRequestListener listener)(Code)
Registers a new ItsNat request listener. This listener is called when this ItsNat servlet receives a new client request.

If an ItsNatDocument is involved, this listener is called before listeners registered in the template. Typical use is for logging, preprocessing, filtering etc.


Parameters:
  listener - the listener to register.
See Also:   ItsNatServlet.removeItsNatServletRequestListener(ItsNatServletRequestListener)
See Also:   DocumentTemplate.addItsNatServletRequestListener(ItsNatServletRequestListener)
See Also:   ItsNatServlet.processRequest(javax.servlet.ServletRequest,javax.servlet.ServletResponse)



addRemoteControlEventListener
public void addRemoteControlEventListener(RemoteControlEventListener listener)(Code)
Adds a remote control listener to this servlet. This listener is called when a remote view/control is requested to control a document loaded using this servlet.

The listener is called before calling the template and document listener counterparts (if defined).


Parameters:
  listener - the listener to add.
See Also:   ItsNatServlet.removeRemoteControlEventListener(RemoteControlEventListener)
See Also:   DocumentTemplate.addRemoteControlEventListener(RemoteControlEventListener)
See Also:   ItsNatDocument.addRemoteControlEventListener(RemoteControlEventListener)



getDocFragmentTemplate
public DocFragmentTemplate getDocFragmentTemplate(String name)(Code)
Returns the document fragment template registered with the specified name.
Parameters:
  name - the name used to look for. the document fragment template with this name or null if not found.



getDocumentTemplate
public DocumentTemplate getDocumentTemplate(String name)(Code)
Returns the document template registered with the specified name.
Parameters:
  name - the name used to look for. the document template with this name or null if not found.



getItsNat
public ItsNat getItsNat()(Code)
Returns the ItsNat "root" object used to create this servlet. the parent ItsNat object.
See Also:   ItsNat.createItsNatServlet(javax.servlet.Servlet)



getItsNatServletConfig
public ItsNatServletConfig getItsNatServletConfig()(Code)
Returns the utility object used to setup the ItsNat servlet. the configuration object.



getItsNatServletContext
public ItsNatServletContext getItsNatServletContext()(Code)
Returns the ItsNat application context this ItsNat servlet belongs to. the context object.



getServlet
public Servlet getServlet()(Code)
Returns the wrapped javax.servlet.Servlet object. the wrapped servlet object.



processRequest
public void processRequest(ServletRequest request, ServletResponse response)(Code)
Called to redirect a normal servlet request to the ItsNat servlet.

ItsNat requests are processed by the registered ItsNatServletRequestListener objects.


Parameters:
  request - the standard servlet request.
Parameters:
  response - the standard servlet response.



registerDocFragmentTemplate
public DocFragmentTemplate registerDocFragmentTemplate(String name, String mime, String path)(Code)
Registers a file used as a document fragment template with the specified name and MIME type.

The specified MIME type may be different to the "intrinsic" MIME of the specified file. For instance the loaded file may be XHTML (application/xhtml+xml) but it can be registered as HTML (text/html) to achieve the maximum compatibility.

A markup template file is a normal (X)HTML or XML file. The fragment part is:

  1. (X)HTML: the node group below the <head> and <body>. They are two fragments, an <itsnat:include> tag can select the appropriated fragment or using the concrete org.itsnat.core.html.HTMLDocFragmentTemplate method.
  2. XML: the node group below the root element. The root element tag can have any name.

Parameters:
  name - the name used to identify the template.
Parameters:
  mime - the MIME type.
Parameters:
  path - the file path of the template.
See Also:   ItsNatServlet.registerDocumentTemplate(String,String,String)
See Also:   ItsNatServlet.getDocFragmentTemplate(String)



registerDocumentTemplate
public DocumentTemplate registerDocumentTemplate(String name, String mime, String path)(Code)
Registers a file used as a document template with the specified name and MIME type.

The specified MIME type may be different to the "intrinsic" MIME of the specified file. For instance the loaded file may be XHTML (application/xhtml+xml) but it can be registered as HTML (text/html) to achieve the maximum compatibility.

A markup template file is a normal (X)HTML or XML file.
Parameters:
  name - the name used to identify the template.
Parameters:
  mime - the MIME type.
Parameters:
  path - the file path of the template.
See Also:   ItsNatServlet.registerDocFragmentTemplate(String,String,String)
See Also:   ItsNatServlet.getDocumentTemplate(String)



removeCreateItsNatComponentListener
public void removeCreateItsNatComponentListener(CreateItsNatComponentListener listener)(Code)
Removes the specified user defined component factory.
Parameters:
  listener - the listener factory to remove.
See Also:   ItsNatServlet.addCreateItsNatComponentListener(CreateItsNatComponentListener)



removeItsNatServletRequestListener
public void removeItsNatServletRequestListener(ItsNatServletRequestListener listener)(Code)
Unregisters the specified request listener.
Parameters:
  listener - the request listener to remove.
See Also:   ItsNatServlet.addItsNatServletRequestListener(ItsNatServletRequestListener)
See Also:   



removeRemoteControlEventListener
public void removeRemoteControlEventListener(RemoteControlEventListener listener)(Code)
Removes the specified remote control listener.
Parameters:
  listener - the listener to remove.
See Also:   ItsNatServlet.addRemoteControlEventListener(RemoteControlEventListener)



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