View Javadoc
1   /*
2     WBEMConstants.java
3   
4     (C) Copyright IBM Corp. 2006, 2013
5   
6     THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
7     ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
8     CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
9   
10    You can obtain a current copy of the Eclipse Public License from
11    http://www.opensource.org/licenses/eclipse-1.0.php
12  
13    @author : Alexander Wolf-Reber, IBM, a.wolf-reber@de.ibm.com
14   * 
15   * Change History
16   * Flag       Date        Prog         Description
17   *------------------------------------------------------------------------------- 
18   * 1565892    2006-11-08  lupusalex    Make SBLIM client JSR48 compliant
19   * 1671502    2007-02-28  lupusalex    Remove dependency from Xerces
20   * 1688273    2007-04-19  lupusalex    Full support of HTTP trailers
21   * 1710066    2007-04-30  lupsualex    LocalAuth fails for z/OS Pegasus
22   * 2003590    2008-06-30  blaschke-oss Change licensing from CPL to EPL
23   * 2524131    2009-01-21  raman_arora  Upgrade client to JDK 1.5 (Phase 1)
24   * 2763216    2009-04-14  blaschke-oss Code cleanup: visible spelling/grammar errors
25   * 2882448    2009-10-21  blaschke-oss Add WBEMClientConstants from JSR48
26   * 3525138    2012-05-09  blaschke-oss Remove WBEMConstants.PROTOCOL_CIMXML
27   *    2619    2013-02-22  blaschke-oss Host should contain port when not 5988/5989
28   *    2635    2013-05-16  blaschke-oss Slowloris DoS attack for CIM indication listener port
29   */
30  
31  package org.metricshub.wbem.sblim.cimclient.internal.util;
32  
33  /*-
34   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
35   * WBEM Java Client
36   * ჻჻჻჻჻჻
37   * Copyright 2023 - 2025 MetricsHub
38   * ჻჻჻჻჻჻
39   * Licensed under the Apache License, Version 2.0 (the "License");
40   * you may not use this file except in compliance with the License.
41   * You may obtain a copy of the License at
42   *
43   *      http://www.apache.org/licenses/LICENSE-2.0
44   *
45   * Unless required by applicable law or agreed to in writing, software
46   * distributed under the License is distributed on an "AS IS" BASIS,
47   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48   * See the License for the specific language governing permissions and
49   * limitations under the License.
50   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
51   */
52  
53  import java.util.Locale;
54  
55  /**
56   * Class WBEMConstants contains global constants of the CIM client.
57   */
58  public interface WBEMConstants {
59  	/**
60  	 * The HTTP protocol
61  	 */
62  	public static final String HTTP = "HTTP";
63  
64  	/**
65  	 * The HTTPS protocol
66  	 */
67  	public static final String HTTPS = "HTTPS";
68  
69  	/**
70  	 * The default (insecure) WBEM port
71  	 */
72  	public static final int DEFAULT_WBEM_PORT = 5988;
73  
74  	/**
75  	 * The default secure WBEM port
76  	 */
77  	public static final int DEFAULT_WBEM_SECURE_PORT = 5989;
78  
79  	/**
80  	 * The CIMOM path
81  	 */
82  	public static final String CIMOM_PATH = "/cimom";
83  
84  	/**
85  	 * Platform default locales
86  	 */
87  	public static final Locale[] DEFAULT_LOCALES = new Locale[] { Locale.getDefault() };
88  
89  	/**
90  	 * HTTP MPOST
91  	 */
92  	public static final String HTTP_MPOST = "M-POST";
93  
94  	/**
95  	 * HTTP POST
96  	 */
97  	public static final String HTTP_POST = "POST";
98  
99  	/**
100 	 * MESSAGE
101 	 */
102 	public static final String MESSAGE = "MESSAGE";
103 
104 	/**
105 	 * TRACE
106 	 */
107 	public static final String TRACE = "TRACE";
108 
109 	/**
110 	 * DOM
111 	 */
112 	public static final String DOM = "DOM";
113 
114 	/**
115 	 * PULL
116 	 */
117 	public static final String PULL = "PULL";
118 
119 	/**
120 	 * SAX
121 	 */
122 	public static final String SAX = "SAX";
123 
124 	/**
125 	 * UTF-8
126 	 */
127 	public static final String UTF8 = "UTF-8";
128 
129 	/**
130 	 * The minimum value of a Unicode high-surrogate code unit in the UTF-16
131 	 * encoding.
132 	 */
133 	public static final char UTF16_MIN_HIGH_SURROGATE = '\uD800';
134 
135 	/**
136 	 * The minimum value of a Unicode low-surrogate code unit in the UTF-16
137 	 * encoding.
138 	 */
139 	public static final char UTF16_MIN_LOW_SURROGATE = '\uDC00';
140 
141 	/**
142 	 * The maximum value of a Unicode high-surrogate code unit in the UTF-16
143 	 * encoding.
144 	 */
145 	public static final char UTF16_MAX_HIGH_SURROGATE = '\uDBFF';
146 
147 	/**
148 	 * The maximum value of a Unicode low-surrogate code unit in the UTF-16
149 	 * encoding.
150 	 */
151 	public static final char UTF16_MAX_LOW_SURROGATE = '\uDFFF';
152 
153 	/**
154 	 * The minimum value of a supplementary code point.
155 	 */
156 	public static final int UNICODE_MIN_SUPPLEMENTARY_CODE_POINT = 0x010000;
157 
158 	/**
159 	 * The maximum value of a Unicode code point.
160 	 */
161 	public static final int UNICODE_MAX_CODE_POINT = 0x10ffff;
162 
163 	/**
164 	 * Status code field in HTTP trailer
165 	 */
166 	public static final String HTTP_TRAILER_STATUS_CODE = "CIMStatusCode";
167 
168 	/**
169 	 * Status description field in HTTP trailer
170 	 */
171 	public static final String HTTP_TRAILER_STATUS_DESCRIPTION = "CIMStatusCodeDescription";
172 
173 	/**
174 	 * ISO-8859-1 character encoding
175 	 */
176 	public static final String ISO_8859_1 = "ISO-8859-1";
177 
178 	/**
179 	 * System property containing the operating system's name
180 	 */
181 	public static final String OS_NAME = "os.name";
182 
183 	/**
184 	 * Operating system name as found on z/OS
185 	 */
186 	public static final String Z_OS = "z/OS";
187 
188 	/**
189 	 * Exception message for indication sender potential DoS
190 	 */
191 	public static final String INDICATION_DOS_EXCEPTION_MESSAGE =
192 		"Indication sender taking too long, possible DoS underway?";
193 }