Source Code Cross Referenced for Events.java in  » IDE-Netbeans » library » org » netbeans » 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 » IDE Netbeans » library » org.netbeans 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003:         *
004:         * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005:         *
006:         * The contents of this file are subject to the terms of either the GNU
007:         * General Public License Version 2 only ("GPL") or the Common
008:         * Development and Distribution License("CDDL") (collectively, the
009:         * "License"). You may not use this file except in compliance with the
010:         * License. You can obtain a copy of the License at
011:         * http://www.netbeans.org/cddl-gplv2.html
012:         * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013:         * specific language governing permissions and limitations under the
014:         * License.  When distributing the software, include this License Header
015:         * Notice in each file and include the License file at
016:         * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
017:         * particular file as subject to the "Classpath" exception as provided
018:         * by Sun in the GPL Version 2 section of the License file that
019:         * accompanied this code. If applicable, add the following below the
020:         * License Header, with the fields enclosed by brackets [] replaced by
021:         * your own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         *
024:         * Contributor(s):
025:         *
026:         * The Original Software is NetBeans. The Initial Developer of the Original
027:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028:         * Microsystems, Inc. All Rights Reserved.
029:         *
030:         * If you wish your version of this file to be governed by only the CDDL
031:         * or only the GPL Version 2, indicate your decision by adding
032:         * "[Contributor] elects to include this software in this distribution
033:         * under the [CDDL or GPL Version 2] license." If you do not indicate a
034:         * single choice of license, a recipient has the option to distribute
035:         * your version of this file under either the CDDL, the GPL Version 2 or
036:         * to extend the choice of license to its licensees as provided above.
037:         * However, if you add GPL Version 2 code and therefore, elected the GPL
038:         * Version 2 license, then the option applies only if the new code is
039:         * made subject to such option by the copyright holder.
040:         */
041:
042:        package org.netbeans;
043:
044:        import java.util.Arrays;
045:        import java.util.logging.Level;
046:
047:        /** Track events that occur in the module system abstractly.
048:         * A concrete implementation can provide localized messages
049:         * for these, notify the user visually, track performance, etc.
050:         * Only events relevant to the user or to performance need to
051:         * be logged; detailed low-level descriptions of what is
052:         * happening can simply be logged to the ErrorManager.
053:         * @author Jesse Glick
054:         */
055:        public abstract class Events {
056:
057:            /** String message */
058:            public static final String PERF_START = "perfStart"; // NOI18N
059:            /** String message */
060:            public static final String PERF_TICK = "perfTick"; // NOI18N
061:            /** String message */
062:            public static final String PERF_END = "perfEnd"; // NOI18N
063:
064:            /** File jar */
065:            public static final String START_CREATE_REGULAR_MODULE = "startCreateRegularModule"; // NOI18N
066:            /** File jar */
067:            public static final String FINISH_CREATE_REGULAR_MODULE = "finishCreateRegularModule"; // NOI18N
068:            /** Object history */
069:            public static final String START_CREATE_BOOT_MODULE = "startCreateBootModule"; // NOI18N
070:            /** Object history */
071:            public static final String FINISH_CREATE_BOOT_MODULE = "finishCreateBootModule"; // NOI18N
072:            /** no args */
073:            public static final String CREATED_MODULE_SYSTEM = "createdModuleSystem"; // NOI18N
074:            /** no args */
075:            public static final String START_LOAD_BOOT_MODULES = "startLoadBootModules"; // NOI18N
076:            /** no args */
077:            public static final String FINISH_LOAD_BOOT_MODULES = "finishLoadBootModules"; // NOI18N
078:            /** File jar */
079:            public static final String START_DEPLOY_TEST_MODULE = "startDeployTestModule"; // NOI18N
080:            /** File jar */
081:            public static final String FINISH_DEPLOY_TEST_MODULE = "finishDeployTestModule"; // NOI18N
082:            /** Module toDelete */
083:            public static final String DELETE_MODULE = "deleteModule"; // NOI18N
084:            /** List<Module> toEnable */
085:            public static final String START_ENABLE_MODULES = "startEnableModules"; // NOI18N
086:            /** List<Module> toEnable */
087:            public static final String FINISH_ENABLE_MODULES = "finishEnableModules"; // NOI18N
088:            /** List<Module> toDisable */
089:            public static final String START_DISABLE_MODULES = "startDisableModules"; // NOI18N
090:            /** List<Module> toDisable */
091:            public static final String FINISH_DISABLE_MODULES = "finishDisableModules"; // NOI18N
092:            /** Module prepared */
093:            public static final String PREPARE = "prepare"; // NOI18N
094:            /** List<Module> loaded */
095:            public static final String START_LOAD = "startLoad"; // NOI18N
096:            /** List<Module> loaded */
097:            public static final String FINISH_LOAD = "finishLoad"; // NOI18N
098:            /** List<Module> unloaded */
099:            public static final String START_UNLOAD = "startUnload"; // NOI18N
100:            /** List<Module> unloaded */
101:            public static final String FINISH_UNLOAD = "finishUnload"; // NOI18N
102:            /** Module installed */
103:            public static final String INSTALL = "install"; // NOI18N
104:            /** Module uninstalled */
105:            public static final String UNINSTALL = "uninstall"; // NOI18N
106:            /** Module restored */
107:            public static final String RESTORE = "restore"; // NOI18N
108:            /** Module updated */
109:            public static final String UPDATE = "update"; // NOI18N
110:            /** Module home, ManifestSection section */
111:            public static final String LOAD_SECTION = "loadSection"; // NOI18N
112:            /** no args */
113:            public static final String CLOSE = "close"; // NOI18N
114:            /** no args */
115:            public static final String START_READ = "startRead"; // NOI18N
116:            /** Set<Module> found */
117:            public static final String FINISH_READ = "finishRead"; // NOI18N
118:            /** FileObject */
119:            public static final String MODULES_FILE_PROCESSED = "modulesFileProcessed"; // NOI18N
120:            /** Integer */
121:            public static final String MODULES_FILE_SCANNED = "modulesFileScanned"; // NOI18N
122:            /** Set<Module> toInstall */
123:            public static final String START_AUTO_RESTORE = "startAutoRestore"; // NOI18N
124:            /** Set<Module> toInstall */
125:            public static final String FINISH_AUTO_RESTORE = "finishAutoRestore"; // NOI18N
126:            /** Set<Module> notInstalled */
127:            public static final String FAILED_INSTALL_NEW = "failedInstallNew"; // NOI18N
128:            /** Module notInstalled, InvalidException problem */
129:            public static final String FAILED_INSTALL_NEW_UNEXPECTED = "failedInstallNewUnexpected"; // NOI18N
130:            /** Set<Module> modules */
131:            public static final String LOAD_LAYERS = "loadLayers"; // NOI18N
132:            /** Set<Module> modules */
133:            public static final String UNLOAD_LAYERS = "unloadLayers"; // NOI18N
134:            /** Module culprit, Class offending, ClassLoader expected */
135:            public static final String WRONG_CLASS_LOADER = "wrongClassLoader"; // NOI18N
136:            /** File extension, Set<File> owners */
137:            public static final String EXTENSION_MULTIPLY_LOADED = "extensionMultiplyLoaded"; // NOI18N
138:            /** File nonexistentJar */
139:            public static final String MISSING_JAR_FILE = "missingJarFile"; // NOI18N
140:            /** Module autoload (or since org.netbeans.core/1 1.3, eager) */
141:            public static final String CANT_DELETE_ENABLED_AUTOLOAD = "cantDeleteEnabledAutoload"; // NOI18N
142:            /** Module afflicted, String propname, Object valueOnDisk, Object actualValue */
143:            public static final String MISC_PROP_MISMATCH = "miscPropMismatch"; // NOI18N
144:            /** File patchfile */
145:            public static final String PATCH = "patch"; // NOI18N
146:
147:            /** Constructor for subclasses to use. */
148:            protected Events() {
149:            }
150:
151:            /** Log an event.
152:             * You must pass a fixed event type string, and a list
153:             * of arguments (meaning varies according to event type).
154:             * Note that the event type string must be the exact String
155:             * listed as the constant in this class, not a copy.
156:             */
157:            public final void log(String message, Object... args) {
158:                if (Util.err.isLoggable(Level.FINE) && message != PERF_START
159:                        && message != PERF_TICK && message != PERF_END) {
160:                    Util.err.fine("EVENT -> " + message + " "
161:                            + Arrays.asList(args));
162:                }
163:                try {
164:                    logged(message, args);
165:                } catch (RuntimeException re) {
166:                    // If there is any problem logging, it should not kill the system
167:                    // which called the logger.
168:                    Util.err.log(Level.WARNING, null, re);
169:                }
170:            }
171:
172:            /** Report an event.
173:             */
174:            protected abstract void logged(String message, Object[] args);
175:
176:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.