Java Doc for Handler.java in  » Web-Server » Brazil » sunlabs » brazil » server » 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 Server » Brazil » sunlabs.brazil.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


sunlabs.brazil.server.Handler

All known Subclasses:   sunlabs.brazil.tcl.TclHandler,  sunlabs.brazil.template.TemplateHandler,  sunlabs.brazil.handler.ResourceHandler,  sunlabs.brazil.handler.DynamicConfigHandler,  sunlabs.brazil.handler.ReflectHandler,  sunlabs.brazil.handler.NotFoundHandler,  sunlabs.brazil.handler.ProxyPropertiesHandler,  sunlabs.brazil.handler.PushHandler,  sunlabs.brazil.handler.GenericProxyHandler,  sunlabs.brazil.handler.RestrictClientHandler,  sunlabs.brazil.session.PropertiesCacheManager,  sunlabs.brazil.handler.SunNetAuthHandler,  sunlabs.brazil.server.FileHandler,  sunlabs.brazil.handler.PollHandler,  sunlabs.brazil.handler.PublishHandler,  sunlabs.brazil.handler.LogHandler,  sunlabs.brazil.handler.PropertiesHandler,  sunlabs.brazil.template.SetTemplate,  sunlabs.brazil.proxy.ProxyHandler,  sunlabs.brazil.server.ChainHandler,  sunlabs.brazil.handler.SMTPHandler,  sunlabs.brazil.handler.DirectoryHandler,  sunlabs.brazil.handler.ConfigFileHandler,  sunlabs.brazil.template.DirectoryTemplate,  sunlabs.brazil.handler.UrlMapperHandler,  sunlabs.brazil.session.SerialPersist,  sunlabs.brazil.session.SerializableCacheManager,  sunlabs.brazil.handler.VirtualHostHandler,  sunlabs.brazil.handler.SupplyHandler,  sunlabs.brazil.proxy.JunkBusterHandler,  sunlabs.brazil.handler.BasicAuthHandler,  sunlabs.brazil.handler.HomeDirHandler,  sunlabs.brazil.handler.AclSwitchHandler,  sunlabs.brazil.server.MultiHostHandler,  sunlabs.brazil.handler.DialogHandler,  sunlabs.brazil.handler.CookieSessionHandler,  sunlabs.brazil.handler.ChownHandler,  sunlabs.brazil.handler.RolesHandler,  sunlabs.brazil.handler.DeferredHandler,  sunlabs.brazil.filter.FilterHandler,  sunlabs.brazil.handler.CgiHandler,  sunlabs.brazil.handler.DefaultFileHandler,  sunlabs.brazil.session.CacheManager,
Handler
public interface Handler (Code)
The interface for writing HTTP handlers. Provides basic functionality to accept HTTP requests and dispatch to methods to handle the request.

The Handler.init(Server,String) method is called before this Handler processes the first HTTP request, to allow it to prepare itself, such as by allocating any resources needed for the lifetime of the Handler.

The Handler.respond(Request) method is called to handle an HTTP request. This method and all methods it calls must be thread-safe since they may handle HTTP requests from multiple sockets concurrently. However, each concurrent request gets its own individual Request object.
author:
   Stephen Uhler (stephen.uhler@sun.com)
author:
   Colin Stevens (colin.stevens@sun.com)
version:
   1.5, 99/11/17





Method Summary
 booleaninit(Server server, String prefix)
     Initializes the handler.
Parameters:
  server - The HTTP server that created this Handler.Typical Handlers will use Server.propsto obtain run-time configuration information.
Parameters:
  prefix - A prefix that this Handler may prepend to allof the keys that it uses to extract configuration informationfrom Server.props.
 booleanrespond(Request request)
     Responds to an HTTP request.
Parameters:
  request - The Request object that represents the HTTPrequest. true if the request was handled.



Method Detail
init
boolean init(Server server, String prefix)(Code)
Initializes the handler.
Parameters:
  server - The HTTP server that created this Handler.Typical Handlers will use Server.propsto obtain run-time configuration information.
Parameters:
  prefix - A prefix that this Handler may prepend to allof the keys that it uses to extract configuration informationfrom Server.props. This is set (by the Serverand ChainHandler) to help avoid configuration parameternamespace collisions.

For example, if a Handler uses the property"account", and the specified prefix is "bank.", then theHandler should actually examine the property"bank.account" in Server.props. true if this Handler initializedsuccessfully, false otherwise. Iffalse is returned, this Handlershould not be used.




respond
boolean respond(Request request) throws IOException(Code)
Responds to an HTTP request.
Parameters:
  request - The Request object that represents the HTTPrequest. true if the request was handled. A request washandled if a response was supplied to the client, typicallyby calling Request.sendResponse() orRequest.sendError.
throws:
  IOException - if there was an I/O error while sending the response tothe client. Typically, in that case, the Serverwill (try to) send an error message to the client and thenclose the client's connection.

The IOException should not be used to silentlyignore problems such as being unable to access someserver-side resource (for example getting aFileNotFoundException due to not being ableto open a file). In that case, the Handler'sduty is to turn that IOException into aHTTP response indicating, in this case, that a file couldnot be found.




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