📄 java.telephony.callcontrol.callcontrolcall.html
字号:
In a typical scenario, this new Connection has the same sequence of statetransitions as a destination Connection when the method Call.connect()is invoked. Documentation of that method provides detail of the possiblestate transition scenarios of the new Connection created by this method.<p>On some platforms, switch limitations impose restrictions on the number ofconnections of a particular state in a call. For instance, it is common torestrict the number of ALERTING connections to at most one. If anyoperation is attempted that would violate one of these restrictions.As a result, one precondition for this method is that there cannot beanother connection in either the INPROGRESS or ALERTING state. Althoughsome systems may not enforce this requirement, for consistency the JavaTelephony API chose this conservative requirement.<p> <dl> <dt> <b>Parameters:</b> <dd> newParty - The telephone number address of the party to be added. <dt> <b>Returns:</b> <dd> The new Connection associated with the added party. <dt> <b>Throws:</b> <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a> <dd> The state of some object is not validas designated by the pre-conditions for this method. <dt> <b>Throws:</b> <a href="java.telephony.InvalidPartyException.html#_top_">InvalidPartyException</a> <dd> The new party to be added to the callis invalid. <dt> <b>Throws:</b> <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a> <dd> This method is not supported bythe implementation. <dt> <b>Throws:</b> <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a> <dd> The application does not havethe proper authority to invoke this method. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> An internal resource neccessaryfor the successful invocation of this method is not available. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="drop()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="drop"><b>drop</b></a><pre> public abstract void drop() throws <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a>, <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Drops the entire Call. This method is equivalent to using thedisconnect() method on each Connections which is part of the Call. Thereare some Connections which the application does not possess the properauthority to drop. In this case, the drop() method performs no actionon these. As a result of dropping some of the Connection, the otherConnections which the application cannot control may drop automaticallyas a result. If all Connections succeed in moving to the DISCONNECTEDstate, the call becomes INVALID. This method returns when it cansuccessfully drop as many Connections are possible. All of theTerminalConnections associated with the dropped Connections will moveinto the DROPPED state. <p>The pre-conditions for this method are:<OL><LI>(call.getProvider()).getState() == IN_SERVICE<LI>call.getState() == ACTIVE</OL><p>The post-conditions for this method are:<OL><LI>(call.getProvider()).getState() == IN_SERVICE<LI>if all connections = call.getConnections() andconnections.getState() == DISCONNECTED, then call.getState() == INVALID<LI>for all connections = call.getConnections and connections.getState()== DISCONNECTED, for all termconns = connections.getTerminalConnections(),termconns.getState() == DROPPED.</OL><p> <dl> <dt> <b>Throws:</b> <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a> <dd> The state of some object is not validas designated by the pre-conditions for this method. <dt> <b>Throws:</b> <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a> <dd> This method is not supported bythe implementation. <dt> <b>Throws:</b> <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a> <dd> The application does not havethe proper authority to invoke this method and it can drop none of theConnections. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> An internal resource neccessaryfor the successful invocation of this method is not available. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="offHook(java.telephony.Address, java.telephony.Terminal)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="offHook"><b>offHook</b></a><pre> public abstract <a href="java.telephony.callcontrol.CallControlConnection.html#_top_">CallControlConnection</a> offHook(<a href="java.telephony.Address.html#_top_">Address</a> origaddress, <a href="java.telephony.Terminal.html#_top_">Terminal</a> origterminal) throws <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a>, <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Takes the originating end of a telephone call off-hook. This methodpermits application to simply take the originating terminal of a telephonecall off-hook, so that users may manually dial telephone number digitsor applications may supply digits with the<EM>CallControlConnection.addToAddress()</EM> method. This is in contrastto the <EM>Call.connect()</EM> method which requires the completedestination address string.<p>This Call object must be in the IDLE state prior to the invocation ofthis method. This method creates a Connection to the originating Addressin the CallControlConnection.INITIATED state and returns this Connectionat the successful completion of this method. This method also createsa TerminalConnection associated with the originating Terminal in theCallControlTerminalConnection.TALKING state.<p>The pre-conditions for this method are:<OL><LI>(this.getProvider()).getState() == Provider.IN_SERVICE<LI>this.getState() == Call.IDLE</OL><p>The post-conditions for this method are:<OL><LI>(this.getProvider()).getState() == Provider.IN_SERVICE<LI>Let Connnection c = this.offHook(Address, Terminal)<LI>c.getCallControlState() == CallControlConnection.INITIATED<LI>Let TerminalConnection tc[] = c.getTerminalConnections()<LI>tc.length == 1<LI>tc[0].getCallControlState() == CallControlTerminalConnection.TALKING;<LI>tc element of origterminal.getTerminalConnections()<LI>c element of origaddress.getConnections()<LI>c element of this.getConnections()</OL><p> <dl> <dt> <b>Parameters:</b> <dd> origaddress - The originating Address object. <dd> origterminal - The originating Terminal object. <dt> <b>Returns:</b> <dd> The Connection associated with the originating end of thetelephone call. <dt> <b>Throws:</b> <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a> <dd> The state of some object is not validas designated by the pre-conditions for this method. <dt> <b>Throws:</b> <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a> <dd> This method is not supported bythe implementation. <dt> <b>Throws:</b> <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a> <dd> The application does not havethe proper authority to invoke this method and it can drop none of theConnections. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> An internal resource neccessaryfor the successful invocation of this method is not available. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="conference(java.telephony.Call)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="conference"><b>conference</b></a><pre> public abstract void conference(<a href="java.telephony.Call.html#_top_">Call</a> otherCall) throws <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.InvalidArgumentException.html#_top_">InvalidArgumentException</a>, <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a>, <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Merges two Calls together resulting in the union of the parties involvedwith both calls belong to a single telephone call. The telephone Callprovided as the argument has its Connections move to this Call object,and the Call object argument becomes invalid.<p>In order for a conference action to be successful, there must exista Terminal object which is part of both telephone Calls. Furthermore,this Terminal object will have two TerminalConnections associated withit which are each part of one of the Calls. An application may havespecified on such TerminalConnections on this call to be the "conferencecontroller". If the application did not make such a selection, theimplementation chooses a suitable Terminal and TerminalConnection. Weshall call the TerminalConnection on this Call acting as the conferencecontroller (whether selected by the application or not) as "conftermconn"and its Terminal as "confterm". The TerminalConnection associated withconfterm and the second Call object, we shall call "scndtermconn". Thefollowing are the initial pre-condition predicates for this method:<p><OL><LI>(call.getProvider()).getState() == IN_SERVICE<LI>call.getState() == ACTIVE<LI>conftermconn element of call.getConnections().getTerminalConnections()<LI>conftermconn element of confterm.getTerminalConnections()<LI>scndtermconn element ofothercall.getConnections().getTerminalConnections()<LI>scndtermconn element of confterm.getTerminalConnections()</OL><p>These two TerminalConnections must be in a particular state. Specifically,conftermconn must be in the CallControlTerminalConnection.ACTIVE stateand scndtermconn must be in the CallControlTerminalConnection.HELD state.These additional pre-conditions are listed below:<p><OL><LI>conftermconn.getState() == ACTIVE<LI>scndtermcomm.getState() == HELD</OL><p>The conference() method "merges" these two telephone Calls together bytaking all of the Connections and TerminalConnections on otherCall andcreating new Connections and TerminalConnections with the same Addressand Terminal objects, respectively, in the same state as in oldCall. Theconftermconn and scndtermconn are the exception. The scndtermconnTerminalConnection in otherCall moves to the DROPPED state. Let c equalsome Connections in otherCall and tc equal some TerminalConnection inotherCall. Then, for all Connection's c and TerminalConnections tc(with the exception tc = scndtermconn), the following post-conditionsindicate the result of the conference method. The construct new(c) andnew(tc) mean to create a new Connection and TerminalConnection objectwith the same Address and TerminalConnection references.<p><OL><LI>(call.getProvider()).getState() == IN_SERVICE<LI>call.getState() == ACTIVE<LI>new(c) element of call.getConnections()<LI>new(c).getState() == c.getState()<LI>new(tc) element of (call.getConnections()).getTerminalConnections()<LI>new(tc).getState() == tc.getState()</OL><p>Finally, the Connections and TerminalConnections in otherCall move toDISCONNECTED and DROPPED respectively, and otherCall becomes INVALID.<p><OL><LI>c.getState() == DISCONNECTED<LI>tc.getState() == DROPPED<LI>otherCall.getState() == INVALID</OL><p> <dl> <dt> <b>Parameters:</b> <dd> otherCall - The second Call which to merge with this Call object. <dt> <b>Throws:</b> <a href="java.telephony.InvalidArgumentException.html#_top_">InvalidArgumentException</a> <dd> The Call object provided isnot valid for the conference <dt> <b>Throws:</b> <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -