Source Code Cross Referenced for DisplayFormatProvider.java in  » Profiler » MessAdmin » clime » messadmin » providers » spi » 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 » Profiler » MessAdmin » clime.messadmin.providers.spi 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * 
003:         */package clime.messadmin.providers.spi;
004:
005:        import java.io.IOException;
006:        import java.util.Collection;
007:        import java.util.Iterator;
008:        import java.util.Set;
009:
010:        import javax.servlet.ServletConfig;
011:        import javax.servlet.ServletException;
012:        import javax.servlet.http.HttpServletRequest;
013:        import javax.servlet.http.HttpServletResponse;
014:
015:        import clime.messadmin.model.IApplicationInfo;
016:        import clime.messadmin.model.IServerInfo;
017:        import clime.messadmin.model.ISessionInfo;
018:        import clime.messadmin.providers.ProviderUtils;
019:
020:        /**
021:         * Provider for displaying the administration data.
022:         * Sample implementation can be HTML, text, CSV...
023:         * @author Cédrik LIME
024:         * @since 4.1
025:         */
026:        public interface DisplayFormatProvider extends BaseProvider {
027:            public static class Util {
028:                public static String FORMAT_PARAMETER_NAME = "format";//$NON-NLS-1$
029:                public static String DEFAULT_FORMAT = "html";//$NON-NLS-1$
030:
031:                public static DisplayFormatProvider getInstance(
032:                        HttpServletRequest request) {
033:                    String format = request.getParameter(FORMAT_PARAMETER_NAME);
034:                    if (format == null) {
035:                        format = DEFAULT_FORMAT;
036:                    }
037:                    return getInstance(format);
038:                }
039:
040:                public static DisplayFormatProvider getInstance(String format) {
041:                    Iterator iter = ProviderUtils.getProviders(
042:                            DisplayFormatProvider.class).iterator();
043:                    while (iter.hasNext()) {
044:                        DisplayFormatProvider provider = (DisplayFormatProvider) iter
045:                                .next();
046:                        if (format.equalsIgnoreCase(provider.getFormatID())) {
047:                            return provider;
048:                        }
049:                    }
050:                    throw new IllegalArgumentException(format);
051:                }
052:
053:                public static void initAll(ServletConfig config)
054:                        throws ServletException {
055:                    Iterator iter = ProviderUtils.getProviders(
056:                            DisplayFormatProvider.class).iterator();
057:                    while (iter.hasNext()) {
058:                        DisplayFormatProvider provider = (DisplayFormatProvider) iter
059:                                .next();
060:                        provider.init(config);
061:                    }
062:                }
063:            }
064:
065:            public String getFormatID();
066:
067:            public String getContentType();
068:
069:            public void init(ServletConfig config) throws ServletException;
070:
071:            /**
072:             * @param req
073:             * @param resp
074:             * @throws ServletException
075:             * @throws IOException
076:             */
077:            public void preProcess(HttpServletRequest req,
078:                    HttpServletResponse resp) throws ServletException,
079:                    IOException;
080:
081:            /**
082:             * Displays the Web Applications list
083:             * @param req
084:             * @param resp
085:             * @param applicationInfos
086:             * @throws ServletException
087:             * @throws IOException
088:             */
089:            public void displayWebAppsList(HttpServletRequest req,
090:                    HttpServletResponse resp,
091:                    Set/*<IApplicationInfo>*/applicationInfos)
092:                    throws ServletException, IOException;
093:
094:            /**
095:             * Displays the HttpSessions list for a given WebApp (context)
096:             * @param req
097:             * @param resp
098:             * @param sortBy
099:             * @param orderBy
100:             * @param webAppStats
101:             * @param activeSessions
102:             * @param passiveSessionsIds
103:             * @throws ServletException
104:             * @throws IOException
105:             */
106:            public void displaySessionsListPage(HttpServletRequest req,
107:                    HttpServletResponse resp, String sortBy, String orderBy,
108:                    IApplicationInfo webAppStats,
109:                    Collection/*<ISessionInfo>*/activeSessions,
110:                    Collection/*<String>*/passiveSessionsIds)
111:                    throws ServletException, IOException;
112:
113:            /**
114:             * Displays the details page for a given HttpSession
115:             * @param req
116:             * @param resp
117:             * @param webAppStats
118:             * @param currentSession
119:             * @throws ServletException
120:             * @throws IOException
121:             */
122:            public void displaySessionDetailPage(HttpServletRequest req,
123:                    HttpServletResponse resp, IApplicationInfo webAppStats,
124:                    ISessionInfo currentSession) throws ServletException,
125:                    IOException;
126:
127:            /**
128:             * Displays the details page for a Web Application
129:             * @param req
130:             * @param resp
131:             * @param webAppStats
132:             * @throws ServletException
133:             * @throws IOException
134:             */
135:            public void displayWebAppStatsPage(HttpServletRequest req,
136:                    HttpServletResponse resp, IApplicationInfo webAppStats)
137:                    throws ServletException, IOException;
138:
139:            /**
140:             * Displays the page for the Server Informations
141:             * @param req
142:             * @param resp
143:             * @param serverInfo
144:             * @throws ServletException
145:             * @throws IOException
146:             */
147:            public void displayServerInfosPage(HttpServletRequest req,
148:                    HttpServletResponse resp, IServerInfo serverInfo)
149:                    throws ServletException, IOException;
150:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.