Source Code Cross Referenced for MonitorNotification.java in  » JMX » XMOJO » javax » management » monitor » 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 » JMX » XMOJO » javax.management.monitor 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * The XMOJO Project 5
003:         * Copyright © 2003 XMOJO.org. All rights reserved.
004:
005:         * NO WARRANTY
006:
007:         * BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
008:         * THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
009:         * OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
010:         * PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
011:         * OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
012:         * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
013:         * TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE
014:         * LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
015:         * REPAIR OR CORRECTION.
016:
017:         * IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
018:         * ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
019:         * THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
020:         * GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
021:         * USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF
022:         * DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
023:         * PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE),
024:         * EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
025:         * SUCH DAMAGES.
026:         **/package javax.management.monitor;
027:
028:        import java.lang.*;
029:        import java.io.*;
030:        import java.util.*;
031:        import java.net.*;
032:
033:        import javax.management.*;
034:
035:        /**
036:         * Provides definitions of the notifications sent by monitor MBeans.
037:         * The notification source and a set of parameters concerning the monitor MBean's state
038:         * need to be specified when creating a new object of this class. The list of notifications
039:         * fired by the monitor
040:         * MBeans is the following:
041:         *
042:         * Common to all kind of monitors:
043:         *			 The observed object is not registered in the MBean server.
044:         *			 The observed attribute is not contained in the observed object.
045:         *		     The type of the observed attribute is not correct.
046:         *           Any exception (except the cases described above) occurs when trying to get the
047:         *           value of the observed attribute.
048:         * Common to the counter and the gauge monitors:
049:         *           The threshold high or threshold low are not of the same type as the gauge (gauge
050:         *           monitors).
051:         *           The threshold or the offset or the modulus are not of the same type as the counter
052:         *           (counter monitors).
053:         * Counter monitors only:
054:         *           The observed attribute has reached the threshold value.
055:         * Gauge monitors only:
056:         *           The observed attribute has exceeded the threshold high value.
057:         *           The observed attribute has exceeded the threshold low value.
058:         * String monitors only:
059:         *           The observed attribute has matched the "string to compare" value.
060:         *           The observed attribute has differed from the "string to compare" value.
061:         *
062:         */
063:        public class MonitorNotification extends Notification {
064:
065:            /**
066:             * Notification type denoting that the observed attribute is not contained in the observed
067:             * object. This notification is fired by all kinds of monitors.
068:             * The value of this notification type is jmx.monitor.error.attribute.
069:             */
070:            public static final String OBSERVED_ATTRIBUTE_ERROR = "jmx.monitor.error.attribute";
071:
072:            /**
073:             * Notification type denoting that the type of the observed attribute is not correct. This
074:             * notification is fired by all kinds of monitors.
075:             * The value of this notification type is jmx.monitor.error.type.
076:             */
077:            public static final String OBSERVED_ATTRIBUTE_TYPE_ERROR = "jmx.monitor.error.type";
078:
079:            /**
080:             * Notification type denoting that the observed object is not registered in the MBean server.
081:             * This notification is fired by all kinds of monitors.
082:             * The value of this notification type is jmx.monitor.error.mbean.
083:             */
084:            public static final String OBSERVED_OBJECT_ERROR = "jmx.monitor.error.mbean";
085:
086:            /**
087:             * Notification type denoting that a non-predefined error type has occurred when trying to get
088:             * the value of the observed attribute. This notification is fired by all kinds of monitors.
089:             * The value of this notification type is jmx.monitor.error.runtime.
090:             */
091:            public static final String RUNTIME_ERROR = "jmx.monitor.error.runtime";
092:
093:            /**
094:             * Notification type denoting that the observed attribute has differed from the "string to
095:             * compare" value. This notification is only fired by string monitors.
096:             * The value of this notification type is jmx.monitor.string.differs.
097:             */
098:            public static final String STRING_TO_COMPARE_VALUE_DIFFERED = "jmx.monitor.string.differs";
099:
100:            /**
101:             * Notification type denoting that the observed attribute has matched the "string to compare"
102:             * value. This notification is only fired by string monitors.
103:             * The value of this notification type is jmx.monitor.string.matches.
104:             */
105:            public static final String STRING_TO_COMPARE_VALUE_MATCHED = "jmx.monitor.string.matches";
106:
107:            /**
108:             * Notification type denoting that the type of the thresholds, offset or modulus is not correct.
109:             //* This notification is fired by counter and gauge monitors.
110:             * The value of this notification type is jmx.monitor.error.threshold.
111:             */
112:            public static final String THRESHOLD_ERROR = "jmx.monitor.error.threshold";
113:
114:            /**
115:             * Notification type denoting that the observed attribute has exceeded the threshold high value.
116:             * This notification is only fired by gauge monitors.
117:             * The value of this notification type is jmx.monitor.gauge.high.
118:             */
119:            public static final String THRESHOLD_HIGH_VALUE_EXCEEDED = "jmx.monitor.gauge.high";
120:
121:            /**
122:             * Notification type denoting that the observed attribute has exceeded the threshold low value.
123:             * This notification is only fired by gauge monitors.
124:             * The value of this notification type is jmx.monitor.gauge.low.
125:             */
126:            public static final String THRESHOLD_LOW_VALUE_EXCEEDED = "jmx.monitor.gauge.low";
127:
128:            /**
129:             * Notification type denoting that the observed attribute has reached the threshold value. This
130:             * notification is only fired by counter monitors.
131:             * The value of this notification type is jmx.monitor.counter.threshold.
132:             */
133:            public static final String THRESHOLD_VALUE_EXCEEDED = "jmx.monitor.counter.threshold";
134:
135:            //private variables to this class.
136:
137:            private ObjectName observedObject = null;
138:            private String observedAttribute = null;
139:            private Object derivedGauge = null;
140:            private Object trigger = null;
141:            private String type = null;
142:
143:            MonitorNotification(String type, Object source,
144:                    ObjectName objectName, String attributeName,
145:                    Object derivedgauge, Object trigger, long sequenceNumber) {
146:
147:                super (type, source, sequenceNumber);
148:                this .type = type;
149:                this .observedObject = objectName;
150:                this .observedAttribute = attributeName;
151:                this .derivedGauge = derivedgauge;
152:                this .trigger = trigger;
153:            }
154:
155:            /**
156:             * Gets the observed object of this monitor notification.
157:             * @return - The Observed Object.
158:             */
159:            public ObjectName getObservedObject() {
160:                return observedObject;
161:            }
162:
163:            /**
164:             * Gets the observed attribute of this monitor notification.
165:             * @return - The Observed Attribute.
166:             */
167:            public java.lang.String getObservedAttribute() {
168:                return observedAttribute;
169:            }
170:
171:            /**
172:             * Gets the derived gauge of this monitor notification.
173:             * @return - The derived gauge.
174:             */
175:            public java.lang.Object getDerivedGauge() {
176:                return derivedGauge;
177:            }
178:
179:            /**
180:             * Gets the threshold/string (depending on the monitor type) that triggered off this
181:             * monitor notification.
182:             * @return - The trigger value.
183:             */
184:
185:            public java.lang.Object getTrigger() {
186:                return trigger;
187:            }
188:
189:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.