2362N/A * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The TerminalFactorySpi class defines the service provider interface. 0N/A * Applications do not access this class directly, instead see 0N/A * {@linkplain TerminalFactory}. 0N/A * <P>Service providers that want to write a new implementation should define 0N/A * a concrete subclass of TerminalFactorySpi with a constructor that takes 0N/A * an <code>Object</code> as parameter. That class needs to be registered 0N/A * in a {@linkplain java.security.Provider}. The engine 0N/A * {@linkplain java.security.Provider.Service#getType type} is 0N/A * <code>TerminalFactory</code>. 0N/A * Service providers also need to implement subclasses of the abstract classes 0N/A * {@linkplain CardTerminals}, {@linkplain CardTerminal}, {@linkplain Card}, 0N/A * and {@linkplain CardChannel}. 0N/A * package com.somedomain.card; 0N/A * import java.security.Provider; 0N/A * public class MyProvider extends Provider { 0N/A * public MyProvider() { 0N/A * super("MyProvider", 1.0d, "Smart Card Example"); 0N/A * put("TerminalFactory.MyType", "com.somedomain.card.MySpi"); 0N/A * package com.somedomain.card; 0N/A * import javax.smartcardio.*; 0N/A * public class MySpi extends TerminalFactoySpi { 0N/A * public MySpi(Object parameter) { 0N/A * // initialize as appropriate 0N/A * protected CardTerminals engineTerminals() { 0N/A * // add implementation code here 0N/A * @see TerminalFactory 0N/A * @see java.security.Provider 0N/A * @author Andreas Sterbenz 0N/A * @author JSR 268 Expert Group 0N/A * Constructs a new TerminalFactorySpi object. 0N/A * <p>This class is part of the service provider interface and not accessed 0N/A * directly by applications. Applications 0N/A * should use TerminalFactory objects, which can be obtained by calling 0N/A * {@linkplain TerminalFactory#getInstance TerminalFactory.getInstance()} 0N/A * <p>Concrete subclasses should define a constructor that takes an 0N/A * <code>Object</code> as parameter. It will be invoked when an 0N/A * application calls one of the {@linkplain TerminalFactory#getInstance 0N/A * TerminalFactory.getInstance()} methods and receives the <code>params</code> 0N/A * object specified by the application. 0N/A * Returns the CardTerminals created by this factory. 0N/A * @return the CardTerminals created by this factory.