⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 java.telephony.call.html

📁 JTAPI_html 用于JTAPI的HTML文档.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!--NewPage--><html><head><!-- Generated by javadoc on Fri Feb 07 16:42:30 PST 1997 --><a name="_top_"></a><title>  Interface java.telephony.Call</title></head><body><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.AddressObserver.html#_top_">Previous</a>  <a href="java.telephony.CallObserver.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre><hr><h1>  Interface java.telephony.Call</h1><dl>  <dt> public interface <b>Call</b>  <dt> extends <a href="java.lang.Object.html#_top_">Object</a></dl>A Call represents a telephone call. A call can have zero or moreConnections: a two-party call has two connections, and a conference callcan have three or more connections. Each Connection represents anassociation between the Call and an Address.<p>Applications create instances of a Call object with the<EM>Provider.createCall()</EM> method. After this method returns, thereturned Call object has zero Connections associated with it and is in theCall.IDLE state. The Call object maintains a reference to its Providerobject throughout the lifetime of the Call object. This Provider object doesnot change throughout the lifetime of the Call object.<p>Call objects maintain an array of Connection objects which are associatedwith the Call. A Call maintains a reference to a Connection object onlyif it is not in the Connection.DISCONNECTED state. Therefore, if a Call has areference to a Connection, then that implies the Connection is not inthe Connection.DISCONNECTED state. When Connections in a Call move into the Connection.DISCONNECTED state (e.g. when a party hangs up), the Call losesthe reference to that Connection object.<p>A Call object in the Call.IDLE state has zero Connections associated with it.All Call objects begin in the Call.IDLE state.<p>The Call object is in the Call.ACTIVE state when it has one or moreConnections associated with it. A Call may have Connections associated withit through some external action or through an application successfullyinvoking the <EM>Call.connect()</EM> method.<p>The Call object is in the Call.INVALID state when it has zero Connectionsassociated with it, but previously has Connections associated with it.A Call in Call.INVALID state once had Connections which all have moved tothe Connection.DISCONNECTED state. A Call object in the Call.INVALID statecannot be used further and should be deferenced by the application forgarbage collection. The Provider also loses its reference to the Call objectwhen the Call moves into the Call.INVALID state. This implies that theCall object is no longer returns by <EM>Provider.getCalls()</EM>.<p>The predicates for the Call states are as follows. The purpose of thepredicates is to states truths about each Call state.<p>The IDLE state (this.getState() == Call.IDLE)<OL><LI>this.getConnections() == null</OL><p>The ACTIVE state (this.getState() == Call.ACTIVE)<OL><LI>Let Connection conn[] = this.getConnections()<LI>conn != null && conn.length >= 1<LI>For all i, conn[i].getState() != Connection.DISCONNECTED</OL><p>The INVALID state (this.getState() == Call.INVALID)<OL><LI>this.getConnections() == null</OL><p>When the call is in the IDLE state, the call can be initialized by settingoptional parameters that influence the subsequent behavior of the call.Various JTAPI extension packages provide methods to set such parameters.<p>The CallObserver interface reports all events pertaining to the Call object.This not only includes state changes in the Call object, but also includesstate changes in all Connections associated with the Call object, andstate changes in all TerminalConnections associated with those Connections.The CallObserver interface also reports when new Connections andTerminalConnections are created in the Call. Applications instantiatean object which implements the CallObserver interface and uses the<EM>Call.addObserver()</EM> to begin the delivery of events to thatobserver.<p><dl>    <dt> <b>See Also:</b>    <dd> <a href="java.telephony.CallObserver.html#_top_">CallObserver</a></dl><hr><a name="index"></a><h2>  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index"></h2><dl>  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#ACTIVE"><b>ACTIVE</b></a>  <dd>  The Call.ACTIVE state indicates the Call has one or more Connections,none of which are in the Connection.DISCONNECTED state.  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#IDLE"><b>IDLE</b></a>  <dd> The Call.IDLE state indicates the Call has zero Connections.  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#INVALID"><b>INVALID</b></a>  <dd>  The Call.INVALID state indicates the Call has lost all of its Connections.</dl><h2>  <img src="images/method-index.gif" width=207 height=38 alt="Method Index"></h2><dl>  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#addObserver(java.telephony.CallObserver)"><b>addObserver</b></a>(CallObserver)  <dd> Adds an observer to the Call.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#connect(java.telephony.Terminal, java.telephony.Address, java.lang.String)"><b>connect</b></a>(Terminal, Address, String)  <dd> Connect a pair of connections to a call.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getCallCapabilities(java.telephony.Terminal, java.telephony.Address)"><b>getCallCapabilities</b></a>(Terminal, Address)  <dd> Gets the CallCapabilities object with respect to a Terminal and anAddress.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getConnections()"><b>getConnections</b></a>()  <dd> Returns the Connections associated with this call.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getObservers()"><b>getObservers</b></a>()  <dd> Returns a list of all CallObservers associated with this call object.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getProvider()"><b>getProvider</b></a>()  <dd> Returns the provider associated with the call.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getState()"><b>getState</b></a>()  <dd> Returns the current state of the telephone call.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#removeObserver(java.telephony.CallObserver)"><b>removeObserver</b></a>(CallObserver)  <dd> Removes the given observer from the Call.</dl><a name="variables"></a><h2>  <img src="images/variables.gif" width=153 height=38 alt="Variables"></h2><a name="IDLE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>IDLE</b><pre>  public final static int IDLE</pre><dl>  <dd> The Call.IDLE state indicates the Call has zero Connections. It is theinitial state of all Call objects.</dl><a name="ACTIVE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>ACTIVE</b><pre>  public final static int ACTIVE</pre><dl>  <dd> The Call.ACTIVE state indicates the Call has one or more Connections,none of which are in the Connection.DISCONNECTED state.</dl><a name="INVALID"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>INVALID</b><pre>  public final static int INVALID</pre><dl>  <dd> The Call.INVALID state indicates the Call has lost all of its Connections.A Call in this state cannot be used further.</dl><a name="methods"></a><h2>  <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="getConnections()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getConnections"><b>getConnections</b></a><pre>  public abstract <a href="java.telephony.Connection.html#_top_">Connection</a>[] getConnections() throws <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl>  <dd> Returns the Connections associated with this call. Because of theconditions mentioned above, none of the Connections returned will be inthe Connection.DISCONNECTED state. Also, if the Call is in the Call.IDLEstate or the Call.INVALID state, this method returns null. Otherwise, itreturns one or more Connections. The Provider must be in theProvider.IN_SERVICE state for this method to be valid.<p>The pre-conditions for this method are listed below:<OL><LI>(this.getProvider()).getState() == Provider.IN_SERVICE</OL><p>The post-conditions for this method are listed below:<OL><LI>Let Connectionp[] conn = Call.getConnections()<LI>if this.getState() == Call.IDLE then conn = null<LI>if this.getState() == Call.INVALID then conn = null<LI>if this.getState() == Call.ACTIVE then conn.length >= 1<LI>For all i, conn[i].getState() != Connection.DISCONNECTED</OL><p>  <dl>    <dt> <b>Returns:</b>    <dd> An array of the Connections associated with the call.    <dt> <b>Throws:</b> <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>    <dd> The Provider is not in the Provider.IN_SERVICE state.    <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a>    <dd> A platform-specific exception occurred.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -