sunlabs.brazil.handler

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.handler 
sunlabs.brazil.handler
Java Source File NameTypeComment
AclSwitchHandler.javaClass Simple access control hander based on url prefixes or regexps. Looks up list of valid prefixes or regular expressions in sunlabs.brazil.server.Request.props , and allows/denies access based on those prefixes.
BasicAuthHandler.javaClass The BasicAuthHandler obtains a Session ID by performing "basic" authentication, using either the "Authorization" or the "Proxy-Authorization" headers.
CgiHandler.javaClass Handler for implementing cgi/1.1 interface. This implementation allows either suffix matching (e.g.
ChainSawHandler.javaClass Variant of the chain handler for doing standard logging. Don't use on fine furniture.

Output is a variant of the common logfile format. The common logfile format is as follows:

 remotehost rfc931 authuser [date] "request" status bytes
 
remotehost
Remote hostname (or IP number if DNS hostname is not available, or if DNSLookup is Off.
ChownHandler.javaClass Handler for changing the group and owner of the server.
ConfigFileHandler.javaClass Handler for manipulating per-user session state that can be represented as ASCII name/value pairs.
CookieSessionHandler.javaClass Handler for creating browser sessions using cookies. This handler provides a single cookie-id that may be used by other handlers. The intent is to require only one cookie per server. (See also sunlabs.brazil.filter.SessionFilter , which manages sessions with or without cookies). The following server properties are used:
prefix
url prefix
cookie
the name of the cookie to use (defaults to "cookie").
map
If specified, the ident argument to SessionManager.getSession to get the table of valid cookies, used to map the cookie value to a Session ID.
DefaultFileHandler.javaClass Handler for appending a url ending with '/' into the appropriate url based on a default file in the file system.

The following request properties are used:

defaults
The names of the default files to search for in the directory implied by the URL. The first one that exists will cause its name to be appended to the URL.
DeferredHandler.javaClass Wrap another handler, deferring its initialization until request time. This allows handlers to be configured, but not initialized until a first use is attempted.

Normally, when a handler's class is first resolved, if any of the dependent classes are not available, an error will occur, terminating the server.

DialogHandler.javaClass Sample handler for popping up a dialog box on the server.
DirectoryHandler.javaClass Handler for directory lists. This is a bare-bones handler for providing directory listings for web servers. It is designed to be placed after the sunlabs.brazil.server.FileHandler .
DynamicConfigHandler.javaClass The DynamicConfigHandler allows the user to change the configuration of the server and its handlers on the fly.
GenericProxyHandler.javaClass Handler for implementing a virtual web site.
HomeDirHandler.javaClass Handler for converting ~username queries.
HtmlRewriter.javaClass This class helps with parsing and rewriting an HTML document.
LogHandler.javaClass Handler for logging information about requests. Wraps another handler, and logs information about each HTTP request to a file.

Request properties:

handler
The name of the handler to wrap.
MapPage.javaClass Utility class to rewrite links inside of web pages so they appear to come from a different site.
MultiProxyHandler.javaClass Handler for permitting multiple cross connected virtual web sites. Each handler instance adds its prefix and destination to a static hashtable so the URL rewrite rules rewrite all of them correctly.

The GenericProxyHandler rewrites all of the links in each wepage to point back to the local. machine.

NotFoundHandler.javaClass Handler for returning "file not found" errors back to the client. Look for the file "NotFound.html" in the current directory, and return it if it exists.
PollHandler.javaClass Handler for periodically polling another web site, whose results are (optionally) added to the server's properties. THis also includes the ability to request URL's on a cron-like schedule.

The result of fetching the url is expected to be a text document in java Properties format.

PropertiesHandler.javaClass Handler for returning selected request properties as a text/plain document in java properties format.
ProxyPropertiesHandler.javaClass Obtain properties format content from remote websites, and add it to the current request properties. Many of the handlers are designed to produce side effects, by inserting values into the request properties (see PropertiesHandler ). If they are instead configured to produce the properties in java properties format, then this handler will read their output, and place the result in the request object on their behalf.
PublishHandler.javaClass Handler for supporting publishing from Communicator. Launches an authentication handler to protect the content from malicious users.

Looks for PUT requests, and creates or modifies the content as indicated.

The following request properties are used:

prefix
The URL prefix required for all documents
session
The the name of request property holding the session information to provide the credentials for posting.
PushHandler.javaClass Skeleton Handler for uploading files using multipart/form-data.
ReflectHandler.javaClass Handler for reflecting query data back to the client. This is the example handler to demonstrate how a typical handler is witten.
ResourceHandler.javaClass Handler for serving documents out of the jar file. Look for url's as resources, presumably in the same "jar" file as the class files. This allows an entire web site to be included in the jar file. A typical way to use this handler (with java 1.2+) is as follows:
  • Add an existing web site to the jar file with:
    jar uf [jar file] [web site]
  • Create a config file, and add it to the jar file as: sunlabs/brazil/main/config.
RestrictClientHandler.javaClass Simple access control hander based on source ip addresses.
RolesHandler.javaClass Handler for associating roles with an id.
SMTPHandler.javaClass Handler for Sending an email message via SMTP The following server properties are used:
prefix
url prefix
host
The mail host (e.g.
SunNetAuthHandler.javaClass All-in-one Handler for doing supplier.net style authentication.

The purpose of this handler is to provide an authenticated "front end" to one or more web sites, using (hopefully) arbitrary challenge- response based authentication via a plug-in authentication interface. It can bridge disparate DNS domains by selectively mapping servers on one domain into another, based on the supplied credentials, by using the MultiProxyHandler .

The authentication step is expected to yield a list of roles, each of which represents permission to access a specific foreign site. Once authentication is complete, and the roles are obtained, the handler keeps a set of credentials (a lease) on behalf of the user, which can be tuned at setup time for a variety of expiration conditions.

SupplyHandler.javaClass Sample Handler for dispatching different users to different spots This is a re-implementation of the supplier.net content server using the new server apis (e.g.
Token.javaClass Manage supplier.net session tokens.
UrlMapperHandler.javaClass Handler for mapping or redirecting url's Matches url's against a regexp pattern.
VirtualHostHandler.javaClass Handler for managing virtual hosts. This prefixes the host name (from the host:) header onto the url and passes the request along.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.