📄 java.telephony.terminal.html
字号:
<dd> A platform-specific exception occurred. </dl></dl><a name="addObserver(java.telephony.TerminalObserver)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="addObserver"><b>addObserver</b></a><pre> public abstract void addObserver(<a href="java.telephony.TerminalObserver.html#_top_">TerminalObserver</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 the Terminal. The TerminalObserver reports allTerminal-related state changes as events. The Terminal object will reportevents to this TerminalObserver object for the lifetime of the Terminalobject or until the observer is removed with the<EM>Terminal.removeObserver()</EM>.<p>If an application attempts to add an instance of an observer alreadypresent on this Terminal, 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>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> <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.TerminalObserver.html#_top_">TerminalObserver</a>[] getObservers() throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Returns a list of all TerminalObservers associated with this Terminal object.If there are no observers associated with this Terminal, this methodreturns null.<p>There are no pre-conditions for this method.<p>The post-conditions for this method are:<OL><LI>Let TerminalObserver[] obs = this.getObservers()<LI>obs == null or obs.length >= 1</OL><p> <dl> <dt> <b>Returns:</b> <dd> An array of TerminalObserver objects associated with thisTerminal. <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.TerminalObserver)"><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.TerminalObserver.html#_top_">TerminalObserver</a> observer) throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Removes the given observer from the Terminal. If successful, the observerwill no longer receive events generated by this Terminal object.<p>If an observer is not part of the Terminal, 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 Terminal object first becomespart of that Call. This method permits applications to select a Terminalobject in which they are interested and automatically have theimplementation attach an observer to each Call in which this Terminalis included.<p>For example, an application may want to monitor the telephony callactivity associated with a particular terminal. In version 1.0 of theJava Telephony specification, the application must first monitor theTerminal for the TermCallAtTermEv event and them manually add an observerto the new Call object.<p>In version 1.1 of the specification, the TermCallAtTermEv does not existand this method replaces the functionality described above. Instead ofmonitoring for a TermCallAtTermEv event, this application simply usesthe Terminal.addCallObserver() method, and observer will be added tonew telephone calls at the Terminal automatically.<p>The CallObserver is removed from the call when the Call leaves theTerminal.<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 Terminal object behaves similarly to A call observer added on a Call object, except that it providesa snapshot of all calls active on that Terminal. <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 Terminalobject. 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 Terminal 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 thisTerminal. <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 Terminal. 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 Terminal, however it does not affectCallObservers which have already been added to a Call.<p>Also, if a CallObserver is not part of the Terminal, 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="getTerminalCapabilities(java.telephony.Terminal, java.telephony.Address)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getTerminalCapabilities"><b>getTerminalCapabilities</b></a><pre> public abstract <a href="java.telephony.capabilities.TerminalCapabilities.html#_top_">TerminalCapabilities</a> getTerminalCapabilities(<a href="#_top_">Terminal</a> terminal, <a href="java.telephony.Address.html#_top_">Address</a> address) throws <a href="java.telephony.InvalidArgumentException.html#_top_">InvalidArgumentException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Gets the TerminalConnectionCapabilities object with respect to a Terminal and anAddress.If null is passed as a Terminal parameter, the general/provider-wide Terminal Connection capabilities are returned.<p></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="java.telephony.ProviderObserver.html#_top_">Previous</a> <a href="java.telephony.TerminalConnection.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -