Source Code Cross Referenced for FrameworkMBeanImpl.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » jmx » 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 » Portal » uPortal_rel 2 6 1 GA » org.jasig.portal.jmx 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright 2005 The JA-SIG Collaborative.  All rights reserved.
002:         *  See license distributed with this file and
003:         *  available online at http://www.uportal.org/license.html
004:         */
005:
006:        package org.jasig.portal.jmx;
007:
008:        import java.util.ArrayList;
009:        import java.util.Date;
010:        import java.util.Iterator;
011:        import java.util.List;
012:
013:        import org.jasig.portal.ChannelManager;
014:        import org.jasig.portal.GuestUserInstance;
015:        import org.jasig.portal.PortalException;
016:        import org.jasig.portal.PortalSessionManager;
017:        import org.jasig.portal.ProblemsTable;
018:        import org.jasig.portal.RDBMServices;
019:        import org.jasig.portal.UserInstance;
020:        import org.jasig.portal.services.Authentication;
021:        import org.jasig.portal.utils.MovingAverageSample;
022:
023:        /**
024:         * uPortal metrics to make available via JMX.
025:         *
026:         * @author George Lindholm <a href="mailto:George.Lindholm@ubc.ca">George.Lindholm@ubc.ca</a>
027:         * @version $Revision: 36731 $ $Date: 2006-09-27 11:21:06 -0700 (Wed, 27 Sep 2006) $
028:         * @since uPortal 2.5
029:         */
030:        public class FrameworkMBeanImpl implements  FrameworkMBean {
031:            public FrameworkMBeanImpl() {
032:
033:            }
034:
035:            /**
036:             * Time/Data uPortal was started
037:             * @return Date
038:             */
039:            public Date getStartedAt() {
040:                return PortalSessionManager.STARTED_AT;
041:            }
042:
043:            /*
044:             * Track framework rendering performance
045:             */
046:            public long getRenderAverage() {
047:                return UserInstance.lastRender.average;
048:            }
049:
050:            public long getRenderHighMax() {
051:                return UserInstance.lastRender.highMax;
052:            }
053:
054:            public long getRenderLast() {
055:                return UserInstance.lastRender.lastSample;
056:            }
057:
058:            public long getRenderMin() {
059:                return UserInstance.lastRender.min;
060:            }
061:
062:            public long getRenderMax() {
063:                return UserInstance.lastRender.max;
064:            }
065:
066:            public long getRenderTotalRenders() {
067:                return UserInstance.lastRender.totalSamples;
068:            }
069:
070:            public MovingAverageSample getLastRender() {
071:                return UserInstance.lastRender;
072:            }
073:
074:            public String[] getRecentProblems() {
075:                final List rpe = ProblemsTable.getRecentPortalExceptions();
076:                final ArrayList al = new ArrayList(rpe.size());
077:                for (Iterator it = rpe.iterator(); it.hasNext();) {
078:                    final PortalException pe = (PortalException) it.next();
079:                    al.add(pe.getMessage());
080:                }
081:                return (String[]) al.toArray(new String[0]);
082:            }
083:
084:            /*
085:             * sessions
086:             */
087:            public long getUserSessionCount() {
088:                return UserInstance.userSessions.longValue();
089:            }
090:
091:            public long getGuestSessionCount() {
092:                return GuestUserInstance.guestSessions.longValue();
093:            }
094:
095:            /*
096:             * Track framework database performance
097:             */
098:            public MovingAverageSample getLastDatabase() {
099:                return RDBMServices.lastDatabase;
100:            }
101:
102:            public long getDatabaseAverage() {
103:                return RDBMServices.lastDatabase.average;
104:            }
105:
106:            public long getDatabaseHighMax() {
107:                return RDBMServices.lastDatabase.highMax;
108:            }
109:
110:            public long getDatabaseLast() {
111:                return RDBMServices.lastDatabase.lastSample;
112:            }
113:
114:            public long getDatabaseMin() {
115:                return RDBMServices.lastDatabase.min;
116:            }
117:
118:            public long getDatabaseMax() {
119:                return RDBMServices.lastDatabase.max;
120:            }
121:
122:            public long getDatabaseTotalConnections() {
123:                return RDBMServices.lastDatabase.totalSamples;
124:            }
125:
126:            public int getRDBMActiveConnectionCount() {
127:                return RDBMServices.getActiveConnectionCount();
128:            }
129:
130:            public int getRDBMMaxConnectionCount() {
131:                return RDBMServices.getMaxConnectionCount();
132:            }
133:
134:            /*
135:             * Track framework Authentication performance
136:             */
137:            public MovingAverageSample getLastAuthentication() {
138:                return Authentication.lastAuthentication;
139:            }
140:
141:            public long getAuthenticationAverage() {
142:                return Authentication.lastAuthentication.average;
143:            }
144:
145:            public long getAuthenticationHighMax() {
146:                return Authentication.lastAuthentication.highMax;
147:            }
148:
149:            public long getAuthenticationLast() {
150:                return Authentication.lastAuthentication.lastSample;
151:            }
152:
153:            public long getAuthenticationMin() {
154:                return Authentication.lastAuthentication.min;
155:            }
156:
157:            public long getAuthenticationMax() {
158:                return Authentication.lastAuthentication.max;
159:            }
160:
161:            public long getAuthenticationTotalLogins() {
162:                return Authentication.lastAuthentication.totalSamples;
163:            }
164:
165:            // Threads
166:            public long getThreadCount() {
167:                return PortalSessionManager.getThreadGroup().activeCount();
168:            }
169:
170:            public long getChannelRendererActiveThreads() {
171:                return ChannelManager.activeRenderers.get();
172:            }
173:
174:            public long getChannelRendererMaxActiveThreads() {
175:                return ChannelManager.maxRenderThreads.get();
176:            }
177:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.