JSR-043: JTAPI-1.4

javax.telephony.callcenter
Interface RouteAddress

All Superinterfaces:
Address

public interface RouteAddress
extends Address

The RouteAddress interface extends the core Address interface and add methods to allow applications the ability to select destinations for calls coming into this Address.

Applications may register to route calls for this Address via the registerRouteCallback() method defined on this interface. This method takes an instance of an object which implements the RouteCallback interface. For each Call which comes into this Address, a new RouteSession is created for each callback which is currently registered. The callbacks will receive routing requests via the callbacks.

Applications may register to route calls for all RouteAddresses via a special Address created by the Provider. This Address has the name RouteAddress.ALL_ROUTE_ADDRESS and may be obtained via the Provider.getAddresses() or Provider.getAddress() method. When applications invoke the registerRouteCallback() method on this special address, the callback will receive routing requests for all routeable Addresses in the Provider's domain.


Field Summary
static java.lang.String ALL_ROUTE_ADDRESS
          The string name of the special Address created by the Provider used by applications to register a callback for all routeable Addresses in the Provider's domain.
 
Method Summary
 void cancelRouteCallback(RouteCallback routeCallback)
          Cancels a previously registered routing callback for this Address.
 RouteSession[] getActiveRouteSessions()
          Returns an array of all active route sessions associated with this Address.
 RouteCallback[] getRouteCallback()
          Returns an array of all callbacks which are registered to route Calls for this Address.
 void registerRouteCallback(RouteCallback routeCallback)
          Registers a callback to route calls for this Address.
 
Methods inherited from interface javax.telephony.Address
addAddressListener, addCallListener, addCallObserver, addObserver, getAddressCapabilities, getAddressListeners, getCallListeners, getCallObservers, getCapabilities, getConnections, getName, getObservers, getProvider, getTerminals, removeAddressListener, removeCallListener, removeCallObserver, removeObserver
 

Field Detail

ALL_ROUTE_ADDRESS

public static final java.lang.String ALL_ROUTE_ADDRESS
The string name of the special Address created by the Provider used by applications to register a callback for all routeable Addresses in the Provider's domain.
Method Detail

registerRouteCallback

public void registerRouteCallback(RouteCallback routeCallback)
                           throws ResourceUnavailableException,
                                  MethodNotSupportedException
Registers a callback to route calls for this Address. The callback given as an argument will be notified of all routing requests for Calls which come into this Address. Applications may register a callback for all routeable Addresses in the Provider's domain by invoke this method on a special Address with the name RouteAddress.ALL_ROUTE_ADDRESS.

Multiple callbacks may be registered on a single Address. This method throws ResourceUnavailableException if the maximum number of registered callbacks on the Address has been exceeded.

Pre-Conditions

  1. this.getProvider().getState() == Provider.IN_SERVICE
Post-Conditions
  1. this.getProvider().getState() == Provider.IN_SERVICE
  2. routeCallback is an element of this.getRouteCallback()
Parameters:
routeCallback - The callback to be registered.
Throws:
ResourceUnavailableException - Indicates the maximum number of registered callbacks for this Address has been exceeded.
MethodNotSupportedException - The implementation does not support this method.

cancelRouteCallback

public void cancelRouteCallback(RouteCallback routeCallback)
                         throws MethodNotSupportedException
Cancels a previously registered routing callback for this Address. If the given callback is currently no registered on this Address, this method fails silently, i.e. no callback is removed and no exception is thrown.

Pre-Conditions

  1. this.getProvider().getState() == Provider.IN_SERVICE
Post-Conditions
  1. this.getProvider().getState() == Provider.IN_SERVICE
  2. routeCallback is not an element of this.getRouteCallback()
Parameters:
routeCallback - The callback to be cancelled.
Throws:
MethodNotSupportedException - will be thrown if provider does not support this method.

getRouteCallback

public RouteCallback[] getRouteCallback()
                                 throws MethodNotSupportedException
Returns an array of all callbacks which are registered to route Calls for this Address. This method returns null if there exists no registered callbacks.

Returns:
An array of register callbacks.
Throws:
MethodNotSupportedException - The implementation does not support this method.

getActiveRouteSessions

public RouteSession[] getActiveRouteSessions()
                                      throws MethodNotSupportedException
Returns an array of all active route sessions associated with this Address. This method returns null if there exists no active route sessions.

Returns:
An array of active route sessions associated with this Address.
Throws:
MethodNotSupportedException - The implementation does not support this method.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org