Source Code Cross Referenced for I18NStandardMBeanSupport.java in  » JMX » mx4j » test » mx4j » tools » i18n » 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 » mx4j » test.mx4j.tools.i18n 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (C) The MX4J Contributors.
003:         * All rights reserved.
004:         *
005:         * This software is distributed under the terms of the MX4J License version 1.0.
006:         * See the terms of the MX4J License in the documentation provided with this software.
007:         */
008:
009:        package test.mx4j.tools.i18n;
010:
011:        import java.util.Locale;
012:        import javax.management.NotCompliantMBeanException;
013:
014:        import mx4j.tools.i18n.I18NStandardMBean;
015:
016:        /**
017:         */
018:        public class I18NStandardMBeanSupport {
019:            /**
020:             * No management interface and it is not a standard MBean
021:             */
022:            public static class SubclassNotCompliant extends I18NStandardMBean {
023:                public SubclassNotCompliant() throws NotCompliantMBeanException {
024:                    super (null);
025:                }
026:            }
027:
028:            /**
029:             * A simple management interface.
030:             */
031:            public interface FullManagement {
032:                public void setAttrib(int i);
033:
034:                public void operation(int i, Object obj);
035:            }
036:
037:            /**
038:             * A management interface have overloaded operations.
039:             */
040:            public interface OverloadManagement {
041:                public void setAttrib(int i);
042:
043:                public void operation();
044:
045:                public void operation(int i);
046:
047:                public void operation(Object obj);
048:
049:                public void operation(int[] array);
050:
051:                public void operation(Object[] array);
052:
053:                public void operation(int i, Object obj);
054:
055:                public void operation(int i, int j, int k);
056:
057:                public void operation(int i, int j, String s);
058:            }
059:
060:            /**
061:             * A base subclass of I18NStandardMBean (for factorization).
062:             */
063:            public static class BaseSubclass extends I18NStandardMBean {
064:                private int m_attrib = 0;
065:
066:                protected BaseSubclass(Class mbeanInterface)
067:                        throws NotCompliantMBeanException {
068:                    super (mbeanInterface);
069:                }
070:
071:                protected BaseSubclass(Class mbeanInterface, Locale locale)
072:                        throws NotCompliantMBeanException {
073:                    super (mbeanInterface, locale);
074:                }
075:
076:                public void setAttrib(int i) {
077:                    m_attrib = i;
078:                }
079:
080:                public void operation(int i, Object obj) {
081:                }
082:            }
083:
084:            /**
085:             * A base implementation NOT derrived from I18NStandardMBean.
086:             */
087:            public static class BaseImplementation implements  FullManagement {
088:                private int m_attrib = 0;
089:
090:                public void setAttrib(int i) {
091:                    m_attrib = i;
092:                }
093:
094:                public void operation(int i, Object obj) {
095:                }
096:            }
097:
098:            /**
099:             * An I18NStandardMBean subclass having just a global name decription.
100:             */
101:            public static class SubclassNameOnly extends BaseSubclass implements 
102:                    FullManagement {
103:                public SubclassNameOnly() throws NotCompliantMBeanException {
104:                    super (FullManagement.class);
105:                }
106:
107:                public SubclassNameOnly(Locale locale)
108:                        throws NotCompliantMBeanException {
109:                    super (FullManagement.class, locale);
110:                }
111:            }
112:
113:            /**
114:             * An I18NStandardMBean subclass having full descriptions.
115:             */
116:            public static class SubclassComplete extends BaseSubclass implements 
117:                    FullManagement {
118:                public SubclassComplete(Locale locale)
119:                        throws NotCompliantMBeanException {
120:                    super (FullManagement.class, locale);
121:                }
122:
123:                public SubclassComplete() throws NotCompliantMBeanException {
124:                    super (FullManagement.class);
125:                }
126:            }
127:
128:            /**
129:             * An I18NStandardMBean subclass having no bundle.
130:             */
131:            public static class SubclassNoBundle extends BaseSubclass implements 
132:                    FullManagement {
133:                public SubclassNoBundle() throws NotCompliantMBeanException {
134:                    super (FullManagement.class);
135:                }
136:            }
137:
138:            /**
139:             * An I18NStandardMBean subclass having ambiguous constructors
140:             */
141:            public static class SubclassAmbiguousConstructors extends
142:                    BaseSubclass implements  FullManagement {
143:                // desciption can be found based on number of parameters
144:                public SubclassAmbiguousConstructors()
145:                        throws NotCompliantMBeanException {
146:                    super (FullManagement.class);
147:                }
148:
149:                // with no signature info in the bundle this cannot be distinguished from the Locale version
150:                public SubclassAmbiguousConstructors(Locale locale)
151:                        throws NotCompliantMBeanException {
152:                    super (FullManagement.class, locale);
153:                }
154:
155:                // with no signature info in the bundle this cannot be distinguished from the Locale version
156:                public SubclassAmbiguousConstructors(int i)
157:                        throws NotCompliantMBeanException {
158:                    super (FullManagement.class);
159:                }
160:
161:                // with no signature info in the bundle this cannot be distinguished from the Locale version
162:                public SubclassAmbiguousConstructors(String s)
163:                        throws NotCompliantMBeanException {
164:                    super (FullManagement.class);
165:                }
166:
167:                // This can determined with no signature (2 args)
168:                public SubclassAmbiguousConstructors(int i, int j)
169:                        throws NotCompliantMBeanException {
170:                    super (FullManagement.class);
171:                }
172:
173:                // of the two 3 arg constructors below only one is described in the bundle
174:                // BUT they should both still be considered ambiguous
175:                public SubclassAmbiguousConstructors(int i, int j, int k)
176:                        throws NotCompliantMBeanException {
177:                    super (FullManagement.class);
178:                }
179:
180:                public SubclassAmbiguousConstructors(int i, int j, String s)
181:                        throws NotCompliantMBeanException {
182:                    super (FullManagement.class);
183:                }
184:            }
185:
186:            /**
187:             * An I18NStandardMBean subclass overloaded constructors and operations.
188:             */
189:            public static class SubclassOverload extends BaseSubclass implements 
190:                    OverloadManagement {
191:
192:                // no arguments
193:                public SubclassOverload() throws NotCompliantMBeanException {
194:                    super (OverloadManagement.class);
195:                }
196:
197:                // one argument Object
198:                public SubclassOverload(Object obj)
199:                        throws NotCompliantMBeanException {
200:                    super (OverloadManagement.class);
201:                }
202:
203:                // one argument int
204:                public SubclassOverload(int i)
205:                        throws NotCompliantMBeanException {
206:                    super (OverloadManagement.class);
207:                }
208:
209:                // one argument int[]
210:                public SubclassOverload(int[] i)
211:                        throws NotCompliantMBeanException {
212:                    super (OverloadManagement.class);
213:                }
214:
215:                // one argument Object[]
216:                public SubclassOverload(Object[] objs)
217:                        throws NotCompliantMBeanException {
218:                    super (OverloadManagement.class);
219:                }
220:
221:                // 2 arguments
222:                public SubclassOverload(int a, Object b)
223:                        throws NotCompliantMBeanException {
224:                    super (OverloadManagement.class);
225:                }
226:
227:                public void operation() {
228:                }
229:
230:                public void operation(int i) {
231:                }
232:
233:                public void operation(Object obj) {
234:                }
235:
236:                public void operation(int[] array) {
237:                }
238:
239:                public void operation(Object[] array) {
240:                }
241:
242:                public void operation(int i, int j, int k) {
243:                }
244:
245:                public void operation(int i, int j, String s) {
246:                }
247:
248:            }
249:
250:            /**
251:             * A subclass whose bundle will not specify sigs (so operations are ambiguous).
252:             */
253:            public static class SubclassAmbiguousOperation extends BaseSubclass
254:                    implements  OverloadManagement {
255:                public SubclassAmbiguousOperation()
256:                        throws NotCompliantMBeanException {
257:                    super (OverloadManagement.class);
258:                }
259:
260:                public void operation() {
261:                }
262:
263:                public void operation(int i) {
264:                }
265:
266:                public void operation(Object obj) {
267:                }
268:
269:                public void operation(int[] array) {
270:                }
271:
272:                public void operation(Object[] array) {
273:                }
274:
275:                public void operation(int i, int j, int k) {
276:                }
277:
278:                public void operation(int i, int j, String s) {
279:                }
280:
281:            }
282:
283:            /**
284:             * An I18N MBean implementation having just a global name decription.
285:             */
286:            public static class ImplementationNameOnly extends
287:                    BaseImplementation {
288:            }
289:
290:            /**
291:             * An I18N MBean implementation having full decriptions.
292:             */
293:            public static class ImplementationComplete extends
294:                    BaseImplementation {
295:            }
296:
297:            /**
298:             * An I18N MBean implementation having no bundle.
299:             */
300:            public static class ImplementationNoBundle extends
301:                    BaseImplementation {
302:            }
303:
304:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.