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.sentrysoftware.wbem.sblim.slp.internal;
28  
29  /*-
30   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
31   * WBEM Java Client
32   * ჻჻჻჻჻჻
33   * Copyright (C) 2023 Sentry Software
34   * ჻჻჻჻჻჻
35   * This program is free software: you can redistribute it and/or modify
36   * it under the terms of the GNU Lesser General Public License as
37   * published by the Free Software Foundation, either version 3 of the
38   * License, or (at your option) any later version.
39   *
40   * This program is distributed in the hope that it will be useful,
41   * but WITHOUT ANY WARRANTY; without even the implied warranty of
42   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43   * GNU General Lesser Public License for more details.
44   *
45   * You should have received a copy of the GNU General Lesser Public
46   * License along with this program.  If not, see
47   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
48   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
49   */
50  
51  import java.util.Locale;
52  
53  import org.sentrysoftware.wbem.sblim.slp.ServiceType;
54  
55  /**
56   * SLPDefaults
57   * 
58   */
59  /**
60   * Class SLPDefaults is responsible for
61   * 
62   */
63  public interface SLPDefaults {
64  
65  	/**
66  	 * ALL_AUTHORITIES
67  	 */
68  	public static final String ALL_AUTHORITIES = "*";
69  
70  	/**
71  	 * BROADCAST_ADDRESS
72  	 */
73  	public static final String BROADCAST_ADDRESS = "255.255.255.255";
74  
75  	/**
76  	 * CONF_URLS
77  	 */
78  	public static final String[] CONF_URLS = {
79  			"file:sblim-slp-client2.properties",
80  			"file:" + System.getProperty("user.home") + System.getProperty("file.separator")
81  					+ "sblim-slp-client2.properties",
82  			"file:/etc/java/sblim-slp-client2.properties", "file:/etc/sblim-slp-client2.properties" };
83  
84  	/**
85  	 * DA_DISCOVERY_TIMEOUTS
86  	 */
87  	public static final int DA_DISCOVERY_TIMEOUTS[] = { 200, 200, 200, 200, 300, 400 };
88  
89  	/**
90  	 * DA_SERVICE_TYPE
91  	 */
92  	public static final ServiceType DA_SERVICE_TYPE = new ServiceType("service:directory-agent");
93  
94  	/**
95  	 * DATAGRAM_TIMEOUTS
96  	 */
97  	public static final int DATAGRAM_TIMEOUTS[] = { 100, 200, 300 };
98  
99  	/**
100 	 * DEFAULT_SCOPE
101 	 */
102 	public static final String DEFAULT_SCOPE = "default";
103 
104 	/**
105 	 * ACTIVE_DISCOVERY_GRANULARITY
106 	 */
107 	public static final int ACTIVE_DISCOVERY_GRANULARITY = 900;
108 
109 	/**
110 	 * ACTIVE_DISCOVERY_INTERVAL
111 	 */
112 	public static final int ACTIVE_DISCOVERY_INTERVAL = 900;
113 
114 	/**
115 	 * LOCALE
116 	 */
117 	public static final Locale LOCALE = new Locale("en", "");
118 
119 	/**
120 	 * LOG_FILE
121 	 */
122 	public static final String LOG_FILE = "slp.log";
123 
124 	/**
125 	 * LOOPBACK_ADDRESS_V4
126 	 */
127 	public static final String LOOPBACK_ADDRESS_V4 = "127.0.0.1";
128 
129 	/**
130 	 * LOOPBACK_ADDRESS_V6
131 	 */
132 	public static final String LOOPBACK_ADDRESS_V6 = "::1";
133 
134 	/**
135 	 * LOOPBACK_NAME
136 	 */
137 	public static final String LOOPBACK_NAME = "localhost";
138 
139 	/**
140 	 * MAXIMUM_RESULTS
141 	 */
142 	public static final int MAXIMUM_RESULTS = 0x7fffffff;
143 
144 	/**
145 	 * MTU
146 	 */
147 	public static final int MTU = 1400;
148 
149 	/**
150 	 * MULTICAST_ADDRESS
151 	 */
152 	public static final String MULTICAST_ADDRESS = "239.255.255.253";
153 
154 	/**
155 	 * MULTICAST_MAXIMUM_WAIT
156 	 */
157 	public static final int MULTICAST_MAXIMUM_WAIT = 2000;
158 
159 	/**
160 	 * MULTICAST_RADIUS
161 	 */
162 	public static final int MULTICAST_RADIUS = 255;
163 
164 	/**
165 	 * MULTICAST_TIMEOUTS
166 	 */
167 	public static final int MULTICAST_TIMEOUTS[] = { 200, 200, 200, 200, 300, 400 };
168 
169 	/**
170 	 * SA_SERVICE_TYPE
171 	 */
172 	public static final ServiceType SA_SERVICE_TYPE = new ServiceType("service:service-agent");
173 
174 	/**
175 	 * SERVER_SOCKET_QUEUE_LENGTH
176 	 */
177 	public static final int SERVER_SOCKET_QUEUE_LENGTH = 10;
178 
179 	/**
180 	 * SLP_PORT
181 	 */
182 	public static final int SLP_PORT = 427;
183 
184 	/**
185 	 * USE_IPV6
186 	 */
187 	public static final boolean USE_IPV6 = true;
188 
189 	/**
190 	 * USE_IPV4
191 	 */
192 	public static final boolean USE_IPV4 = true;
193 
194 	/**
195 	 * SLP_VERSION
196 	 */
197 	public static final int SLP_VERSION = 2;
198 
199 	/**
200 	 * TCP_TIMEOUT
201 	 */
202 	public static final int TCP_TIMEOUT = 20000;
203 
204 	/**
205 	 * ENCODING
206 	 */
207 	public static final String ENCODING = "UTF-8";
208 
209 	/**
210 	 * DA list is rediscovered if DACACHE_TIMEOUT (seconds) is elapsed.
211 	 */
212 	public static final int DACACHE_TIMEOUT = 90;
213 
214 	/**
215 	 * IPV6_MULTICAST_SCOPE
216 	 */
217 	public static final int IPV6_MULTICAST_SCOPE = 5;
218 
219 }