Java Programmer's Guide and Reference


Provider class

The Provider class represents the set of Addresses, Terminals, and Calls available to an application for a particular CallPath Enterprise Server login.

The Provider maintains lists of Address objects, Terminal objects, and Call objects defined in the system and within the Provider's domain. Applications use the getAddresses(), getTerminals(), and getCalls() methods to obtain these lists. Applications can also create new Call objects using the Provider.createCall() method.

The Provider also maintains lists of dynamic Address and Terminal objects. These objects represent Addresses or Terminals other than the ones available for this Provider (based on the server and login). These objects exist while they are involved with Calls, Addresses, or Terminals that are part of the Provider.

The application obtains the Provider object from the IBM CallPath Enterprise Toolkit for Java's JtapiPeer object by using the getProvider() method. An application can obtain more than one Provider object, but it cannot share objects between the Providers even if the resources are physically in the same switch domain. For example, a terminal object associated with a particular Provider that represents the telephone on your desk is different from the terminal object associated with another Provider that represents that same physical telephone.

Methods

The IBM CallPath Enterprise Toolkit for Java's Provider object implements both the core Provider interface from the javax.telephony package and the CallCenterProvider interface from the javax.telephony.callcenter package (there is no CallControlProvider class). By casting a Provider as CallCenterProvider, an application can invoke any of the CallCenterProvider methods.

Table 2 and Table 3 list the methods (and provide comments about those methods, where appropriate) included in the core Provider class and in the CallCenterProvider class, respectively.

Note:
Static addresses and terminals are defined as the addresses and terminals within the user's provider space at the time the application makes its getProvider() call. A dynamic user (see JtapiPeer) will have as static addresses any addresses specified on the getProvider call. Dynamic addresses and terminals represent other parties that are discovered during execution.

Table 2. javax.telephony.Provider methods
Method Comments
int getState()
String getName() Returns the CallPath Enterprise Server ID (for example, 7600@cp01).
Call getCalls()
Address getAddress(String) Returns the Address associated with the String only if the Address is in the list of static Addresses associated with this Provider. Dynamic Address objects are not returned.
Address[] getAddresses() Returns a list of static Addresses. This list does not include dynamic Addresses that are created by active Calls.
Terminal getTerminal(String) Returns the Terminal associated with the String only if the Terminal is in the list of static Terminals associated with this Provider. Dynamic Terminal objects are not returned.
Terminal[] getTerminals() Returns a list of static Terminals. This list does not include dynamic terminals that are created by active Calls.
void shutdown()
Call createCall()
void addObserver(ProviderObserver)
ProviderObserver[] getObservers()
void removeObserver(ProviderObserver)
ProviderCapabilities getCapabilities() Returns only the default ProviderCapabilities.
ProviderCapabilities getProviderCapabilities() Returns only the default ProviderCapabilities.
ProviderCapabilities getProviderCapabilities(Terminal) Deprecated. Returns only the default ProviderCapabilities.
CallCapabilities getCallCapabilities() Returns only the default CallCapabilities.
CallCapabilities getCallCapabilities(Terminal, Address) Deprecated. Returns only the default CallCapabilities.
ConnectionCapabilities getConnectionCapabilities() Returns only the default ConnectionCapabilities.
ConnectionCapabilities getConnectionCapabilities(Terminal,Address) Deprecated. Returns only the default ConnectionCapabilities.
AddressCapabilities getAddressCapabilities() Returns only the default AddressCapabilities.
AddressCapabilities getAddressCapabilities(Terminal) Deprecated. Returns only the default AddressCapabilities.
TerminalConnectionCapabilities getTerminalConnectionCapabilities() Returns only the default TerminalConnectionCapabilities.
TerminalConnectionCapabilities getTerminalConnectionCapabilities(Terminal) Deprecated. Returns only the default TerminalConnectionCapabilities.
TerminalCapabilities getTerminalCapabilities() Returns only the default TerminalCapabilities.
TerminalCapabilities getTerminalCapabilities(Terminal) Deprecated. Returns only the default TerminalCapabilities.
void setPrivateData(Object data) This method is not supported. It throws MethodNotSupportedException.
Object getPrivateData() This method is not supported. It throws MethodNotSupportedException.
Object sendPrivateData(Object) This method throws PlatformException if Object is not an instance of the CallPath Enterprise implementation class: CSAPrivDataObj. See Escape mechanism for the CallPath Enterprise JTAPI package.

Table 3. javax.telephony.callcenter.CallCenterProvider methods
Method Comments

RouteAddress[] getRoutableAddresses()

This method is not supported. It throws MethodNotSupportedException.

ACDAddress[] getACDAddresses()

Returns the ACDAddress (Automatic Call Distribution Address) associated with the String only if the ACDAddress is in the list of static ACDAddresses associated with this Provider. Dynamic ACDAddress objects are not returned.
ACDManagerAddress[] getACDManagerAddresses() This method is not supported. It throws MethodNotSupportedException.

For more information, refer to the JavaSoft JTAPI 1.2 Early Access documentation.

States

The Provider can be in one of the following states:

Provider.IN_SERVICE
The Provider is available.

Provider.OUT_OF_SERVICE
The Provider is temporarily not available. The condition causing this state is not controlled by the application.

Provider.SHUTDOWN
The Provider is permanently unavailable.

The Provider is in the Provider.OUT_OF_SERVICE state when it is first created using the JtapiPeer.getProvider() method. To check for the Provider.IN_SERVICE state, the application must do one of the following:

When the Provider moves from the Provider.OUT_OF_SERVICE state to the Provider.IN_SERVICE state, the CallPath Enterprise JTAPI Server initializes the Provider with the current state of the switching domain. This includes all Addresses and Terminals associated with the Provider and any Calls that are currently active, along with their Connections and TerminalConnections.

An application must remove any references to other JTAPI objects when the Provider moves from the Provider.IN_SERVICE state to the Provider.OUT_OF_SERVICE state. The Provider creates new JTAPI objects when it moves from the Provider.OUT_OF_SERVICE state to the Provider.IN_SERVICE state.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]