|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An Address
object represents what we commonly think of as a "telephone
number".
Address.getName()
returns the name of
the Address object.
Address objects may be classified into two categories: local and
remote. Local Address objects are those addresses which are part
of the Provider's local domain. These Address objects are created by the
implementation of the Provider object when it is first instantiated. All
of the Provider's local addresses are reported via the
Provider.getAddresses()
method. Remote Address objects are
those outside of the Provider's domain which the Provider learns about
during its lifetime through various happenings (e.g. an incoming call from
a currently unknown address). Remote Addresses are not reported via
the Provider.getAddresses()
method. Note that applications
never explicitly create new Address objects.
Address.getTerminals()
method.
An association between an Address and Terminal indicates that the Terminal is addressable via that Address. In many instances, a telephone set (represented by a Terminal object) has only one telephone number (represented by an Address object) associated with it. In more complex configurations, telephone sets may have several telephone numbers associated with them. Likewise, a telephone number may appear on more than one telephone set. For example, feature phones in PBX environments may exhibit this configuration.
Address objects are related to Call objects via the Connection object. The
Connection object has a state which describes the current
relationship between the Call and the Address. Each Address object may be
part of more than one telephone call, and in each case, is represented by
a separate Connection object. The Address.getConnections()
method returns all Connection objects currently associated with the Call.
An Address is associated with a Call until the Connection moves into the
Connection.DISCONNECTED
state. At that time, the Connection is
no longer reported via the Address.getConnections()
method.
Therefore, the Address.getConnections()
method will never
report a Connection in the Connection.DISCONNECTED
state.
Address.addAddressListener()
method. All Address-related events extend
the AddressEvent
interface provided in the core package. Applications
receive events on an listener until the listener is removed via the
Address.removeAddressListener()
method or until the Address is no
longer observable. In these instances, each AddressListener receives a
ADDRESS_EVENT_TRANSMISSION_ENDED as its final event.
Currently in the core package, the only Address-related event is ADDRESS_EVENT_TRANSMISSION_ENDED.
Address.addCallListener()
method.
When a CallListener is added to an Address, this listener instance is immediately added to all Calls at this Address and is added to all Calls which come to this Address in the future. These listeners remain on the telephone call as long as the Address is associated with the telephone call.
The specification of Address.addCallListener()
contains more
precise semantics.
AddressListener
,
CallListener
Method Summary | |
void |
addAddressListener(AddressListener listener)
Adds an listener to the Address. |
void |
addCallListener(CallListener listener)
Adds an listener to a Call object when this Address object first becomes part of that Call. |
void |
addCallObserver(CallObserver observer)
Adds an observer to a Call object when this Address object first becomes part of that Call. |
void |
addObserver(AddressObserver observer)
Adds an observer to the Address. |
AddressCapabilities |
getAddressCapabilities(Terminal terminal)
Deprecated. Since JTAPI v1.2. This method has been replaced by the Address.getCapabilities() method. |
AddressListener[] |
getAddressListeners()
Returns a list of all JAddressListeners associated with this Address object. |
CallListener[] |
getCallListeners()
Returns a list of all CallListeners associated with this Address object. |
CallObserver[] |
getCallObservers()
Returns a list of all CallObservers associated with this Address object. |
AddressCapabilities |
getCapabilities()
Returns the dynamic capabilities for this instance of the Address object. |
Connection[] |
getConnections()
Returns an array of Connection objects currently associated with this Address object at the instant the getConnections() method
is called. |
java.lang.String |
getName()
Returns the name of the Address. |
AddressObserver[] |
getObservers()
Returns a list of all AddressObservers associated with this Address object. |
Provider |
getProvider()
Returns the Provider associated with this Address. |
Terminal[] |
getTerminals()
Returns an array of Terminals associated with this Address object. |
void |
removeAddressListener(AddressListener listener)
Removes the given listener from the Address. |
void |
removeCallListener(CallListener listener)
Removes the given CallListener from the Address. |
void |
removeCallObserver(CallObserver observer)
Removes the given CallObserver from the Address. |
void |
removeObserver(AddressObserver observer)
Removes the given observer from the Address. |
Method Detail |
public java.lang.String getName()
public Provider getProvider()
public Terminal[] getTerminals()
public Connection[] getConnections()
getConnections()
method
is called. When a Connection moves into the
Connection.DISCONNECTED
state, the Address object loses the
reference to the Connection and the Connection no longer returned by this
method. Therefore, all Connections returned by this method will never be
in the Connection.DISCONNECTED
state. If the Address has no
Connections associated with it, this method returns null.
Post-conditions:
public void addObserver(AddressObserver observer) throws ResourceUnavailableException, MethodNotSupportedException
Address.removeObserver()
method or until the Address is no
longer observable. In these instances, a AddrObservationEndedEv is
delivered to the observer as its final event. The observer will receive
no events after AddrObservationEndedEv unless the observer is explicitly
re-added via the Address.addObserver()
method. Also, once
an observer receives an AddrObservationEndedEv, it will no longer be
reported via the Address.getObservers()
.
If an application attempts to add an instance of an observer already present on this Address, this attempt will silently fail, i.e. multiple instances of an observer are not added and no exception will be thrown.
Currently, only the AddrObservationEndedEv event is defined by the core package and delivered to the AddressObserver.
Post-conditions:
observer
- The observer being added.MethodNotSupportedException
- The observer cannot be added at this timeResourceUnavailableException
- The resource limit for the
number of observers has been exceeded.public AddressObserver[] getObservers()
Post-conditions:
public void removeObserver(AddressObserver observer)
If an observer is not part of the Address, then this method fails silently, i.e. no observer is removed and no exception is thrown.
Post-conditions:
observer
- The observer which is being removed.public void addCallObserver(CallObserver observer) throws ResourceUnavailableException, MethodNotSupportedException
Address.addCallObserver()
method, and observer will be
added to new telephone calls at this Address automatically.
If an application attempts to add an instance of a call observer already present on this Address, these repeated attempts will silently fail, i.e. multiple instances of a call observer are not added and no exception will be thrown.
When a call observer is added to an Address with this method, the following behavior is exhibited by the implementation.
Call.getObservers()
.
Call.getObservers().
Note that the definition of the term ".. when a call is at an Address" means that the Call contains one Connection which has this Address as its Address.
Call.removeObserver()
.
Note that this only affects the instance of the call observer for that
particular call. If the Call subsequently leaves and returns to the
Address, the observer will be re-applied.
Call.INVALID
state.
When the CallObserver leaves the Call because of one of the reasons above, it receives a CallObservationEndedEv as its final event.
Address.addCallObserver()
and
Terminal.addCallObserver()
, respectively). The rules outlined
above still apply, with the following additions:
Post-Conditions:
observer
- The observer being added.MethodNotSupportedException
- The observer cannot be added at this time.ResourceUnavailableException
- The resource limit for the
numbers of observers has been exceeded.Call
public CallObserver[] getCallObservers()
Address.addCallObserver()
method. If
there are no CallObservers associated with this Address object, this
method returns null.
Post-conditions:
public void removeCallObserver(CallObserver observer)
Address.addCallObserver()
method. If successful, the
observer will no longer be added to new Calls which are presented to this
Address, however it does not affect CallObservers which have already been
added at a Call.
Also, if the CallObserver is not part of the Address, then this method fails silently, i.e. no observer is removed and no exception is thrown.
Post-conditions:
observer
- The CallObserver which is being removed.public AddressCapabilities getCapabilities()
The dynamic Address capabilities require no additional arguments.
public AddressCapabilities getAddressCapabilities(Terminal terminal) throws InvalidArgumentException, PlatformException
Note: This method has been replaced in JTAPI v1.2. The
Address.getCapabilities()
method returns the dynamic Address
capabilities. This method now should simply invoke the
Address.getCapabilities()
method.
terminal
- This argument is ignored in JTAPI v1.2 and later.InvalidArgumentException
- This exception is never thrown in
JTAPI v1.2 and later.PlatformException
- A platform-specific exception occurred.public void addAddressListener(AddressListener listener) throws ResourceUnavailableException, MethodNotSupportedException
Address.removeAddressListener()
method or until the Address is no
longer observable. In these instances, a ADDRESS_EVENT_TRANSMISSION_ENDED is
delivered to the listener as its final event. The listener will receive
no events after ADDRESS_EVENT_TRANSMISSION_ENDED unless the listener is explicitly
re-added via the Address.addAddressListener()
method. Also, once
an listener receives an ADDRESS_EVENT_TRANSMISSION_ENDED, it will no longer be
reported via the Address.getAddressListeners()
.
If an application attempts to add an instance of an listener already present on this Address, this attempt will silently fail, i.e. multiple instances of an listener are not added and no exception will be thrown.
Currently, only the ADDRESS_EVENT_TRANSMISSION_ENDED event is defined by the core package and delivered to the AddressListener.
Post-conditions:
listener
- The listener being added.MethodNotSupportedException
- The listener cannot be added at this timeResourceUnavailableException
- The resource limit for the
number of listeners has been exceeded.public AddressListener[] getAddressListeners()
Post-conditions:
public void removeAddressListener(AddressListener listener)
If an listener is not part of the Address, then this method fails silently, i.e. no listener is removed and no exception is thrown.
Post-conditions:
listener
- The listener which is being removed.public void addCallListener(CallListener listener) throws ResourceUnavailableException, MethodNotSupportedException
Address.addCallListener()
method, and listener will be
added to new telephone calls at this Address automatically.
If an application attempts to add an instance of a call listener already present on this Address, these repeated attempts will silently fail, i.e. multiple instances of a call listener are not added and no exception will be thrown.
When a call listener is added to an Address with this method, the following behavior is exhibited by the implementation.
Call.getAddressListeners()
.
Call.getAddressListeners().
Note that the definition of the term ".. when a call is at an Address" means that the Call contains one Connection which has this Address as its Address.
Call.removeCallListener()
.
Note that this only affects the instance of the call listener for that
particular call. If the Call subsequently leaves and returns to the
Address, the listener will be re-applied.
Call.INVALID
state.
When the CallListener leaves the Call because of one of the reasons above, it receives a CALL_EVENT_TRANSMISSION_ENDED as its final event.
Address.addCallListener()
and
Terminal.addCallListener()
, respectively). The rules outlined
above still apply, with the following additions:
Call Listener Event level of Granularity
The application shall receive the event reports associated with the methods which are defined in the CallListener interface that the application implements - either the CallListener, ConnectionListener or TerminalConnectionListener interface. Note that the CallListener, ConnectionListener and TerminalConnectionListener form a hierarchy of interfaces, and so provide successively increasing amounts of call information and successively finer-grained event granularity.
Post-Conditions:
listener
- The listener being added.MethodNotSupportedException
- The listener cannot be added at this time.ResourceUnavailableException
- The resource limit for the
numbers of listeners has been exceeded.Call
public CallListener[] getCallListeners()
Address.addCallListener()
method. If
there are no CallListeners associated with this Address object, this
method returns null.
Post-conditions:
public void removeCallListener(CallListener listener)
Address.addCallListener()
method. If successful, the
listener will no longer be added to new Calls which are presented to this
Address, however it does not affect CallListeners which have already been
added at a Call.
Also, if the CallListener is not part of the Address, then this method fails silently, i.e. no listener is removed and no exception is thrown.
Post-conditions:
listener
- The CallListener which is being removed.
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |