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


001:        /**
002:         * 
003:         */package clime.messadmin.jmx.mbeans;
004:
005:        import java.util.Date;
006:        import java.util.LinkedHashSet;
007:        import java.util.List;
008:        import java.util.Map;
009:        import java.util.Set;
010:
011:        import clime.messadmin.core.MessAdmin;
012:        import clime.messadmin.model.ErrorData;
013:        import clime.messadmin.model.Server;
014:
015:        /**
016:         * IMPLEMENTATION NOTE: don't forget to synchronize setters!
017:         * @author Cédrik LIME
018:         */
019:        public class WebApp implements  WebAppMBean { //extends NotificationBroadcasterSupport 
020:            private String context;
021:
022:            /**
023:             * 
024:             */
025:            public WebApp() {
026:                super ();
027:            }
028:
029:            public void setContext(String ctx) {
030:                context = ctx;
031:            }
032:
033:            /**
034:             * {@inheritDoc}
035:             */
036:            public String getInternalContextPath() {
037:                return Server.getInstance().getApplication(context)
038:                        .getApplicationInfo().getInternalContextPath();
039:            }
040:
041:            /**
042:             * {@inheritDoc}
043:             */
044:            public ClassLoader getClassLoader() {
045:                return Server.getInstance().getApplication(context)
046:                        .getApplicationInfo().getClassLoader();
047:            }
048:
049:            /**
050:             * {@inheritDoc}
051:             */
052:            @SuppressWarnings("unchecked")
053:            public Set<String> getActiveSessionsIds() {
054:                Set activeSessionsIds = Server.getInstance().getApplication(
055:                        context).getActiveSessionsIds();
056:                return new LinkedHashSet<String>(activeSessionsIds);
057:            }
058:
059:            /**
060:             * {@inheritDoc}
061:             */
062:            @SuppressWarnings("unchecked")
063:            public Set<String> getPassiveSessionsIds() {
064:                Set passiveSessionsIds = Server.getInstance().getApplication(
065:                        context).getPassiveSessionsIds();
066:                return new LinkedHashSet<String>(passiveSessionsIds);
067:            }
068:
069:            // ApplicationInfo data
070:
071:            /**
072:             * {@inheritDoc}
073:             */
074:            public int getHits() {
075:                return Server.getInstance().getApplication(context)
076:                        .getApplicationInfo().getHits();
077:            }
078:
079:            /** {@inheritDoc} */
080:            public int getNErrors() {
081:                return Server.getInstance().getApplication(context)
082:                        .getApplicationInfo().getNErrors();
083:            }
084:
085:            /** {@inheritDoc} */
086:            public ErrorData getLastError() {
087:                return Server.getInstance().getApplication(context)
088:                        .getApplicationInfo().getLastError();
089:            }
090:
091:            /**
092:             * {@inheritDoc}
093:             */
094:            public long getMaxConcurrentSessions() {
095:                return Server.getInstance().getApplication(context)
096:                        .getApplicationInfo().getMaxConcurrentSessions();
097:            }
098:
099:            /**
100:             * {@inheritDoc}
101:             */
102:            public Date getMaxConcurrentSessionsDate() {
103:                return Server.getInstance().getApplication(context)
104:                        .getApplicationInfo().getMaxConcurrentSessionsDate();
105:            }
106:
107:            /**
108:             * {@inheritDoc}
109:             */
110:            public long getTotalCreatedSessions() {
111:                return Server.getInstance().getApplication(context)
112:                        .getApplicationInfo().getTotalCreatedSessions();
113:            }
114:
115:            /**
116:             * {@inheritDoc}
117:             */
118:            public long getRequestTotalLength() {
119:                return Server.getInstance().getApplication(context)
120:                        .getApplicationInfo().getRequestTotalLength();
121:            }
122:
123:            /**
124:             * {@inheritDoc}
125:             */
126:            public long getRequestMaxLength() {
127:                return Server.getInstance().getApplication(context)
128:                        .getApplicationInfo().getRequestMaxLength();
129:            }
130:
131:            /**
132:             * {@inheritDoc}
133:             */
134:            public Date getRequestMaxLengthDate() {
135:                return Server.getInstance().getApplication(context)
136:                        .getApplicationInfo().getRequestMaxLengthDate();
137:            }
138:
139:            /**
140:             * {@inheritDoc}
141:             */
142:            public double getRequestMeanLength() {
143:                return Server.getInstance().getApplication(context)
144:                        .getApplicationInfo().getRequestMeanLength();
145:            }
146:
147:            /**
148:             * {@inheritDoc}
149:             */
150:            public double getRequestStdDevLength() {
151:                return Server.getInstance().getApplication(context)
152:                        .getApplicationInfo().getRequestStdDevLength();
153:            }
154:
155:            /**
156:             * {@inheritDoc}
157:             */
158:            public long getResponseTotalLength() {
159:                return Server.getInstance().getApplication(context)
160:                        .getApplicationInfo().getResponseTotalLength();
161:            }
162:
163:            /**
164:             * {@inheritDoc}
165:             */
166:            public long getResponseMaxLength() {
167:                return Server.getInstance().getApplication(context)
168:                        .getApplicationInfo().getResponseMaxLength();
169:            }
170:
171:            /**
172:             * {@inheritDoc}
173:             */
174:            public Date getResponseMaxLengthDate() {
175:                return Server.getInstance().getApplication(context)
176:                        .getApplicationInfo().getResponseMaxLengthDate();
177:            }
178:
179:            /**
180:             * {@inheritDoc}
181:             */
182:            public double getResponseMeanLength() {
183:                return Server.getInstance().getApplication(context)
184:                        .getApplicationInfo().getResponseMeanLength();
185:            }
186:
187:            /**
188:             * {@inheritDoc}
189:             */
190:            public double getResponseStdDevLength() {
191:                return Server.getInstance().getApplication(context)
192:                        .getApplicationInfo().getResponseStdDevLength();
193:            }
194:
195:            /**
196:             * {@inheritDoc}
197:             */
198:            public int getActiveSessionsCount() {
199:                return Server.getInstance().getApplication(context)
200:                        .getApplicationInfo().getActiveSessionsCount();
201:            }
202:
203:            /**
204:             * {@inheritDoc}
205:             */
206:            public int getPassiveSessionsCount() {
207:                return Server.getInstance().getApplication(context)
208:                        .getApplicationInfo().getPassiveSessionsCount();
209:            }
210:
211:            /**
212:             * {@inheritDoc}
213:             */
214:            public long getActiveSessionsSize() {
215:                return Server.getInstance().getApplication(context)
216:                        .getApplicationInfo().getActiveSessionsSize();
217:            }
218:
219:            /**
220:             * {@inheritDoc}
221:             */
222:            public Date getStartupTime() {
223:                return Server.getInstance().getApplication(context)
224:                        .getApplicationInfo().getStartupTime();
225:            }
226:
227:            /**
228:             * {@inheritDoc}
229:             */
230:            public long getUsedTimeTotal() {
231:                return Server.getInstance().getApplication(context)
232:                        .getApplicationInfo().getUsedTimeTotal();
233:            }
234:
235:            /**
236:             * {@inheritDoc}
237:             */
238:            public long getUsedTimeMax() {
239:                return Server.getInstance().getApplication(context)
240:                        .getApplicationInfo().getUsedTimeMax();
241:            }
242:
243:            /**
244:             * {@inheritDoc}
245:             */
246:            public Date getUsedTimeMaxDate() {
247:                return Server.getInstance().getApplication(context)
248:                        .getApplicationInfo().getUsedTimeMaxDate();
249:            }
250:
251:            /**
252:             * {@inheritDoc}
253:             */
254:            public double getUsedTimeMean() {
255:                return Server.getInstance().getApplication(context)
256:                        .getApplicationInfo().getUsedTimeMean();
257:            }
258:
259:            /**
260:             * {@inheritDoc}
261:             */
262:            public double getUsedTimeStdDev() {
263:                return Server.getInstance().getApplication(context)
264:                        .getApplicationInfo().getUsedTimeStdDev();
265:            }
266:
267:            /**
268:             * {@inheritDoc}
269:             */
270:            public String getContextPath() {
271:                return Server.getInstance().getApplication(context)
272:                        .getApplicationInfo().getContextPath();
273:            }
274:
275:            /**
276:             * {@inheritDoc}
277:             */
278:            public String getServletContextName() {
279:                return Server.getInstance().getApplication(context)
280:                        .getApplicationInfo().getServletContextName();
281:            }
282:
283:            /**
284:             * {@inheritDoc}
285:             */
286:            public String getServerInfo() {
287:                return Server.getInstance().getApplication(context)
288:                        .getApplicationInfo().getServerInfo();
289:            }
290:
291:            /**
292:             * {@inheritDoc}
293:             */
294:            @SuppressWarnings("unchecked")
295:            public List<Map.Entry<String, String>> getApplicationSpecificData() {
296:                return Server.getInstance().getApplication(context)
297:                        .getApplicationInfo().getApplicationSpecificData();
298:            }
299:
300:            /**
301:             * {@inheritDoc}
302:             */
303:            public Map getInitParameters() {
304:                return Server.getInstance().getApplication(context)
305:                        .getApplicationInfo().getInitParameters();
306:            }
307:
308:            /**
309:             * {@inheritDoc}
310:             */
311:            public String getInitParameter(String name) {
312:                return Server.getInstance().getApplication(context)
313:                        .getApplicationInfo().getInitParameter(name);
314:            }
315:
316:            /**
317:             * {@inheritDoc}
318:             */
319:            public Map getAttributes() {
320:                return Server.getInstance().getApplication(context)
321:                        .getApplicationInfo().getAttributes();
322:            }
323:
324:            /**
325:             * {@inheritDoc}
326:             */
327:            public Object getAttribute(String name) {
328:                return Server.getInstance().getApplication(context)
329:                        .getApplicationInfo().getAttribute(name);
330:            }
331:
332:            /**
333:             * {@inheritDoc}
334:             */
335:            public synchronized void setAttribute(String name, Object object) {
336:                Server.getInstance().getApplication(context)
337:                        .getApplicationInfo().setAttribute(name, object);
338:            }
339:
340:            /**
341:             * {@inheritDoc}
342:             */
343:            public synchronized void removeAttribute(String name) {
344:                Server.getInstance().getApplication(context)
345:                        .getApplicationInfo().removeAttribute(name);
346:            }
347:
348:            // WebApp-related actions
349:
350:            /**
351:             * {@inheritDoc}
352:             */
353:            public synchronized void sendAllSessionsMessage(String in_message) {
354:                MessAdmin.injectAllSessions(context, in_message);
355:            }
356:
357:            /**
358:             * {@inheritDoc}
359:             */
360:            public synchronized void setApplicationOnceMessage(String in_message) {
361:                MessAdmin.injectApplicationsOnce(new String[] { context },
362:                        in_message);
363:            }
364:
365:            /**
366:             * {@inheritDoc}
367:             */
368:            public synchronized void setApplicationPermanentMessage(
369:                    String in_message) {
370:                Server.getInstance().getApplication(context)
371:                        .injectPermanentMessage(in_message);
372:            }
373:
374:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.