Class java.telephony.JtapiPeerFactory
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.telephony.JtapiPeerFactory

java.lang.Object
   |
   +----java.telephony.JtapiPeerFactory

public class JtapiPeerFactory
extends Object
The JtapiPeerFactory class is a static class which is the primary means used by applications to obtain a Provider object. The term 'peer' is used throughout Java to mean "a particular platform-specific implementation of a Java interface or API. This term has the same meaning for the Java Telephony API. Applications are not permitted to create an instance of the JtapiPeerFactory class.

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.


Method Index

 o getJtapiPeer(String)
Returns an instance of a JtapiPeer object given a fully qualified classname of the class which implements the JtapiPeer object.

Methods

 o getJtapiPeer
  public static synchronized JtapiPeer getJtapiPeer(String _jtapiPeerName) throws JtapiPeerUnavailableException
Returns an instance of a JtapiPeer object given a fully qualified classname of the class which implements the JtapiPeer object.

If no classname is provided (null), a default is picked by the current implementation of this class.

Parameters:
_jtapiPeerName - The classname of the JtapiPeer object class.
Returns:
An instance of the JtapiPeer object.
Throws: JtapiPeerUnavailableException
Indicates that the JtapiPeer specified by the classname is not available.

All Packages  Class Hierarchy  This Package  Previous  Next  Index