JSR-043: JTAPI-1.4

javax.telephony
Interface JtapiPeer


public interface JtapiPeer

The JtapiPeer interface represents a vendor's particular implementation of the Java Telephony API.

Introduction

Each JTAPI implementation vendor must implement this interface. The JtapiPeer object returned by the JtapiPeerFactory.getJtapiPeer() method determines which Providers are made available to the application.

Obtaining a Provider

Applications use the JtapiPeer.getProvider() method on this interface to obtain new Provider objects. Each implementation may support one or more different "services" (e.g. for different types of underlying network substrate). A list of available services can be obtained via the JtapiPeer.getServices() method.

Applications may also supply optional arguments to the Provider through the JtapiPeer.getProvider() method. These arguments are appended to the providerString argument passed to the JtapiPeer.getProvider() method. The providerString argument has the following format:

< service name > ; arg1 = val1; arg2 = val2; ...

Where < service name > is not optional, and each optional argument pair which follows is separated by a semi-colon. The keys for these arguments is implementation specific, except for two standard-defined keys:

  1. login: provides the login user name to the Provider.
  2. passwd: provides a password to the Provider.

See Also:
JtapiPeerFactory

Method Summary
 java.lang.String getName()
          Returns the name of this JtapiPeer object instance.
 Provider getProvider(java.lang.String providerString)
          Returns an instance of a Provider object given a string argument which contains the desired service name.
 java.lang.String[] getServices()
          Returns the services that this implementation supports.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of this JtapiPeer object instance. This name is the same name used as an argument to JtapiPeerFactory.getJtapiPeer() method.

Returns:
The name of this JtapiPeer object instance.

getServices

public java.lang.String[] getServices()
Returns the services that this implementation supports. This method returns null if no services as supported.

Returns:
The services that this implementation supports.

getProvider

public Provider getProvider(java.lang.String providerString)
                     throws ProviderUnavailableException
Returns an instance of a Provider object given a string argument which contains the desired service name. Optional arguments may also be provided in this string, with the following format:

< service name > ; arg1 = val1; arg2 = val2; ...

Where < service name > is not optional, and each optional argument pair which follows is separated by a semi-colon. The keys for these arguments is implementation specific, except for two standard-defined keys:

  1. login: provides the login user name to the Provider.
  2. passwd: provides a password to the Provider.

If the argument is null, this method returns some default Provider as determined by the JtapiPeer object. The returned Provider is in the Provider.OUT_OF_SERVICE state.

Post-conditions:

  1. this.getProvider().getState() == Provider.OUT_OF_SERVICE
Parameters:
providerString - The name of the desired service plus an optional arguments.
Returns:
An instance of the Provider object.
Throws:
ProviderUnavailableException - Indicates a Provider corresponding to the given string is unavailable.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org