View Javadoc
1   /*
2     (C) Copyright IBM Corp. 2006, 2013
3   
4     THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
5     ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
6     CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
7   
8     You can obtain a current copy of the Eclipse Public License from
9     http://www.opensource.org/licenses/eclipse-1.0.php
10  
11    @author : Alexander Wolf-Reber, IBM, a.wolf-reber@de.ibm.com
12   * 
13   * Change History
14   * Flag       Date        Prog         Description
15   *------------------------------------------------------------------------------- 
16   * 1565892    2006-11-16  lupusalex    Make SBLIM client JSR48 compliant
17   * 1702832    2007-04-18  lupusalex    WBEMClientCIMXL.setCustomSocketFactory() not implemented
18   * 1688273    2007-04-19  lupusalex    Full support of HTTP trailers
19   * 1714902    2007-05-08  lupusalex    Threading related weak spots
20   * 1815707    2007-10-30  ebak         TLS support
21   * 1827728    2007-11-12  ebak         embeddedInstances: attribute EmbeddedObject not set
22   * 1848607    2007-12-11  ebak         Strict EmbeddedObject types
23   * 2003590    2008-06-30  blaschke-oss Change licensing from CPL to EPL
24   * 2204488 	  2008-10-28  raman_arora  Fix code to remove compiler warnings
25   * 2372030    2008-12-01  blaschke-oss Add property to control synchronized SSL handshaking
26   * 2524131    2009-01-21  raman_arora  Upgrade client to JDK 1.5 (Phase 1)
27   * 2531371    2009-02-10  raman_arora  Upgrade client to JDK 1.5 (Phase 2)
28   * 2846231    2009-09-23  rgummada     connection failure on CIMOM w/o user/pw
29   * 2930341    2010-01-12  blaschke-oss Sync up WBEMClientConstants with JSR48 1.0.0
30   * 2970881    2010-03-15  blaschke-oss Add property to control EmbeddedObject case
31   * 3046073    2010-09-07  blaschke-oss Performance hit due to socket conn. creation with timeout
32   * 3078280    2010-09-29  blaschke-oss Fix for a null pointer exception in 1.3.9.1
33   * 3111718    2010-11-18  blaschke-oss org.sblim.cimclient SSL Code is using the wrong SSL Property
34   * 3185763    2011-02-25  blaschke-oss Reliable indication support - Phase 1
35   * 3195069    2011-02-28  blaschke-oss Need support to disable SSL Handshake
36   * 3277928    2011-04-06  blaschke-oss CIM-XML tracing cannot be enabled in the field
37   * 3206904    2011-05-03  blaschke-oss Indication listener deadlock causes JVM to run out sockets
38   * 3459036    2011-12-13  blaschke-oss Linked list for RI queue not efficient for many LDs
39   * 3485074    2012-02-06  blaschke-oss An Indication trace request
40   * 3492214    2012-02-23  blaschke-oss Add a SenderIPAddress property indications
41   * 3492224    2012-02-23  blaschke-oss Need two different timeouts for Socket connections
42   * 3521157    2012-05-10  blaschke-oss JSR48 1.0.0: PROP_ENABLE_*_LOGGING is Level, not 0/1
43   * 3524050    2012-06-06  blaschke-oss Improve WWW-Authenticate in HTTPClient.java
44   * 3536399    2012-08-25  hellerda     Add client/listener peer authentication properties
45   * 3572993    2012-10-01  blaschke-oss parseDouble("2.2250738585072012e-308") DoS vulnerability
46   * 3576396    2012-10-11  blaschke-oss Improve logging of config file name
47   * 3598613    2013-01-11  blaschke-oss different data type in cim instance and cim object path
48   *    2618    2013-02-27  blaschke-oss Need to add property to disable weak cipher suites for the secure indication
49   *    2628    2013-03-26  blaschke-oss Limit size of LinkedList of CIMEvents to be dispatched
50   *    2635    2013-05-16  blaschke-oss Slowloris DoS attack for CIM indication listener port
51   *    2642    2013-05-21  blaschke-oss Seperate properties needed for cim client and listener to filter out ciphers
52   *    2647    2013-07-01  blaschke-oss Add two ssl protocol properties for http server and client
53   *    2653    2013-07-26  blaschke-oss FVT: java.lang.ExceptionInInitializerError during static init
54   *    2654    2013-07-29  blaschke-oss Check jcc idle time with CIMOM keepalive timeout to avoid EOF
55   *    2151    2013-08-20  blaschke-oss gzip compression not supported
56   *    2711    2013-11-13  blaschke-oss LOCALNAMESPACEPATH allows 0 NAMESPACE children
57   */
58  
59  package org.metricshub.wbem.sblim.cimclient.internal.util;
60  
61  /*-
62   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
63   * WBEM Java Client
64   * ჻჻჻჻჻჻
65   * Copyright 2023 - 2025 MetricsHub
66   * ჻჻჻჻჻჻
67   * Licensed under the Apache License, Version 2.0 (the "License");
68   * you may not use this file except in compliance with the License.
69   * You may obtain a copy of the License at
70   *
71   *      http://www.apache.org/licenses/LICENSE-2.0
72   *
73   * Unless required by applicable law or agreed to in writing, software
74   * distributed under the License is distributed on an "AS IS" BASIS,
75   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76   * See the License for the specific language governing permissions and
77   * limitations under the License.
78   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
79   */
80  
81  import java.io.FileNotFoundException;
82  import java.io.IOException;
83  import java.io.InputStream;
84  import java.net.URL;
85  import java.security.Provider;
86  import java.security.Security;
87  import java.util.Arrays;
88  import java.util.Iterator;
89  import java.util.Map.Entry;
90  import java.util.Properties;
91  import java.util.logging.Level;
92  import javax.net.SocketFactory;
93  import org.metricshub.wbem.sblim.cimclient.WBEMConfigurationProperties;
94  
95  /**
96   * Class WBEMConfigurationFile is responsible for initializing the the
97   * configuration properties from the configuration file.
98   *
99   * This class was designed as thread-safe
100  */
101 public class WBEMConfiguration {
102 	private static WBEMConfiguration cConfiguration;
103 
104 	private static String cConfigURL = null;
105 
106 	private static String cConfigFullURL = null;
107 
108 	private static boolean cLoadSuccessful = false;
109 
110 	private static Exception cLoadException = null;
111 
112 	static {
113 		loadGlobalConfiguration();
114 		cConfiguration = new WBEMConfiguration();
115 		cConfiguration.iIsGlobal = true;
116 	}
117 
118 	/**
119 	 * Loads the global configuration from the configuration file
120 	 */
121 	public static void loadGlobalConfiguration() {
122 		Properties wbemProperties = new Properties(new Properties());
123 		try {
124 			cConfigURL = null;
125 			cLoadSuccessful = false;
126 			cLoadException = null;
127 
128 			InputStream inputstream = getConfigURLStream();
129 			if (inputstream != null) {
130 				wbemProperties.load(inputstream);
131 				cLoadSuccessful = true;
132 			}
133 			for (Iterator<Entry<Object, Object>> iterator = wbemProperties.entrySet().iterator(); iterator.hasNext();) {
134 				Entry<Object, Object> entry = iterator.next();
135 				String key = String.valueOf(entry.getKey());
136 				if (key.startsWith("sblim.wbem.") || key.startsWith("javax.net.ssl.") || key.startsWith("net.slp.")) {
137 					String value = String.valueOf(entry.getValue());
138 					System.setProperty(key, value);
139 				} else if (key.startsWith("ssl.")) {
140 					String value = String.valueOf(entry.getValue());
141 					Security.setProperty(key, value);
142 				} // else { LogAndTraceBroker is NOT initialized yet
143 				// if (LogAndTraceBroker.isLoggingStarted()) {
144 				// LogAndTraceBroker.getBroker().message(Messages.INVALID_KEY_IN_CONFIG_FILE,
145 				// key);
146 				// }
147 				// }
148 			}
149 		} catch (IOException e) {
150 			cLoadException = e;
151 		}
152 	}
153 
154 	/**
155 	 * Returns the URL of the active configuration file. This is the file used
156 	 * to initialize the global configuration.
157 	 *
158 	 * @return The URL of the active configuration file.
159 	 */
160 	public static String getActiveConfigURL() {
161 		return cConfigURL;
162 	}
163 
164 	/**
165 	 * Returns the full URL of the active configuration file. This is the file
166 	 * used to initialize the global configuration.
167 	 *
168 	 * @return The full URL of the active configuration file.
169 	 */
170 	public static String getActiveConfigFullURL() {
171 		return cConfigFullURL;
172 	}
173 
174 	/**
175 	 * Returns if the configuration was successfully loaded from the
176 	 * configuration file
177 	 *
178 	 * @return <code>true</code> if the configuration was successfully loaded
179 	 *         from the configuration file, <code>false</code> otherwise
180 	 */
181 	public static boolean isConfigurationLoadSuccessful() {
182 		return cLoadSuccessful;
183 	}
184 
185 	/**
186 	 * Returns an input stream for the configuration file. The method looks if a
187 	 * configuration file URL is set in the system properties and tries the
188 	 * default location if not.
189 	 *
190 	 * @return The <code>InputStream</code> of the configuration file or
191 	 *         <code>null</code> if none could be opened.
192 	 */
193 	private static InputStream getConfigURLStream() {
194 		String configURL = System.getProperty(WBEMConfigurationProperties.CONFIG_URL);
195 
196 		if (configURL != null) {
197 			if (configURL.trim().length() > 0) {
198 				try {
199 					cConfigURL = configURL;
200 					URL url = new URL(configURL);
201 					cConfigFullURL = getFullURL(url);
202 					InputStream inputstream = url.openStream();
203 					return inputstream;
204 				} catch (Exception e) {
205 					cLoadException = e;
206 				}
207 			}
208 		} else {
209 			for (int i = 0; i < WBEMConfigurationDefaults.CONFIG_URL.length; ++i) {
210 				configURL = WBEMConfigurationDefaults.CONFIG_URL[i];
211 				try {
212 					cConfigURL = configURL;
213 					URL url = new URL(configURL);
214 					cConfigFullURL = getFullURL(url);
215 					InputStream inputstream = url.openStream();
216 					return inputstream;
217 				} catch (FileNotFoundException e) {
218 					// just proceed
219 				} catch (Exception e) {
220 					cLoadException = e;
221 				}
222 			}
223 			cConfigURL = Arrays.asList(WBEMConfigurationDefaults.CONFIG_URL).toString();
224 		}
225 		return null;
226 	}
227 
228 	/**
229 	 * Returns the full URL of the parameter. Only "file:" URLs will be
230 	 * processed, and the full URL will be the FQDN of the file with relative
231 	 * paths ("." and "..") removed.
232 	 *
233 	 * @param url
234 	 *            The URL
235 	 * @return The full URL
236 	 */
237 	private static String getFullURL(URL url) {
238 		if (url.getProtocol().equalsIgnoreCase("file")) {
239 			try {
240 				String path = url.getPath();
241 				int lastSlash = path.lastIndexOf('/');
242 				int lastBackslash = path.lastIndexOf('\\');
243 				int lastSep = lastSlash > lastBackslash ? lastSlash : lastBackslash;
244 
245 				String dir, file;
246 				if (lastSep == -1) {
247 					// directory does not exist, use current directory
248 					dir = ".";
249 					file = path;
250 				} else if (lastSep == 0) {
251 					// directory does exist, is root
252 					dir = "/";
253 					file = path.substring(1);
254 				} else {
255 					// directory does exist, is not root
256 					dir = path.substring(0, lastSep);
257 					file = path.substring(lastSep + 1);
258 				}
259 
260 				String cp = new java.io.File(dir).getCanonicalPath();
261 				if (cp.endsWith(System.getProperty("file.separator"))) return cp + file;
262 				return cp + System.getProperty("file.separator") + file;
263 			} catch (IOException e) {
264 				// ignore
265 			}
266 			return url.getPath();
267 		}
268 		return url.toString();
269 	}
270 
271 	/**
272 	 * Returns the global configuration
273 	 *
274 	 * @return The global configuration
275 	 */
276 	public static WBEMConfiguration getGlobalConfiguration() {
277 		return cConfiguration;
278 	}
279 
280 	/**
281 	 * Returns the exception caught during configuration load, load failed.
282 	 *
283 	 * @return The exception or <code>null</code> if none was caught.
284 	 */
285 	public static Exception getConfigurationLoadException() {
286 		return cLoadException;
287 	}
288 
289 	private final ThreadLocal<Object> iLocalProperties = new InheritableThreadLocal<Object>() {
290 
291 		@Override
292 		protected Object childValue(Object parentValue) {
293 			if (parentValue instanceof Properties) {
294 				return ((Properties) parentValue).clone();
295 			}
296 			return super.childValue(parentValue);
297 		}
298 	};
299 
300 	/**
301 	 * Guarded by "this"
302 	 */
303 	private Properties iDomainProperties = null;
304 
305 	/**
306 	 * Guarded by "this"
307 	 */
308 	private SocketFactory iCustomSocketFactory = null;
309 
310 	private boolean iIsGlobal = false; // final
311 
312 	/**
313 	 * Ctor.
314 	 */
315 	private WBEMConfiguration() {
316 		super();
317 	}
318 
319 	/**
320 	 * Ctor.
321 	 *
322 	 * @param pDomainProperties
323 	 *            The domain specific properties of this configuration. Domain
324 	 *            specific properties are treated as an overlay on the global
325 	 *            properties in the <code>System</code> class.
326 	 * @throws NullPointerException
327 	 *             If pDomainProperties is <code>null</code>
328 	 */
329 	public WBEMConfiguration(Properties pDomainProperties) {
330 		if (pDomainProperties == null) {
331 			throw new NullPointerException("Domain properties shall not be null");
332 		}
333 		this.iDomainProperties = pDomainProperties;
334 	}
335 
336 	/**
337 	 * Returns whether this configuration is the global one
338 	 *
339 	 * @return <code>true</code> if this is the global configuration
340 	 */
341 	public boolean isGlobal() {
342 		return this.iIsGlobal;
343 	}
344 
345 	/**
346 	 * Returns the domain properties
347 	 *
348 	 * @return The domain properties.
349 	 */
350 	public synchronized Properties getDomainProperties() {
351 		return this.iDomainProperties;
352 	}
353 
354 	/**
355 	 * Sets the domain properties
356 	 *
357 	 * @param pDomainProperties
358 	 *            The new value
359 	 */
360 	public synchronized void setDomainProperties(Properties pDomainProperties) {
361 		if (isGlobal()) throw new IllegalStateException("Global configuration cannot be modified by setDomainProperties()");
362 		this.iDomainProperties = pDomainProperties;
363 	}
364 
365 	/**
366 	 * Returns a value from the domain properties for a given name
367 	 *
368 	 * @param pKey
369 	 *            The name of the property
370 	 * @return The value
371 	 */
372 	public synchronized String getDomainProperty(String pKey) {
373 		return (this.iDomainProperties != null) ? this.iDomainProperties.getProperty(pKey) : null;
374 	}
375 
376 	/**
377 	 * Sets a property value of the domain properties
378 	 *
379 	 * @param pKey
380 	 *            The name of property
381 	 * @param pValue
382 	 *            The new value
383 	 */
384 	public synchronized void setDomainProperty(String pKey, String pValue) {
385 		if (isGlobal()) throw new IllegalStateException("Global configuration cannot be modified by setDomainProperty()");
386 		this.iDomainProperties.setProperty(pKey, pValue);
387 	}
388 
389 	/**
390 	 * Returns the properties local to the current thread
391 	 *
392 	 * @return The local properties.
393 	 */
394 	public Properties getLocalProperties() {
395 		return (Properties) this.iLocalProperties.get();
396 	}
397 
398 	/**
399 	 * Sets the properties local to the current thread
400 	 *
401 	 * @param pLocalProperties
402 	 *            The new value
403 	 */
404 	public void setLocalProperties(Properties pLocalProperties) {
405 		if (isGlobal()) throw new IllegalStateException("Global configuration cannot be modified by setLocalProperties()");
406 		this.iLocalProperties.set(pLocalProperties);
407 	}
408 
409 	/**
410 	 * Returns a value from the local properties for a given name
411 	 *
412 	 * @param pKey
413 	 *            The name of the property
414 	 * @return The value
415 	 */
416 	public String getLocalProperty(String pKey) {
417 		Properties localProperties = (Properties) this.iLocalProperties.get();
418 		return (localProperties != null) ? localProperties.getProperty(pKey) : null;
419 	}
420 
421 	/**
422 	 * Sets a property value of the local properties
423 	 *
424 	 * @param pKey
425 	 *            The name of property
426 	 * @param pValue
427 	 *            The new value
428 	 */
429 	public void setLocalProperty(String pKey, String pValue) {
430 		if (isGlobal()) throw new IllegalStateException("Global configuration cannot be modified by setLocalProperty()");
431 		Properties localProperties = (Properties) this.iLocalProperties.get();
432 		if (localProperties == null) {
433 			localProperties = new Properties();
434 			this.iLocalProperties.set(localProperties);
435 		}
436 		localProperties.setProperty(pKey, pValue);
437 	}
438 
439 	private String getProperty(String pProperty, String pDefault) {
440 		String globalProperty = System.getProperty(pProperty, pDefault);
441 		String domainProperty = getDomainProperty(pProperty);
442 		String localProperty = getLocalProperty(pProperty);
443 		return (localProperty != null)
444 			? localProperty
445 			: (domainProperty != null) ? domainProperty : (globalProperty != null) ? globalProperty : pDefault;
446 	}
447 
448 	private String getSecurityProperty(String pProperty, String pDefault) {
449 		String globalProperty = Security.getProperty(pProperty);
450 		String domainProperty = getDomainProperty(pProperty);
451 		String localProperty = getLocalProperty(pProperty);
452 		return (localProperty != null)
453 			? localProperty
454 			: (domainProperty != null) ? domainProperty : (globalProperty != null) ? globalProperty : pDefault;
455 	}
456 
457 	/**
458 	 * Sets a custom socket factory.
459 	 *
460 	 * @param pFactory
461 	 *            The factory
462 	 */
463 	public synchronized void setCustomSocketFactory(SocketFactory pFactory) {
464 		this.iCustomSocketFactory = pFactory;
465 	}
466 
467 	/**
468 	 * Returns the custom socket factory
469 	 *
470 	 * @return The factory if set, <code>null</code> otherwise
471 	 */
472 	public synchronized SocketFactory getCustomSocketFactory() {
473 		return this.iCustomSocketFactory;
474 	}
475 
476 	/**
477 	 * Returns the console log level
478 	 *
479 	 * @return The console log level
480 	 */
481 	public Level getLogConsoleLevel() {
482 		return Level.parse(
483 			getProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, WBEMConfigurationDefaults.LOG_CONSOLE_LEVEL)
484 		);
485 	}
486 
487 	/**
488 	 * Returns the console log type
489 	 *
490 	 * @return The console log type
491 	 */
492 	public String getLogConsoleType() {
493 		return getProperty(WBEMConfigurationProperties.LOG_CONSOLE_TYPE, WBEMConfigurationDefaults.LOG_CONSOLE_TYPE);
494 	}
495 
496 	/**
497 	 * Returns the log file level
498 	 *
499 	 * @return The log file level
500 	 */
501 	public Level getLogFileLevel() {
502 		return Level.parse(
503 			getProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, WBEMConfigurationDefaults.LOG_FILE_LEVEL)
504 		);
505 	}
506 
507 	/**
508 	 * Returns the log file location
509 	 *
510 	 * @return The log file location
511 	 */
512 	public String getLogFileLocation() {
513 		return getProperty(WBEMConfigurationProperties.LOG_FILE_LOCATION, WBEMConfigurationDefaults.LOG_FILE_LOCATION);
514 	}
515 
516 	/**
517 	 * Returns the log file count
518 	 *
519 	 * @return The log file count
520 	 */
521 	public int getLogFileCount() {
522 		return Integer.parseInt(
523 			getProperty(WBEMConfigurationProperties.LOG_FILE_COUNT, WBEMConfigurationDefaults.LOG_FILE_COUNT)
524 		);
525 	}
526 
527 	/**
528 	 * Returns the log file size limit
529 	 *
530 	 * @return The log file size limit
531 	 */
532 	public int getLogFileSizeLimit() {
533 		return Integer.parseInt(
534 			getProperty(WBEMConfigurationProperties.LOG_FILE_SIZE_LIMIT, WBEMConfigurationDefaults.LOG_FILE_SIZE_LIMIT)
535 		);
536 	}
537 
538 	/**
539 	 * Returns the trace file level
540 	 *
541 	 * @return The trace file level
542 	 */
543 	public Level getTraceFileLevel() {
544 		return Level.parse(
545 			getProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, WBEMConfigurationDefaults.TRACE_FILE_LEVEL)
546 		);
547 	}
548 
549 	/**
550 	 * Returns the trace file location
551 	 *
552 	 * @return The trace file location
553 	 */
554 	public String getTraceFileLocation() {
555 		return getProperty(WBEMConfigurationProperties.TRACE_FILE_LOCATION, WBEMConfigurationDefaults.TRACE_FILE_LOCATION);
556 	}
557 
558 	/**
559 	 * Returns the trace file count
560 	 *
561 	 * @return The trace file count
562 	 */
563 	public int getTraceFileCount() {
564 		return Integer.parseInt(
565 			getProperty(WBEMConfigurationProperties.TRACE_FILE_COUNT, WBEMConfigurationDefaults.TRACE_FILE_COUNT)
566 		);
567 	}
568 
569 	/**
570 	 * Returns the trace file count
571 	 *
572 	 * @return The trace file count
573 	 */
574 	public int getTraceFileSizeLimit() {
575 		return Integer.parseInt(
576 			getProperty(WBEMConfigurationProperties.TRACE_FILE_SIZE_LIMIT, WBEMConfigurationDefaults.TRACE_FILE_SIZE_LIMIT)
577 		);
578 	}
579 
580 	/**
581 	 * Returns the http timeout
582 	 *
583 	 * @return The http timeout
584 	 */
585 	public int getHttpTimeout() {
586 		return Integer.parseInt(
587 			getProperty(WBEMConfigurationProperties.HTTP_TIMEOUT, WBEMConfigurationDefaults.HTTP_TIMEOUT)
588 		);
589 	}
590 
591 	/**
592 	 * Returns the http pool size
593 	 *
594 	 * @return The http pool size
595 	 */
596 	public int getHttpPoolSize() {
597 		return Integer.parseInt(
598 			getProperty(WBEMConfigurationProperties.HTTP_POOL_SIZE, WBEMConfigurationDefaults.HTTP_POOL_SIZE)
599 		);
600 	}
601 
602 	/**
603 	 * Returns the Java class name of http authentication module to use
604 	 *
605 	 * @return The http authentication module's class name
606 	 */
607 	public String getHttpAuthenticationModule() {
608 		return getProperty(
609 			WBEMConfigurationProperties.HTTP_AUTHENTICATION_MODULE,
610 			WBEMConfigurationDefaults.HTTP_AUTHENTICATION_MODULE
611 		);
612 	}
613 
614 	/**
615 	 * Returns the WWW-Authenticate info to use on first request
616 	 *
617 	 * @return The WWW-Authenticate info
618 	 */
619 	public String getHttpWwwAuthenticateInfo() {
620 		return getProperty(WBEMConfigurationProperties.HTTP_WWW_AUTHENTICATE_INFO, null);
621 	}
622 
623 	/**
624 	 * Returns the state of MPOST enablement
625 	 *
626 	 * @return <code>true</code> if MPOST is enabled, <code>false</code>
627 	 *         otherwise
628 	 */
629 	public boolean isHttpMPost() {
630 		return Boolean
631 			.valueOf(getProperty(WBEMConfigurationProperties.HTTP_USE_MPOST, WBEMConfigurationDefaults.HTTP_USE_MPOST))
632 			.booleanValue();
633 	}
634 
635 	/**
636 	 * Returns the state of chunking enablement
637 	 *
638 	 * @return <code>true</code> if chunking is enabled, <code>false</code>
639 	 *         otherwise
640 	 */
641 	public boolean isHttpChunked() {
642 		return Boolean
643 			.valueOf(getProperty(WBEMConfigurationProperties.HTTP_USE_CHUNKING, WBEMConfigurationDefaults.HTTP_USE_CHUNKING))
644 			.booleanValue();
645 	}
646 
647 	/**
648 	 * Returns the http version to use
649 	 *
650 	 * @return The http version
651 	 */
652 	public String getHttpVersion() {
653 		return getProperty(WBEMConfigurationProperties.HTTP_VERSION, WBEMConfigurationDefaults.HTTP_VERSION);
654 	}
655 
656 	/**
657 	 * Returns the file path of the keystore.
658 	 *
659 	 * @return The keystore file path.
660 	 */
661 	public String getSslKeyStorePath() {
662 		return getProperty(WBEMConfigurationProperties.KEYSTORE_PATH, null);
663 	}
664 
665 	/**
666 	 * Returns the type of the keystore.
667 	 *
668 	 * @return The keystore type.
669 	 */
670 	public String getSslKeyStoreType() {
671 		return getProperty(WBEMConfigurationProperties.KEYSTORE_TYPE, WBEMConfigurationDefaults.KEYSTORE_TYPE);
672 	}
673 
674 	/**
675 	 * Returns the password of the keystore.
676 	 *
677 	 * @return The keystore password.
678 	 */
679 	public String getSslKeyStorePassword() {
680 		return getProperty(WBEMConfigurationProperties.KEYSTORE_PASSWORD, "");
681 	}
682 
683 	/**
684 	 * Returns the file path of the truststore.
685 	 *
686 	 * @return The truststore file path.
687 	 */
688 	public String getSslTrustStorePath() {
689 		return getProperty(WBEMConfigurationProperties.TRUSTSTORE_PATH, null);
690 	}
691 
692 	/**
693 	 * Returns the type of the truststore.
694 	 *
695 	 * @return The truststore type.
696 	 */
697 	public String getSslTrustStoreType() {
698 		return getProperty(WBEMConfigurationProperties.TRUSTSTORE_TYPE, WBEMConfigurationDefaults.TRUSTSTORE_TYPE);
699 	}
700 
701 	/**
702 	 * Returns the password of the truststore.
703 	 *
704 	 * @return The truststore password.
705 	 */
706 	public String getSslTrustStorePassword() {
707 		return getProperty(WBEMConfigurationProperties.TRUSTSTORE_PASSWORD, "");
708 	}
709 
710 	/**
711 	 * Returns the JSSE provider to use for creating ssl client sockets
712 	 *
713 	 * @return The JSSE provider for client sockets
714 	 */
715 	public String getSslSocketProvider() {
716 		Provider[] providers = Security.getProviders("SSLContext.SSL");
717 		return getProperty(
718 			WBEMConfigurationProperties.SSL_SOCKET_PROVIDER,
719 			providers != null && providers.length > 0 ? providers[0].getClass().getName() : null
720 		);
721 	}
722 
723 	/**
724 	 * Returns the JSSE provider to use for creating ssl server sockets
725 	 *
726 	 * @return The JSSE provider for server sockets
727 	 */
728 	public String getSslServerSocketProvider() {
729 		Provider[] providers = Security.getProviders("SSLContext.SSL");
730 		return getProperty(
731 			WBEMConfigurationProperties.SSL_SERVER_SOCKET_PROVIDER,
732 			providers != null && providers.length > 0 ? providers[0].getClass().getName() : null
733 		);
734 	}
735 
736 	/**
737 	 * getSslProtocol
738 	 *
739 	 * @return The SSL protocol for SSLContext.getInstance()
740 	 */
741 	public String getSslProtocol() {
742 		return getSecurityProperty(WBEMConfigurationProperties.SSL_PROTOCOL, WBEMConfigurationDefaults.SSL_DEF_PROTOCOL);
743 	}
744 
745 	/**
746 	 * getSslClientProtocol
747 	 *
748 	 * @return The SSL protocol for SSLContext.getInstance() for client
749 	 */
750 	public String getSslClientProtocol() {
751 		return getProperty(WBEMConfigurationProperties.SSL_CLIENT_PROTOCOL, null);
752 	}
753 
754 	/**
755 	 * getSslListenerProtocol
756 	 *
757 	 * @return The SSL protocol for SSLContext.getInstance() for listener
758 	 */
759 	public String getSslListenerProtocol() {
760 		return getProperty(WBEMConfigurationProperties.SSL_LISTENER_PROTOCOL, null);
761 	}
762 
763 	/**
764 	 * Returns the certificate algorithm the key manager will use
765 	 *
766 	 * @return The key mangers algorithm
767 	 */
768 	public String getSslKeyManagerAlgorithm() {
769 		return getSecurityProperty(WBEMConfigurationProperties.SSL_KEYMANAGER_ALGORITHM, null);
770 	}
771 
772 	/**
773 	 * Returns the certificate algorithm the trust manager will use
774 	 *
775 	 * @return The trust mangers algorithm
776 	 */
777 	public String getSslTrustManagerAlgorithm() {
778 		return getSecurityProperty(WBEMConfigurationProperties.SSL_TRUSTMANAGER_ALGORITHM, null);
779 	}
780 
781 	/**
782 	 * Returns whether the client will attempt to authenticate the CIMOM
783 	 *
784 	 * @return <code>true</code> if the client will attempt to authenticate the
785 	 *         CIMOM by verifying the server certificate <code>false</code>
786 	 *         otherwise
787 	 */
788 	public boolean getSslClientPeerVerification() {
789 		return Boolean
790 			.valueOf(
791 				getProperty(
792 					WBEMConfigurationProperties.SSL_CLIENT_PEER_VERIFICATION,
793 					WBEMConfigurationDefaults.SSL_CLIENT_PEER_VERIFICATION
794 				)
795 			)
796 			.booleanValue();
797 	}
798 
799 	/**
800 	 * Returns how the listener will handle to authentication of the indication
801 	 * sender endpoint.
802 	 *
803 	 * @return The listener peer verification mode
804 	 */
805 	public String getSslListenerPeerVerification() {
806 		return getProperty(
807 			WBEMConfigurationProperties.SSL_LISTENER_PEER_VERIFICATION,
808 			WBEMConfigurationDefaults.SSL_LISTENER_PEER_VERIFICATION
809 		);
810 	}
811 
812 	/**
813 	 * Returns the comma-separated list of cipher suites to be disabled by
814 	 * client.
815 	 *
816 	 * @return The list of cipher suites
817 	 */
818 	public String getSslClientCipherSuitesToDisable() {
819 		return getProperty(WBEMConfigurationProperties.SSL_CLIENT_CIPHER_SUITES_TO_DISABLE, null);
820 	}
821 
822 	/**
823 	 * Returns the comma-separated list of cipher suites to be disabled by
824 	 * listener.
825 	 *
826 	 * @return The list of cipher suites
827 	 */
828 	public String getSslListenerCipherSuitesToDisable() {
829 		return getProperty(WBEMConfigurationProperties.SSL_LISTENER_CIPHER_SUITES_TO_DISABLE, null);
830 	}
831 
832 	/**
833 	 * Returns the number of retries the client will attempt when the connection
834 	 * was refused.
835 	 *
836 	 * @return The number of retries
837 	 */
838 	public int getHttpConnectRetriesCount() {
839 		return Integer.parseInt(
840 			getProperty(
841 				WBEMConfigurationProperties.HTTP_CONNECTION_RETRIES,
842 				WBEMConfigurationDefaults.HTTP_CONNECTION_RETRIES
843 			)
844 		);
845 	}
846 
847 	/**
848 	 * Returns if the content length retry feature is enabled
849 	 *
850 	 * @return <code>true</code> if content length retry is enabled,
851 	 *         <code>false</code> otherwise
852 	 */
853 	public boolean isHttpContentLengthRetryEnabled() {
854 		return Boolean
855 			.valueOf(
856 				getProperty(
857 					WBEMConfigurationProperties.HTTP_ENABLE_CONTENT_LENGTH_RETRY,
858 					WBEMConfigurationDefaults.HTTP_ENABLE_CONTENT_LENGTH_RETRY
859 				)
860 			)
861 			.booleanValue();
862 	}
863 
864 	/**
865 	 * Returns the threshold for the content length retry algorithm
866 	 *
867 	 * @return The threshold
868 	 */
869 	public int getHttpContentLengthThreshold() {
870 		return Integer.parseInt(
871 			getProperty(
872 				WBEMConfigurationProperties.HTTP_CONTENT_LENGTH_THRESHOLD,
873 				WBEMConfigurationDefaults.HTTP_CONTENT_LENGTH_THRESHOLD
874 			)
875 		);
876 	}
877 
878 	/**
879 	 * Return the XML parser to use for processing operation responses
880 	 *
881 	 * @return The XML parser
882 	 */
883 	public String getCimXmlParser() {
884 		return getProperty(WBEMConfigurationProperties.CIMXML_PARSER, WBEMConfigurationDefaults.CIMXML_PARSER);
885 	}
886 
887 	/**
888 	 * getCimXmlEmbObjBuilder
889 	 *
890 	 * @return configuration property for the embedded object builder
891 	 */
892 	public String getCimXmlEmbObjBuilder() {
893 		return getProperty(
894 			WBEMConfigurationProperties.CIMXML_EMBOBJBUILDER,
895 			WBEMConfigurationDefaults.CIMXML_EMBOBJBUILDER
896 		);
897 	}
898 
899 	/**
900 	 * strictEmbObjTypes
901 	 *
902 	 * @return true if EmbeddedObject exactly means Embedded Class
903 	 */
904 	public boolean strictEmbObjTypes() {
905 		return Boolean
906 			.valueOf(
907 				getProperty(
908 					WBEMConfigurationProperties.CIMXML_PARSER_STRICT_EMBOBJ_TYPES,
909 					WBEMConfigurationDefaults.CIMXML_PARSER_STRICT_EMBOBJ_TYPES
910 				)
911 			)
912 			.booleanValue();
913 	}
914 
915 	/**
916 	 * upperCaseEmbObjEntities
917 	 *
918 	 * @return true if "EMBEDDEDOBJECT" entity, false if "EmbeddedObject"
919 	 */
920 	public boolean upperCaseEmbObjEntities() {
921 		return Boolean
922 			.valueOf(
923 				getProperty(
924 					WBEMConfigurationProperties.CIMXML_BUILDER_UPPERCASE_EMBOBJ_ENTITIES,
925 					WBEMConfigurationDefaults.CIMXML_BUILDER_UPPERCASE_EMBOBJ_ENTITIES
926 				)
927 			)
928 			.booleanValue();
929 	}
930 
931 	/**
932 	 * performSslHandshake
933 	 *
934 	 * @return true if SSL handshakes should take place
935 	 */
936 	public boolean performSslHandshake() {
937 		return Boolean
938 			.valueOf(
939 				getProperty(WBEMConfigurationProperties.PERFORM_SSL_HANDSHAKE, WBEMConfigurationDefaults.PERFORM_SSL_HANDSHAKE)
940 			)
941 			.booleanValue();
942 	}
943 
944 	/**
945 	 * synchronizedSslHandshake
946 	 *
947 	 * @return true if SSL handshakes should be synchronized
948 	 */
949 	public boolean synchronizedSslHandshake() {
950 		return Boolean
951 			.valueOf(
952 				getProperty(
953 					WBEMConfigurationProperties.SYNCHRONIZED_SSL_HANDSHAKE,
954 					WBEMConfigurationDefaults.SYNCHRONIZED_SSL_HANDSHAKE
955 				)
956 			)
957 			.booleanValue();
958 	}
959 
960 	/**
961 	 * socketConnectWithTimeout
962 	 *
963 	 * @return true if socket connections should be attempted with a timeout
964 	 */
965 	public boolean socketConnectWithTimeout() {
966 		return Boolean
967 			.valueOf(
968 				getProperty(
969 					WBEMConfigurationProperties.SOCKET_CONNECT_WITH_TIMEOUT,
970 					WBEMConfigurationDefaults.SOCKET_CONNECT_WITH_TIMEOUT
971 				)
972 			)
973 			.booleanValue();
974 	}
975 
976 	/**
977 	 * Returns the socket connect timeout
978 	 *
979 	 * @return The socket connect timeout
980 	 */
981 	public int getSocketConnectTimeout() {
982 		return Integer.parseInt(
983 			getProperty(WBEMConfigurationProperties.SOCKET_CONNECT_TIMEOUT, WBEMConfigurationDefaults.SOCKET_CONNECT_TIMEOUT)
984 		);
985 	}
986 
987 	/**
988 	 * Returns the socket idle timeout
989 	 *
990 	 * @return The socket idle timeout
991 	 */
992 	public int getSocketIdleTimeout() {
993 		return Integer.parseInt(
994 			getProperty(WBEMConfigurationProperties.SOCKET_IDLE_TIMEOUT, WBEMConfigurationDefaults.SOCKET_IDLE_TIMEOUT)
995 		);
996 	}
997 
998 	/**
999 	 * isDefaultAuthorizationEnabled
1000 	 *
1001 	 * @return true if default authorization is enabled
1002 	 */
1003 	public boolean isDefaultAuthorizationEnabled() {
1004 		return Boolean
1005 			.valueOf(
1006 				getProperty(
1007 					WBEMConfigurationProperties.KEY_CREDENTIALS_DEFAULT_ENABLED,
1008 					WBEMConfigurationDefaults.KEY_CREDENTIALS_DEFAULT_ENABLED
1009 				)
1010 			)
1011 			.booleanValue();
1012 	}
1013 
1014 	/**
1015 	 * getDefaultPrincipal
1016 	 *
1017 	 * @return default value of Principal
1018 	 */
1019 	public String getDefaultPrincipal() {
1020 		return getProperty(
1021 			WBEMConfigurationProperties.KEY_DEFAULT_PRINCIPAL,
1022 			WBEMConfigurationDefaults.KEY_DEFAULT_PRINCIPAL
1023 		);
1024 	}
1025 
1026 	/**
1027 	 * getDefaultCredentials
1028 	 *
1029 	 * @return default value of Credentials
1030 	 */
1031 	public String getDefaultCredentials() {
1032 		return getProperty(
1033 			WBEMConfigurationProperties.KEY_DEFAULT_CREDENTIAL,
1034 			WBEMConfigurationDefaults.KEY_DEFAULT_CREDENTIAL
1035 		);
1036 	}
1037 
1038 	/**
1039 	 * Returns the state of CIM-XML tracing
1040 	 *
1041 	 * @return <code>true</code> if tracing is enabled, <code>false</code>
1042 	 *         otherwise
1043 	 */
1044 	public boolean isCimXmlTracingEnabled() {
1045 		return Boolean
1046 			.valueOf(getProperty(WBEMConfigurationProperties.CIMXML_TRACING, WBEMConfigurationDefaults.CIMXML_TRACING))
1047 			.booleanValue();
1048 	}
1049 
1050 	/**
1051 	 * Returns the CIM-XML trace stream to be used if application does not set
1052 	 * one of its own
1053 	 *
1054 	 * @return The trace stream
1055 	 */
1056 	public String getCimXmlTraceStream() {
1057 		return getProperty(WBEMConfigurationProperties.CIMXML_TRACE_STREAM, null);
1058 	}
1059 
1060 	/**
1061 	 * Returns the backlog that is tolerated before the thread pool creates an
1062 	 * additional handler
1063 	 *
1064 	 * @return The backlog
1065 	 */
1066 	public int getListenerBacklog() {
1067 		return Integer.parseInt(
1068 			getProperty(WBEMConfigurationProperties.LISTENER_BACKLOG, WBEMConfigurationDefaults.LISTENER_BACKLOG)
1069 		);
1070 	}
1071 
1072 	/**
1073 	 * Returns the http timeout for indication connection handlers
1074 	 *
1075 	 * @return The timeout
1076 	 */
1077 	public int getListenerHttpTimeout() {
1078 		return Integer.parseInt(
1079 			getProperty(WBEMConfigurationProperties.LISTENER_HTTP_TIMEOUT, WBEMConfigurationDefaults.LISTENER_HTTP_TIMEOUT)
1080 		);
1081 	}
1082 
1083 	/**
1084 	 * Returns the http header timeout for indication connection handlers
1085 	 *
1086 	 * @return The timeout
1087 	 */
1088 	public int getListenerHttpHeaderTimeout() {
1089 		return Integer.parseInt(
1090 			getProperty(
1091 				WBEMConfigurationProperties.LISTENER_HTTP_HEADER_TIMEOUT,
1092 				WBEMConfigurationDefaults.LISTENER_HTTP_HEADER_TIMEOUT
1093 			)
1094 		);
1095 	}
1096 
1097 	/**
1098 	 * Returns the maximum allowed http timeouts before IP is blocked
1099 	 *
1100 	 * @return The maximum allowed timeouts
1101 	 */
1102 	public int getListenerMaxAllowedTimeouts() {
1103 		return Integer.parseInt(
1104 			getProperty(
1105 				WBEMConfigurationProperties.LISTENER_HTTP_MAX_ALLOWED_TIMEOUTS,
1106 				WBEMConfigurationDefaults.LISTENER_HTTP_MAX_ALLOWED_TIMEOUTS
1107 			)
1108 		);
1109 	}
1110 
1111 	/**
1112 	 * Returns the maximal pool size for indication connection handlers
1113 	 *
1114 	 * @return The maximal pool size
1115 	 */
1116 	public int getListenerMaxPoolSize() {
1117 		return Integer.parseInt(
1118 			getProperty(WBEMConfigurationProperties.LISTENER_MAX_POOL_SIZE, WBEMConfigurationDefaults.LISTENER_MAX_POOL_SIZE)
1119 		);
1120 	}
1121 
1122 	/**
1123 	 * Returns the minimal pool size for indication connection handlers
1124 	 *
1125 	 * @return The minimal pool size
1126 	 */
1127 	public int getListenerMinPoolSize() {
1128 		return Integer.parseInt(
1129 			getProperty(WBEMConfigurationProperties.LISTENER_MIN_POOL_SIZE, WBEMConfigurationDefaults.LISTENER_MIN_POOL_SIZE)
1130 		);
1131 	}
1132 
1133 	/**
1134 	 * Returns the maximal queue size for pending indication connections
1135 	 *
1136 	 * @return The maximal queue size
1137 	 */
1138 	public int getListenerMaxQueueSize() {
1139 		return Integer.parseInt(
1140 			getProperty(
1141 				WBEMConfigurationProperties.LISTENER_MAX_QUEUE_SIZE,
1142 				WBEMConfigurationDefaults.LISTENER_MAX_QUEUE_SIZE
1143 			)
1144 		);
1145 	}
1146 
1147 	/**
1148 	 * Returns the maximal idle time that is tolerated for a connection handler
1149 	 *
1150 	 * @return The maximal idle time
1151 	 */
1152 	public long getListenerMaxIdle() {
1153 		return Long.parseLong(
1154 			getProperty(
1155 				WBEMConfigurationProperties.LISTENER_HANDLER_MAX_IDLE,
1156 				WBEMConfigurationDefaults.LISTENER_HANDLER_MAX_IDLE
1157 			)
1158 		);
1159 	}
1160 
1161 	/**
1162 	 * Returns the maximal queue size for indications awaiting delivery
1163 	 *
1164 	 * @return The maximal queue size
1165 	 */
1166 	public int getListenerMaxQueuedEvents() {
1167 		return Integer.parseInt(
1168 			getProperty(
1169 				WBEMConfigurationProperties.LISTENER_MAX_QUEUED_EVENTS,
1170 				WBEMConfigurationDefaults.LISTENER_MAX_QUEUED_EVENTS
1171 			)
1172 		);
1173 	}
1174 
1175 	/**
1176 	 * Returns the state of reliable indication support
1177 	 *
1178 	 * @return <code>true</code> if reliable indication support is enabled,
1179 	 *         <code>false</code> otherwise
1180 	 */
1181 	public boolean isReliableIndicationEnabled() {
1182 		return Boolean
1183 			.valueOf(
1184 				getProperty(
1185 					WBEMConfigurationProperties.LISTENER_ENABLE_RELIABLE_INDICATIONS,
1186 					WBEMConfigurationDefaults.LISTENER_ENABLE_RELIABLE_INDICATIONS
1187 				)
1188 			)
1189 			.booleanValue();
1190 	}
1191 
1192 	/**
1193 	 * Returns the default value to use for CIM_IndicationService
1194 	 * DeliveryRetryAttempts
1195 	 *
1196 	 * @return The default value
1197 	 */
1198 	public long getListenerDeliveryRetryAttempts() {
1199 		return Long.parseLong(
1200 			getProperty(
1201 				WBEMConfigurationProperties.LISTENER_DELIVERY_RETRY_ATTEMPTS,
1202 				WBEMConfigurationDefaults.LISTENER_DELIVERY_RETRY_ATTEMPTS
1203 			)
1204 		);
1205 	}
1206 
1207 	/**
1208 	 * Returns the default value to use for CIM_IndicationService
1209 	 * DeliveryRetryInterval
1210 	 *
1211 	 * @return The default value
1212 	 */
1213 	public long getListenerDeliveryRetryInterval() {
1214 		return Long.parseLong(
1215 			getProperty(
1216 				WBEMConfigurationProperties.LISTENER_DELIVERY_RETRY_INTERVAL,
1217 				WBEMConfigurationDefaults.LISTENER_DELIVERY_RETRY_INTERVAL
1218 			)
1219 		);
1220 	}
1221 
1222 	/**
1223 	 * Returns the initial capacity of the hash table used to handle reliable
1224 	 * indications
1225 	 *
1226 	 * @return The default value
1227 	 */
1228 	public int getReliableIndicationHashtableCapacity() {
1229 		return Integer.parseInt(
1230 			getProperty(
1231 				WBEMConfigurationProperties.LISTENER_RELIABLE_INDICATION_HASHTABLE_CAPACITY,
1232 				WBEMConfigurationDefaults.LISTENER_RELIABLE_INDICATION_HASHTABLE_CAPACITY
1233 			)
1234 		);
1235 	}
1236 
1237 	/**
1238 	 * Returns the filter to use for tracing of incoming indications at the FINE
1239 	 * level
1240 	 *
1241 	 * @return The indication trace filter
1242 	 */
1243 	public String getListenerIndicationTraceFilter() {
1244 		return getProperty(WBEMConfigurationProperties.LISTENER_INDICATION_TRACE_FILTER, null);
1245 	}
1246 
1247 	/**
1248 	 * Returns whether sender IP property should be added to indications
1249 	 *
1250 	 * @return <code>true</code> if sender IP property should be added to
1251 	 *         indications, <code>false</code> otherwise
1252 	 */
1253 	public boolean getListenerAddSenderIPAddress() {
1254 		return Boolean
1255 			.valueOf(
1256 				getProperty(
1257 					WBEMConfigurationProperties.LISTENER_ADD_SENDER_IP_ADDRESS,
1258 					WBEMConfigurationDefaults.LISTENER_ADD_SENDER_IP_ADDRESS
1259 				)
1260 			)
1261 			.booleanValue();
1262 	}
1263 
1264 	/**
1265 	 * Returns whether the client will attempt to verify strings passed into the
1266 	 * <code>java.lang.Double</code> constructor or its <code>parseDouble</code>
1267 	 * method won't hang the JVM in an infinite loop.
1268 	 *
1269 	 * @return <code>true</code> if the client will attempt to verify strings
1270 	 *         passed to <code>Double</code>, <code>false</code> otherwise
1271 	 */
1272 	public boolean verifyJavaLangDoubleStrings() {
1273 		return Boolean
1274 			.valueOf(
1275 				getProperty(
1276 					WBEMConfigurationProperties.VERIFY_JAVA_LANG_DOUBLE_STRINGS,
1277 					WBEMConfigurationDefaults.VERIFY_JAVA_LANG_DOUBLE_STRINGS
1278 				)
1279 			)
1280 			.booleanValue();
1281 	}
1282 
1283 	/**
1284 	 * Returns whether the client will synchronize the data types of all numeric
1285 	 * keys in a <code>CIMInstance</code>'s <code>CIMObjectPath</code> match
1286 	 * those of the corresponding keys within the <code>CIMInstance</code>'s
1287 	 * <code>CIMProperty[]</code>.
1288 	 *
1289 	 * @return <code>true</code> if the client will synchronize
1290 	 *         <code>CIMInstance</code> numeric key data types,
1291 	 *         <code>false</code> otherwise
1292 	 */
1293 	public boolean synchronizeNumericKeyDataTypes() {
1294 		return Boolean
1295 			.valueOf(
1296 				getProperty(
1297 					WBEMConfigurationProperties.SYNCHRONIZE_NUMERIC_KEY_DATA_TYPES,
1298 					WBEMConfigurationDefaults.SYNCHRONIZE_NUMERIC_KEY_DATA_TYPES
1299 				)
1300 			)
1301 			.booleanValue();
1302 	}
1303 
1304 	/**
1305 	 * Returns the state of gzip encoding enablement.
1306 	 *
1307 	 * @return <code>true</code> if gzip encoding is enabled, <code>false</code>
1308 	 *         otherwise
1309 	 */
1310 	public boolean isGzipEncodingEnabled() {
1311 		return Boolean
1312 			.valueOf(
1313 				getProperty(WBEMConfigurationProperties.ENABLE_GZIP_ENCODING, WBEMConfigurationDefaults.ENABLE_GZIP_ENCODING)
1314 			)
1315 			.booleanValue();
1316 	}
1317 
1318 	/**
1319 	 * Returns whether the client will allow empty
1320 	 * <code>LOCALNAMESPACEPATH</code> elements in incoming CIM-XML responses.
1321 	 *
1322 	 * @return <code>true</code> if CIM-XML parser should allow empty
1323 	 *         <code>LOCALNAMESPACEPATH</code> elements in incoming responses,
1324 	 *         <code>false</code> otherwise
1325 	 */
1326 	public boolean allowEmptyLocalNameSpacePath() {
1327 		return Boolean
1328 			.valueOf(
1329 				getProperty(
1330 					WBEMConfigurationProperties.CIMXML_PARSER_ALLOW_EMPTY_LOCALNAMESPACEPATH,
1331 					WBEMConfigurationDefaults.CIMXML_PARSER_ALLOW_EMPTY_LOCALNAMESPACEPATH
1332 				)
1333 			)
1334 			.booleanValue();
1335 	}
1336 
1337 	public boolean useKeepAliveStrictMode() {
1338 		return Boolean.valueOf(
1339 			getProperty(
1340 				WBEMConfigurationProperties.HTTP_KEEP_ALIVE_STRICT_MODE,
1341 				WBEMConfigurationDefaults.HTTP_KEEP_ALIVE_STRICT_MODE
1342 			)
1343 		);
1344 	}
1345 }