View Javadoc
1   /*
2     SLPDefaults.java
3   
4     (C) Copyright IBM Corp. 2005, 2009
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 : Roberto Pineiro, IBM, roberto.pineiro@us.ibm.com
14   * @author : Chung-hao Tan, IBM, chungtan@us.ibm.com
15   * 
16   * Change History
17   * Flag       Date        Prog         Description
18   *------------------------------------------------------------------------------- 
19   * 1516246    2006-07-22  lupusalex    Integrate SLP client code
20   * 1535793    2006-09-14  lupusalex    Fix&Integrate CIM&SLP configuration classes
21   * 1804402    2007-09-28  ebak         IPv6 ready SLP
22   * 1911400    2008-03-10  blaschks-oss Source RPM file on SourceForge is broken
23   * 2003590    2008-06-30  blaschke-oss Change licensing from CPL to EPL
24   * 2524131    2009-01-21  raman_arora  Upgrade client to JDK 1.5 (Phase 1)
25   */
26  
27  package org.metricshub.wbem.sblim.slp.internal;
28  
29  /*-
30   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
31   * WBEM Java Client
32   * ჻჻჻჻჻჻
33   * Copyright 2023 - 2025 MetricsHub
34   * ჻჻჻჻჻჻
35   * Licensed under the Apache License, Version 2.0 (the "License");
36   * you may not use this file except in compliance with the License.
37   * You may obtain a copy of the License at
38   *
39   *      http://www.apache.org/licenses/LICENSE-2.0
40   *
41   * Unless required by applicable law or agreed to in writing, software
42   * distributed under the License is distributed on an "AS IS" BASIS,
43   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44   * See the License for the specific language governing permissions and
45   * limitations under the License.
46   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
47   */
48  
49  import java.util.Locale;
50  import org.metricshub.wbem.sblim.slp.ServiceType;
51  
52  /**
53   * SLPDefaults
54   *
55   */
56  /**
57   * Class SLPDefaults is responsible for
58   *
59   */
60  public interface SLPDefaults {
61  	/**
62  	 * ALL_AUTHORITIES
63  	 */
64  	public static final String ALL_AUTHORITIES = "*";
65  
66  	/**
67  	 * BROADCAST_ADDRESS
68  	 */
69  	public static final String BROADCAST_ADDRESS = "255.255.255.255";
70  
71  	/**
72  	 * CONF_URLS
73  	 */
74  	public static final String[] CONF_URLS = {
75  		"file:sblim-slp-client2.properties",
76  		"file:" + System.getProperty("user.home") + System.getProperty("file.separator") + "sblim-slp-client2.properties",
77  		"file:/etc/java/sblim-slp-client2.properties",
78  		"file:/etc/sblim-slp-client2.properties"
79  	};
80  
81  	/**
82  	 * DA_DISCOVERY_TIMEOUTS
83  	 */
84  	public static final int DA_DISCOVERY_TIMEOUTS[] = { 200, 200, 200, 200, 300, 400 };
85  
86  	/**
87  	 * DA_SERVICE_TYPE
88  	 */
89  	public static final ServiceType DA_SERVICE_TYPE = new ServiceType("service:directory-agent");
90  
91  	/**
92  	 * DATAGRAM_TIMEOUTS
93  	 */
94  	public static final int DATAGRAM_TIMEOUTS[] = { 100, 200, 300 };
95  
96  	/**
97  	 * DEFAULT_SCOPE
98  	 */
99  	public static final String DEFAULT_SCOPE = "default";
100 
101 	/**
102 	 * ACTIVE_DISCOVERY_GRANULARITY
103 	 */
104 	public static final int ACTIVE_DISCOVERY_GRANULARITY = 900;
105 
106 	/**
107 	 * ACTIVE_DISCOVERY_INTERVAL
108 	 */
109 	public static final int ACTIVE_DISCOVERY_INTERVAL = 900;
110 
111 	/**
112 	 * LOCALE
113 	 */
114 	public static final Locale LOCALE = new Locale("en", "");
115 
116 	/**
117 	 * LOG_FILE
118 	 */
119 	public static final String LOG_FILE = "slp.log";
120 
121 	/**
122 	 * LOOPBACK_ADDRESS_V4
123 	 */
124 	public static final String LOOPBACK_ADDRESS_V4 = "127.0.0.1";
125 
126 	/**
127 	 * LOOPBACK_ADDRESS_V6
128 	 */
129 	public static final String LOOPBACK_ADDRESS_V6 = "::1";
130 
131 	/**
132 	 * LOOPBACK_NAME
133 	 */
134 	public static final String LOOPBACK_NAME = "localhost";
135 
136 	/**
137 	 * MAXIMUM_RESULTS
138 	 */
139 	public static final int MAXIMUM_RESULTS = 0x7fffffff;
140 
141 	/**
142 	 * MTU
143 	 */
144 	public static final int MTU = 1400;
145 
146 	/**
147 	 * MULTICAST_ADDRESS
148 	 */
149 	public static final String MULTICAST_ADDRESS = "239.255.255.253";
150 
151 	/**
152 	 * MULTICAST_MAXIMUM_WAIT
153 	 */
154 	public static final int MULTICAST_MAXIMUM_WAIT = 2000;
155 
156 	/**
157 	 * MULTICAST_RADIUS
158 	 */
159 	public static final int MULTICAST_RADIUS = 255;
160 
161 	/**
162 	 * MULTICAST_TIMEOUTS
163 	 */
164 	public static final int MULTICAST_TIMEOUTS[] = { 200, 200, 200, 200, 300, 400 };
165 
166 	/**
167 	 * SA_SERVICE_TYPE
168 	 */
169 	public static final ServiceType SA_SERVICE_TYPE = new ServiceType("service:service-agent");
170 
171 	/**
172 	 * SERVER_SOCKET_QUEUE_LENGTH
173 	 */
174 	public static final int SERVER_SOCKET_QUEUE_LENGTH = 10;
175 
176 	/**
177 	 * SLP_PORT
178 	 */
179 	public static final int SLP_PORT = 427;
180 
181 	/**
182 	 * USE_IPV6
183 	 */
184 	public static final boolean USE_IPV6 = true;
185 
186 	/**
187 	 * USE_IPV4
188 	 */
189 	public static final boolean USE_IPV4 = true;
190 
191 	/**
192 	 * SLP_VERSION
193 	 */
194 	public static final int SLP_VERSION = 2;
195 
196 	/**
197 	 * TCP_TIMEOUT
198 	 */
199 	public static final int TCP_TIMEOUT = 20000;
200 
201 	/**
202 	 * ENCODING
203 	 */
204 	public static final String ENCODING = "UTF-8";
205 
206 	/**
207 	 * DA list is rediscovered if DACACHE_TIMEOUT (seconds) is elapsed.
208 	 */
209 	public static final int DACACHE_TIMEOUT = 90;
210 
211 	/**
212 	 * IPV6_MULTICAST_SCOPE
213 	 */
214 	public static final int IPV6_MULTICAST_SCOPE = 5;
215 }