Source Code Cross Referenced for Registry.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » tomcat » jni » 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 » Sevlet Container » apache tomcat 6.0.14 » org.apache.tomcat.jni 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */
017:
018:        package org.apache.tomcat.jni;
019:
020:        /** Windows Registy support
021:         *
022:         * @author Mladen Turk
023:         * @version $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
024:         */
025:
026:        public class Registry {
027:
028:            /* Registry Enums */
029:            public static final int HKEY_CLASSES_ROOT = 1;
030:            public static final int HKEY_CURRENT_CONFIG = 2;
031:            public static final int HKEY_CURRENT_USER = 3;
032:            public static final int HKEY_LOCAL_MACHINE = 4;
033:            public static final int HKEY_USERS = 5;
034:
035:            public static final int KEY_ALL_ACCESS = 0x0001;
036:            public static final int KEY_CREATE_LINK = 0x0002;
037:            public static final int KEY_CREATE_SUB_KEY = 0x0004;
038:            public static final int KEY_ENUMERATE_SUB_KEYS = 0x0008;
039:            public static final int KEY_EXECUTE = 0x0010;
040:            public static final int KEY_NOTIFY = 0x0020;
041:            public static final int KEY_QUERY_VALUE = 0x0040;
042:            public static final int KEY_READ = 0x0080;
043:            public static final int KEY_SET_VALUE = 0x0100;
044:            public static final int KEY_WOW64_64KEY = 0x0200;
045:            public static final int KEY_WOW64_32KEY = 0x0400;
046:            public static final int KEY_WRITE = 0x0800;
047:
048:            public static final int REG_BINARY = 1;
049:            public static final int REG_DWORD = 2;
050:            public static final int REG_EXPAND_SZ = 3;
051:            public static final int REG_MULTI_SZ = 4;
052:            public static final int REG_QWORD = 5;
053:            public static final int REG_SZ = 6;
054:
055:            /**
056:             * Create or open a Registry Key.
057:             * @param name Registry Subkey to open
058:             * @param root Root key, one of HKEY_*
059:             * @param som Access mask that specifies the access rights for the key.
060:             * @return Opened Registry key
061:             */
062:            public static native long create(int root, String name, int sam,
063:                    long pool) throws Error;
064:
065:            /**
066:             * Opens the specified Registry Key.
067:             * @param name Registry Subkey to open
068:             * @param root Root key, one of HKEY_*
069:             * @param som Access mask that specifies the access rights for the key.
070:             * @return Opened Registry key
071:             */
072:            public static native long open(int root, String name, int sam,
073:                    long pool) throws Error;
074:
075:            /**
076:             * Close the specified Registry key.
077:             * @param key The Registry key descriptor to close.
078:             */
079:            public static native int close(long key);
080:
081:            /**
082:             * Get the Registry key type.
083:             * @param key The Registry key descriptor to use.
084:             * @param name The name of the value to query
085:             * @return Value type or negative error value
086:             */
087:            public static native int getType(long key, String name);
088:
089:            /**
090:             * Get the Registry value for REG_DWORD
091:             * @param key The Registry key descriptor to use.
092:             * @param name The name of the value to query
093:             * @return Registry key value
094:             */
095:            public static native int getValueI(long key, String name)
096:                    throws Error;
097:
098:            /**
099:             * Get the Registry value for REG_QWORD or REG_DWORD
100:             * @param key The Registry key descriptor to use.
101:             * @param name The name of the value to query
102:             * @return Registry key value
103:             */
104:            public static native long getValueJ(long key, String name)
105:                    throws Error;
106:
107:            /**
108:             * Get the Registry key length.
109:             * @param key The Registry key descriptor to use.
110:             * @param name The name of the value to query
111:             * @return Value size or negative error value
112:             */
113:            public static native int getSize(long key, String name);
114:
115:            /**
116:             * Get the Registry value for REG_SZ or REG_EXPAND_SZ
117:             * @param key The Registry key descriptor to use.
118:             * @param name The name of the value to query
119:             * @return Registry key value
120:             */
121:            public static native String getValueS(long key, String name)
122:                    throws Error;
123:
124:            /**
125:             * Get the Registry value for REG_MULTI_SZ
126:             * @param key The Registry key descriptor to use.
127:             * @param name The name of the value to query
128:             * @return Registry key value
129:             */
130:            public static native String[] getValueA(long key, String name)
131:                    throws Error;
132:
133:            /**
134:             * Get the Registry value for REG_BINARY
135:             * @param key The Registry key descriptor to use.
136:             * @param name The name of the value to query
137:             * @return Registry key value
138:             */
139:            public static native byte[] getValueB(long key, String name)
140:                    throws Error;
141:
142:            /**
143:             * Set the Registry value for REG_DWORD
144:             * @param key The Registry key descriptor to use.
145:             * @param name The name of the value to set
146:             * @param val The the value to set
147:             * @return If the function succeeds, the return value is 0
148:             */
149:            public static native int setValueI(long key, String name, int val);
150:
151:            /**
152:             * Set the Registry value for REG_QWORD
153:             * @param key The Registry key descriptor to use.
154:             * @param name The name of the value to set
155:             * @param val The the value to set
156:             * @return If the function succeeds, the return value is 0
157:             */
158:            public static native int setValueJ(long key, String name, int val);
159:
160:            /**
161:             * Set the Registry value for REG_SZ
162:             * @param key The Registry key descriptor to use.
163:             * @param name The name of the value to set
164:             * @param val The the value to set
165:             * @return If the function succeeds, the return value is 0
166:             */
167:            public static native int setValueS(long key, String name, String val);
168:
169:            /**
170:             * Set the Registry value for REG_EXPAND_SZ
171:             * @param key The Registry key descriptor to use.
172:             * @param name The name of the value to set
173:             * @param val The the value to set
174:             * @return If the function succeeds, the return value is 0
175:             */
176:            public static native int setValueE(long key, String name, String val);
177:
178:            /**
179:             * Set the Registry value for REG_MULTI_SZ
180:             * @param key The Registry key descriptor to use.
181:             * @param name The name of the value to set
182:             * @param val The the value to set
183:             * @return If the function succeeds, the return value is 0
184:             */
185:            public static native int setValueA(long key, String name,
186:                    String[] val);
187:
188:            /**
189:             * Set the Registry value for REG_BINARY
190:             * @param key The Registry key descriptor to use.
191:             * @param name The name of the value to set
192:             * @param val The the value to set
193:             * @return If the function succeeds, the return value is 0
194:             */
195:            public static native int setValueB(long key, String name, byte[] val);
196:
197:            /**
198:             * Enumerate the Registry subkeys
199:             * @param key The Registry key descriptor to use.
200:             * @param name The name of the value to query
201:             * @return Array of all subkey names
202:             */
203:            public static native String[] enumKeys(long key) throws Error;
204:
205:            /**
206:             * Enumerate the Registry values
207:             * @param key The Registry key descriptor to use.
208:             * @param name The name of the value to query
209:             * @return Array of all value names
210:             */
211:            public static native String[] enumValues(long key) throws Error;
212:
213:            /**
214:             * Delete the Registry value
215:             * @param key The Registry key descriptor to use.
216:             * @param name The name of the value to delete
217:             * @return If the function succeeds, the return value is 0
218:             */
219:            public static native int deleteValue(long key, String name);
220:
221:            /**
222:             * Delete the Registry subkey
223:             * @param root Root key, one of HKEY_*
224:             * @param name Subkey to delete
225:             * @param onlyIfEmpty If true will not delete a key if
226:             *                    it contains any subkeys or values
227:             * @return If the function succeeds, the return value is 0
228:             */
229:            public static native int deleteKey(int root, String name,
230:                    boolean onlyIfEmpty);
231:
232:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.