|
JCC v1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The JccCall interface extends the JcpCall interface of JCP. This interface provides additional methods on a Call. Further, the state machine on the JccCall is also similar to the state machine of the JcpCall except for an extra transition as shown in the following figure.
Fields inherited from interface jain.application.services.jcp.JcpCall |
ACTIVE, IDLE, INVALID |
Method Summary | |
void |
addCallListener(JccCallListener calllistener,
EventFilter filter)
Add a listener to this call. |
void |
addConnectionListener(JccConnectionListener cl,
EventFilter filter)
Add a connection listener to all connections under this call. |
JccConnection |
createConnection(java.lang.String targetAddress,
java.lang.String originatingAddress,
java.lang.String originalCalledAddress,
java.lang.String redirectingAddress)
Creates (a) new JccConnection(s) and attaches it/them to this JccCall. |
void |
release()
This method requests the release of the call object and associated connection objects. |
void |
removeConnectionListener(JccConnectionListener cl)
Removes the connection listener from all connections under this call. |
JccConnection |
routeCall(java.lang.String targetAddress,
java.lang.String originatingAddress,
java.lang.String originalDestinationAddress,
java.lang.String redirectingAddress)
This method requests routing of a call to the targetAddress given as an input parameter. |
void |
superviseCall(JccCallListener calllistener,
double time,
int treatment,
double bytes)
The application calls this method to supervise a call. |
Methods inherited from interface jain.application.services.jcp.JcpCall |
addCallListener, getConnections, getProvider, getState, removeCallListener |
Method Detail |
public void addCallListener(JccCallListener calllistener, EventFilter filter) throws ResourceUnavailableException, MethodNotSupportedException
JccConnection
objects. The listener added with this method will
report events on the call for as long as the implementation can listen to
the JccCall. In the case that
JcpCall.INVALID
state the application receives a
JcpCallEvent.CALL_EVENT_TRANSMISSION_ENDED
event.
Post-Conditions:
calllistener
- JccCallListener object that receives the specified events.filter
- EventFilter which determines if the event is to be
delivered to the specified listener.MethodNotSupportedException
- The listener cannot be added at this time.ResourceUnavailableException
- The resource limit for the number of
listeners has been exceeded.public void addConnectionListener(JccConnectionListener cl, EventFilter filter) throws ResourceUnavailableException, MethodNotSupportedException
Registering a single listener twice will result in the last filter being used for the purposes of consultation to determine the events that the application is interested in. Note that registering for the same event multiple times should not result in multiple notifications being sent to an application for the same event.
Post-Conditions:
cl
- JccConnectionListener object that receives the specified events.filter
- EventFilter determines if the event is to be
delivered to the specified listener.MethodNotSupportedException
- The listener cannot be added at this time.ResourceUnavailableException
- The resource limit for the number of
listeners has been exceeded.
public void removeConnectionListener(JccConnectionListener cl)
Post-Conditions:
cl
- JccConnectionListener object that was registered using a corresponding
addConnectionListener method.public void release() throws PrivilegeViolationException, ResourceUnavailableException, InvalidStateException
JccConnection.release()
method on each JccConnection which is part of the Call. Typically each JccConnection
associated with this call will move into the JcpConnection.DISCONNECTED
state.
The call will also be terminated in the network. If the application
has registered as a listener then it receives the JcpCallEvent.CALL_EVENT_TRANSMISSION_ENDED
event.
Pre-conditions:
Post-conditions:
PrivilegeViolationException
- The application does not have
the authority or permission to disconnect the Call. For example,
an Address associated with this Call may not be controllable
in the Provider's domain.ResourceUnavailableException
- An internal resource required
to drop a connection is not available.InvalidStateException
- Some object required for the
successful invocation of this method is not in the proper state as
given by this method's pre-conditions.public JccConnection createConnection(java.lang.String targetAddress, java.lang.String originatingAddress, java.lang.String originalCalledAddress, java.lang.String redirectingAddress) throws InvalidStateException, ResourceUnavailableException, PrivilegeViolationException, MethodNotSupportedException, InvalidArgumentException, InvalidPartyException
JccConnection.routeConnection(boolean)
.
Consider party A calling party B in case of a first party call. In case of a third party call, consider party A and party B being connected. Below the behavior of this method is exemplified:
if (this.getState()==IDLE) then createConnection("B","A",null,null) {
will result in a first party call-setup. Both the terminating and originating connections will be created. However, a reference to the originating connection i.e "A"'s connection will be returned. Hence, a getAddress() method invoked on the returned reference results in the JcpAddress corresponding to party "A" being returned. Note though that both party "A" and party "B" would have to be routed to using the JccConnection.routeConnection() method on the JccConnection object corresponding to "A" and "B", respectivelly. The JccConnection reference of "B" can be obtained by invoking the getConnections() method on this JccCall object.
} else if (this.getState()==ACTIVE) then createConnection("B","A",null,null) {
will result in third party setup of a Connection. A reference to the created connection i.e "B"'s connection will be returned. A getAddress() method invocation on the returned JccConnection reference object results in the JcpAddress corresponding to party "B" being returned. Party "B" will have to be routed to in this case.
}
createConnection("A","A",null,null)
will result in third party setup of the "originating" Connection.
A getAddress() method invocation on the returned JccConnection reference object
results in the JcpAddress corresponding to party "A" being returned.
Party "A" will have to be routed to in this case.
createConnection("C","A","B","B")
will be applied in case the number of party B is translated into
the number of party C, while party A dialed party B. createConnection("C","A","B",null)
results in the
same behavior.
A reference to the created connection i.e "C"'s connection will be returned.
A getAddress() method invocation on the returned JccConnection reference object
results in the JcpAddress corresponding to party "C" being returned.
Party "C" will have to be routed to in this case.
createConnection("C","A","B","D")
will be applied in case the number of party D is translated into
the number of party C, while party A dialed party B.
A reference to the created connection i.e "C"'s connection will be returned.
A getAddress() method invocation on the returned JccConnection reference object
results in the JcpAddress corresponding to party "C" being returned.
Party "C" will have to be routed to in this case.
Pre-conditions:
Post-conditions:
targetAddress
- specifies the address to which the call
should be routed.originatingAddress
- specifies the address of the originating (calling)
party for this leg of the call.originalCalledAddress
- specifies the initial destination address to which
this leg of the call was initiated. This is optional and can be set to null.redirectingAddress
- specifies the last address from which this leg of the call
was redirected. This is optional and can be set to null.InvalidArgumentException
- is case an either or both the targetAddress or the originatingAddress is set to null.InvalidStateException
- Some object required by this method is not
in a valid state as designated by the pre-conditions for this method.ResourceUnavailableException
- An internal resource necessary
for creating the Connection object is unavailable.PrivilegeViolationException
- The application does not have
the proper authority to create the Connection.MethodNotSupportedException
- The implementation does not
support this methodInvalidPartyException
- In case one of the parties given in invalid.public JccConnection routeCall(java.lang.String targetAddress, java.lang.String originatingAddress, java.lang.String originalDestinationAddress, java.lang.String redirectingAddress) throws InvalidStateException, ResourceUnavailableException, PrivilegeViolationException, MethodNotSupportedException, InvalidPartyException, InvalidArgumentException
createConnection(String,String,String,String)
,
JccConnection.routeConnection(FALSE)
and JccConnection.attachMedia()
or is also
equivalent to createConnection(String,String,String,String)
and
JccConnection.routeConnection(TRUE).
Consider party A calling party B in case of a first party call. In case of a third party call, consider party A and party B being connected. Below the behavior of this method is exemplified:
if (this.getState()==IDLE) then routeCall("B","A",null,null) {
will result in a first party call-setup. Both the terminating and originating connections will be created. However, a reference to the originating connection i.e "A"'s connection will be returned. Hence, a getAddress() method invoked on the returned reference results in the JcpAddress corresponding to party "A" being returned.
} else if (this.getState()==ACTIVE) then routeCall("B","A",null,null) {
will result in third party setup of a Connection. A reference to the created connection i.e "B"'s connection will be returned. A getAddress() method invocation on the returned JccConnection reference object results in the JcpAddress corresponding to party "B" being returned. Party "B" will have to be routed to in this case.
}
routeCall("A","A",null,null)
will result in third party setup of the "originating" Connection.
A getAddress() method invocation on the returned JccConnection reference object
results in the JcpAddress corresponding to party "A" being returned. Note
also that party "A" will have to be routed to in this case.
routeCall("C","A","B","B")
will be applied in case the number of party B is translated into
the number of party C, while party A dialed party B. routeCall("C","A","B",null)
results in the
same behavior.
A reference to the created connection i.e "C"'s connection will be returned.
A getAddress() method invocation on the returned JccConnection reference object
results in the JcpAddress corresponding to party "C" being returned.
routeCall("C","A","B","D")
will be applied in case the number of party D is translated into
the number of party C, while party A dialed party B.
A reference to the created connection i.e "C"'s connection will be returned.
A getAddress() method invocation on the returned JccConnection reference object
results in the JcpAddress corresponding to party "C" being returned.
Pre-conditions:
Post-conditions:
targetAddress
- specifies the address to which the call
should be routed.originatingAddress
- specifies the address of the originating (calling)
party for this leg of the call.originalCalledAddress
- specifies the initial destination address to which
this leg of the call was initiated. This is optional and can be set to null.redirectingAddress
- specifies the last address from which this leg of the call
was redirected. This is optional and can be set to null.InvalidArgumentException
- is case an either or both the targetAddress or the originatingAddress is set to null.InvalidStateException
- Some object required by this method is not
in a valid state as designated by the pre-conditions for this method.ResourceUnavailableException
- An internal resource necessary
for creating the Connection object is unavailable.PrivilegeViolationException
- The application does not have
the proper authority to create the Connection.MethodNotSupportedException
- The implementation does not
support this methodInvalidPartyException
- In case one of the parties given in invalid.public void superviseCall(JccCallListener calllistener, double time, int treatment, double bytes) throws MethodNotSupportedException
routeCall(String,String,String,String)
, the timer measurement will start as soon as
the call is answered by the called party.
The call supervision events are then reported to the listener registered using this method. The events related to call supervision are reported only to the listeners registered using this method.
Note that a policy object may be designed to define the policy to be implemented by the platform as a result of this method instead of defining the policy through the given parameters. This might be designed in the future specifications.
calllistener
- JccCallListener object that receives the specified events.time
- specifies the granted time in milliseconds for the connection. When specified
as 0, volume based supervision is applied. Either bytes(volume) or time should be specified.treatment
- defines the treatment of the call by the call control service when
the call supervision timer expires. The values which may be combined using a logical
OR function are:
0x01
to release the call when the call supervision timer expires.0x02
to notify the application when the call supervision timer expires. 0x04
to send a warning tone to the controlling party when a call supervision timer
expires. If call release is requested, then the call will be released following the
tone after an administered time period.
bytes
- specifies the granted number of bytes that can be transmitted for the
connection. When the quantity is specified as 0, time based supervision is applied.MethodNotSupportedException
- if the implementation does not support this
method.
|
JCC v1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |