All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.telephony.JtapiPeerFactory
Applications use this class to first obtain a class which implements the java.telephony.JtapiPeer interface. This JtapiPeer interface represents a paritcular vendor's implementation of the telephony API.
Once applications have a JtapiPeer object for a particular platform- dependent implementation, they may obtain a Provider object via that interface. The details of that interface are discussed in the specification for the JtapiPeer interface.
Applications use the getJtapiPeer() method on this class to obtain a JtapiPeer object. The argument to this method is a classname which represents an object which implements the JtapiPeer interface. This object and the classname under which it can be found must be supplied by the vendor of the implementation. Note that this object is not a Provider, however, this interface is used to obtain Providers from that particular implementation.
The Java Telephony API places conventions on vendors on the classname they use for their JtapiPeer object. This class name must begin with the domain name assigned to the vendor in reverse order. Because the space of domain names is managed, it ensures that collisions between two different vendor's implementations will not happen. For example, an implementation from Sun Microsystem's will have "com.sun" as the prefix to its JtapiPeer class. After the reversed domain name, vendor's are free to choose any class hierarchy they desire.
In basic environments, applications and users do not want the burden of finding out the class name in order to use a particular implementation. Therefore, the JtapiPeerFactory class supports a mechanism for applications to obtain the default implementation for their system. If applications use a null argument to the getJtapiPeer() method, they will be returned the default installed implementation on their system.
Note: It is the responsibilty of implementation vendor's to supply a version of this JtapiPeerFactory class which has a default implementation programmed into it. During the installation of their implementation on a system, this generic class should be replaced with their own version which points to a default implementation. Implementation just have to implement the private getDefaultJtapiPeerName() method. The specification provides a generic version of this class with no default provider built-in.
public static synchronized JtapiPeer getJtapiPeer(String _jtapiPeerName) throws JtapiPeerUnavailableException
If no classname is provided (null), a default is picked by the current implementation of this class.
All Packages Class Hierarchy This Package Previous Next Index