165 }
166
167 private final TerminalFactorySpi spi;
168
169 private final Provider provider;
170
171 private final String type;
172
173 private TerminalFactory(TerminalFactorySpi spi, Provider provider, String type) {
174 this.spi = spi;
175 this.provider = provider;
176 this.type = type;
177 }
178
179 /**
180 * Get the default TerminalFactory type.
181 *
182 * <p>It is determined as follows:
183 *
184 * when this class is initialized, the system property
185 * <code>javax.smartcardio.TerminalFactory.DefaultType</code>
186 * is examined. If it is set, a TerminalFactory of this type is
187 * instantiated by calling the {@linkplain #getInstance
188 * getInstance(String,Object)} method passing
189 * <code>null</code> as the value for <code>params</code>. If the call
190 * succeeds, the type becomes the default type and the factory becomes
191 * the {@linkplain #getDefault default} factory.
192 *
193 * <p>If the system property is not set or the getInstance() call fails
194 * for any reason, the system defaults to an implementation specific
195 * default type and TerminalFactory.
196 *
197 * @return the default TerminalFactory type
198 */
199 public static String getDefaultType() {
200 return defaultType;
201 }
202
203 /**
204 * Returns the default TerminalFactory instance. See
205 * {@linkplain #getDefaultType} for more information.
|
165 }
166
167 private final TerminalFactorySpi spi;
168
169 private final Provider provider;
170
171 private final String type;
172
173 private TerminalFactory(TerminalFactorySpi spi, Provider provider, String type) {
174 this.spi = spi;
175 this.provider = provider;
176 this.type = type;
177 }
178
179 /**
180 * Get the default TerminalFactory type.
181 *
182 * <p>It is determined as follows:
183 *
184 * when this class is initialized, the system property
185 * {@systemProperty javax.smartcardio.TerminalFactory.DefaultType}
186 * is examined. If it is set, a TerminalFactory of this type is
187 * instantiated by calling the {@linkplain #getInstance
188 * getInstance(String,Object)} method passing
189 * <code>null</code> as the value for <code>params</code>. If the call
190 * succeeds, the type becomes the default type and the factory becomes
191 * the {@linkplain #getDefault default} factory.
192 *
193 * <p>If the system property is not set or the getInstance() call fails
194 * for any reason, the system defaults to an implementation specific
195 * default type and TerminalFactory.
196 *
197 * @return the default TerminalFactory type
198 */
199 public static String getDefaultType() {
200 return defaultType;
201 }
202
203 /**
204 * Returns the default TerminalFactory instance. See
205 * {@linkplain #getDefaultType} for more information.
|