Source Code Cross Referenced for Indexer.java in  » Web-Server » simple » simple » http » serve » 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 » simple » simple.http.serve 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * Indexer.java December 2005
03:         *
04:         * Copyright (C) 2005, Niall Gallagher <niallg@users.sf.net>
05:         *
06:         * This library is free software; you can redistribute it and/or
07:         * modify it under the terms of the GNU Lesser General Public
08:         * License as published by the Free Software Foundation.
09:         *
10:         * This library is distributed in the hope that it will be useful,
11:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
12:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
13:         * GNU Lesser General Public License for more details.
14:         *
15:         * You should have received a copy of the GNU Lesser General 
16:         * Public License along with this library; if not, write to the 
17:         * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
18:         * Boston, MA  02111-1307  USA
19:         */
20:
21:        package simple.http.serve;
22:
23:        import simple.util.net.Path;
24:        import simple.util.net.URI;
25:        import java.util.Locale;
26:        import java.io.File;
27:
28:        /**
29:         * The <code>Indexer</code> object is used to acquire meta data for 
30:         * a URI target. This provides a centralized source for meta data
31:         * within the server. The need to acquire information such as MIME
32:         * type, locale, and various other details for a URI frequently
33:         * arises. In order to provide a consistant set of details for a
34:         * specific target an <code>Indexer</code> implementation is used.
35:         * This helps various services and resources acauire meta data
36:         * quickly by facilitating a meta data cache for a context.
37:         * 
38:         * @author Niall Gallagher
39:         *
40:         * @see simple.http.serve.Index
41:         */
42:        interface Indexer {
43:
44:            /**
45:             * This is used to acquire the <code>File</code> reference
46:             * for the index target. This is typically rooted at a
47:             * base path, for instance the <code>Context</code> root
48:             * is typically used. This allows the file to be opened,
49:             * deleted, or read should the need arise in a service.
50:             *
51:             * @param target the index target to get the OS file for
52:             * 
53:             * @return this returns the OS file for the resource
54:             */
55:            public File getFile(URI target);
56:
57:            /**
58:             * This is used to acquire the <code>Path</code> object that 
59:             * exposes various parts of the URI path. This can be used 
60:             * to extract the individual path segments as strings as 
61:             * well as the file extension and various other details.
62:             *
63:             * @param target the index target to get the URI path for
64:             * 
65:             * @return this returns a path object with various details
66:             */
67:            public Path getPath(URI target);
68:
69:            /**
70:             * This gets the locale for this index object the locale is
71:             * set to the <code>Locale.getDefault</code> if there is no
72:             * locale information available for the index target. This
73:             * will provide the <code>Context.getLocale</code> object.
74:             *
75:             * @param target the index target to get the locale for
76:             * 
77:             * @return this returns the locale for this index target
78:             */
79:            public Locale getLocale(URI target);
80:
81:            /**
82:             * This allows the MIME type of this <code>Index</code> to
83:             * be acquired. The MIME type of a file is retrieved by the
84:             * <code>Context.getContentType</code> method for a specific
85:             * request URI. This should have a value and perhaps some
86:             * parameters like the charset, "text/html; charset=UTF-8".
87:             *
88:             * @param target the index target to get the MIME type for
89:             * 
90:             * @return the MIME type this object has been set to
91:             */
92:            public String getContentType(URI target);
93:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.