📄 java.telephony.address.html
字号:
If an application attempts to add an instance of an observer alreadypresent on this Address, then repeated attempts to add the instanceof the observer will silently fail, i.e. multiple instances of anobserver are not added and no exception will be thrown.<p>This method is valid anytime and has no pre-conditions.<p>The post-condition predicates for this method are:<OL><LI>observer is an element of this.getObservers()</OL><p> <dl> <dt> <b>Parameters:</b> <dd> observer - The observer being added. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> The resource limit for thenumbers of observers has been exceeded. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="getObservers()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getObservers"><b>getObservers</b></a><pre> public abstract <a href="java.telephony.AddressObserver.html#_top_">AddressObserver</a>[] getObservers() throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Returns a list of all AddressObservers associated with this Addressobject. If there are no observers associated with this Address object,this method returns null.<p>There are no pre-conditions for this method.<p>The post-conditions for this method are:<OL><LI>Let AddressObserver[] obs = this.getObservers()<LI>obs == null or obs.length >= 1</OL><p> <dl> <dt> <b>Returns:</b> <dd> An array of AddressObserver objects associated with thisAddress. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="removeObserver(java.telephony.AddressObserver)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="removeObserver"><b>removeObserver</b></a><pre> public abstract void removeObserver(<a href="java.telephony.AddressObserver.html#_top_">AddressObserver</a> observer) throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Removes the given observer from the Address. If successful, the observerwill no longer receive events generated by this Address object.<p>Also, if an observer is not part of the Address, then this methodfails silently, i.e. no observer is removed an no exception is thrown.<p>There are no pre-conditions for this method.<p>The post-condition predicates for this method are:<OL><LI>observer is not an element of this.getObservers()</OL><p> <dl> <dt> <b>Parameters:</b> <dd> observer - The observer which is being removed. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="addCallObserver(java.telephony.CallObserver)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="addCallObserver"><b>addCallObserver</b></a><pre> public abstract void addCallObserver(<a href="java.telephony.CallObserver.html#_top_">CallObserver</a> observer) throws <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Adds an observer to a Call object when this Address object first becomespart of that Call. This method permits applications to select a Addressobject in which they are interested and automatically have theimplementation attach an observer to each Call in which this Addressis included.<p>For example, an application may want to monitor the telephone callactivity associated with a particular address. In version 1.0 of theJava Telephony specification, the application must first monitor theAddress for the AddrCallAtAddrEv event and them manually add an observerto the new Call object.<p>In version 1.1 of the specification, the AddrCallAtAddrEv does not existand this method replaces the functionality described above. Instead ofmonitoring for a AddrCallAtAddrEv event, this application simply usesthe Address.addCallObserver() method, and observer will be added tonew telephone calls at the Address automatically.<p>The CallObserver is removed from the call when the Call leaves thisAddress.<p>If an application attempts to add an instance of an observer alreadypresent on the Call, then repeated attempts to add the instanceof the observer will silently fail, i.e. multiple instances of anobserver are not added and no exception will be thrown.<p>A call observer added on an Address object behaves similarly to a call observer added on a Call object, except that it providesa snapshot of all calls active on that Address. <dl> <dt> <b>Parameters:</b> <dd> observer - The observer being added. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> The resource limit for thenumbers of observers has been exceeded. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. <dt> <b>See Also:</b> <dd> <a href="java.telephony.Call <p>There are no pre-conditions for this method.<p>The post-condition predicates for this method are:<OL><LI>observer is an element of this.getObservers()</OL><p>.html#_top_">getObservers()</OL><p></a> </dl></dl><a name="getCallObservers()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getCallObservers"><b>getCallObservers</b></a><pre> public abstract <a href="java.telephony.CallObserver.html#_top_">CallObserver</a>[] getCallObservers() throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Returns a list of all CallObservers associated with this Addressobject. That is, it returns a list of CallObserver object which havebeen added via the <EM>addCallObserver()</EM> method. If there are noCall observers associated with this Address object, this method returnsnull.<p>There are no pre-conditions for this method.<p>The post-conditions for this method are:<OL><LI>Let CallObserver[] obs = this.getCallObservers()<LI>obs == null or obs.length >= 1</OL><p> <dl> <dt> <b>Returns:</b> <dd> An array of CallObserver objects associated with thisAddress. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="removeCallObserver(java.telephony.CallObserver)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="removeCallObserver"><b>removeCallObserver</b></a><pre> public abstract void removeCallObserver(<a href="java.telephony.CallObserver.html#_top_">CallObserver</a> observer) throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Removes the given CallObserver from the Address. In other words, itremoves a CallObserver which was added via the <EM>addCallObserver()</EM>method. If successful, the observer will no longer be added to newCalls which are presented to this Address, however it does not affectCallObservers which have already been added to a Call.<p>Also, if a CallObserver is not part of the Address, then this methodfails silently, i.e. no observer is removed an no exception is thrown.<p>There are no pre-conditions for this method.<p>The post-condition predicates for this method are:<OL><LI>observer is not an element of this.getCallObservers()</OL><p> <dl> <dt> <b>Parameters:</b> <dd> observer - The CallObserver which is being removed. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="getAddressCapabilities(java.telephony.Terminal)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getAddressCapabilities"><b>getAddressCapabilities</b></a><pre> public abstract <a href="java.telephony.capabilities.AddressCapabilities.html#_top_">AddressCapabilities</a> getAddressCapabilities(<a href="java.telephony.Terminal.html#_top_">Terminal</a> terminal) throws <a href="java.telephony.InvalidArgumentException.html#_top_">InvalidArgumentException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Gets the AddressCapabilities object with respect to a Terminal If null is passed as a Terminal parameter, the general/provider-wideAddress capabilities are returned.</dl><hr><pre><a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-java.telephony.html">This Package</a> <a href="Package-java.telephony.html">Previous</a> <a href="java.telephony.AddressObserver.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -