|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CiscoProvider
The CiscoProvider
interface extends the Provider
interface with additional Cisco-specific capabilities.
Field Summary |
---|
Fields inherited from interface javax.telephony.Provider |
---|
IN_SERVICE, OUT_OF_SERVICE, SHUTDOWN |
Method Summary | |
---|---|
CiscoTerminal |
createTerminal(java.lang.String name)
Returns an instance of the CiscoTerminal class which corresponds to the given name. |
void |
deleteCall(javax.telephony.Call call)
Deletes an un used call created by createCall(). |
void |
deleteTerminal(CiscoTerminal terminal)
Removes the CiscoTerminal Ojbect from providers control. |
javax.telephony.Address |
getAddress(java.lang.String number,
java.lang.String partition)
|
javax.telephony.Address[] |
getAddresses(java.lang.String number)
|
int |
getAppDSCPValue()
This method can be used by applications to get the DSCP value from the provider. |
CiscoCall |
getCall(CiscoRTPHandle rtpHandle)
Returns call object with the rtpHandle associated with a specific terminal. |
CiscoCall |
getCall(int callleg)
Returns CiscoCall present in provider domain. |
boolean |
getCallbackGuardEnabled()
|
CiscoIntercomAddress[] |
getIntercomAddresses()
Returns array of CiscoInterComAddress present in provider domain. |
CiscoMediaTerminal |
getMediaTerminal(java.lang.String name)
Returns an instance of the CiscoMediaTerminal class which corresponds to the given name. |
CiscoMediaTerminal[] |
getMediaTerminals()
Returns an array of CiscoMediaTerminals associated with the Provider and within the Provider's domain. |
java.lang.String |
getVersion()
|
void |
registerFeature(int featureID)
used to register for a particular feature for which application will get Provider events. |
void |
setCallbackGuardEnabled(boolean enabled)
Enables or disables try /catch
logic for observer callbacks |
void |
unregisterFeature(int featureID)
used to unregister a particular feature. |
Methods inherited from interface javax.telephony.Provider |
---|
addObserver, createCall, getAddress, getAddressCapabilities, getAddressCapabilities, getAddresses, getCallCapabilities, getCallCapabilities, getCalls, getCapabilities, getConnectionCapabilities, getConnectionCapabilities, getName, getObservers, getProviderCapabilities, getProviderCapabilities, getState, getTerminal, getTerminalCapabilities, getTerminalCapabilities, getTerminalConnectionCapabilities, getTerminalConnectionCapabilities, getTerminals, removeObserver, shutdown |
Methods inherited from interface com.cisco.jtapi.extensions.CiscoObjectContainer |
---|
getObject, setObject |
Method Detail |
---|
void setCallbackGuardEnabled(boolean enabled)
Enables or disables try
/catch
logic for observer callbacks
In order to protect itself from application exceptions in observer callbacks, the Provider normally guards all invocations of application interfaces (e.g. observers) with the following code:
try {
observer.callStateChanged ( ... );
} catch ( Throwable t ) {
// log the exception here
}
This isolates application errors from the JTAPI implementation,
allowing easier troubleshooting, since the JTAPI implementation
can note the unhandled exception and continue operating. Some
errors are considered non-recoverable and will be re-thrown
by JTAPI, generally resulting in application exit. Such errors
include ThreadDeath, OutOfMemoryError, and StackOverflowError.
Applications wishing to trap errors within JTAPI threads should
create a subclass of ThreadGroup and initialize JTAPI from a thread
within that ThreadGroup. By overriding the
ThreadGroup.uncaughtException ()
method, the application can be made aware of all unrecoverable errors
thrown on JTAPI threads.
In some cases, JTAPI's aggressive error-catching approach may
make it more difficult to troubleshoot applications within
a java debugger. Microsoft Visual J++ version 6.0, for example,
does not handle breakpoints within application observer callbacks
properly if JTAPI catches Throwable
. In such cases,
JTAPI application developers may choose to disable the internal
JTAPI try
/catch
logic.
NOTE: Disabling callback guards in this manner is only intended for use while troubleshooting applications, and never for use in production environments. By default, callback guards are always enabled.
enabled
- if true, callback guard will be enbled; if false,
callback guard will be disabledboolean getCallbackGuardEnabled()
CiscoMediaTerminal[] getMediaTerminals() throws javax.telephony.ResourceUnavailableException
Returns an array of CiscoMediaTerminals associated with the
Provider and within the Provider's domain. Each CiscoMediaTerminal
possesses a unique name, which is assigned to it by the JTAPI
implementation. If there are no CiscoMediaTerminals associated with
this Provider, then this method returns null. This array is a subset
of the array returned by Provider.getTerminals()
.
Post-conditions:
javax.telephony.ResourceUnavailableException
- Indicates the number of
media terminals present in the Provider is too great to return
as a static array.CiscoMediaTerminal getMediaTerminal(java.lang.String name) throws javax.telephony.InvalidArgumentException
Returns an instance of the CiscoMediaTerminal class which
corresponds to the given name. Each CiscoMediaTerminal has a unique
name associated with it, which is assigned to it by the JTAPI
implementation. If no CiscoMediaTerminal is available for the
given name within the Provider's domain, this method throws the
InvalidArgumentException. This CiscoMediaTerminal is contained
in the arrays generated by Provider.getTerminals()
and CiscoProvider.getMediaTerminals()
.
Pre-conditions:
name
- The name of desired CiscoMediaTerminal object.
javax.telephony.InvalidArgumentException
- The name provided does not correspond
to a name of any CiscoMediaTerminal known to the Provider or within
the Provider's domain.void registerFeature(int featureID) throws javax.telephony.InvalidStateException, javax.telephony.PrivilegeViolationException, javax.telephony.InvalidArgumentException
javax.telephony.InvalidStateException
javax.telephony.PrivilegeViolationException
javax.telephony.InvalidArgumentException
void unregisterFeature(int featureID) throws javax.telephony.InvalidStateException
javax.telephony.InvalidStateException
void deleteCall(javax.telephony.Call call) throws javax.telephony.InvalidStateException
Deletes an un used call created by createCall(). An exception is generated if the call is not in IDLE state or if provider is not in Provider.IN_SERVICE state. Applications may use this interface to move un used calls to INVALID state and reclaim resources alloacated to the call.
Pre-conditions:
Post-conditions:
javax.telephony.InvalidStateException
CiscoCall getCall(CiscoRTPHandle rtpHandle) throws javax.telephony.InvalidStateException
javax.telephony.InvalidStateException
java.lang.String getVersion()
CiscoTerminal createTerminal(java.lang.String name) throws javax.telephony.InvalidArgumentException, javax.telephony.InvalidStateException, javax.telephony.PrivilegeViolationException
Returns an instance of the CiscoTerminal class which
corresponds to the given name. Application must have sufficient capability
otherwise PreviledgeVoilationException would be thrown
CiscoProvider.createTerminal()
.
Pre-conditions:
name
- The name of desired CiscoTerminal object.
javax.telephony.InvalidArgumentException
- The name provided does not correspond
to a name of any CiscoMediaTerminal known to the Provider or within
the Provider's domain.
javax.telephony.InvalidStateException
- The provider is not inService.
PreviledgeVoilationException
- The provider does not have sufficient capbilitly i.e.
CiscoProviderCapabilities.canObserveAnyTerminal() returns false
javax.telephony.PrivilegeViolationException
void deleteTerminal(CiscoTerminal terminal) throws javax.telephony.InvalidArgumentException, javax.telephony.InvalidStateException, javax.telephony.PrivilegeViolationException
Removes the CiscoTerminal Ojbect from providers control. Application
must have created this terminal using Provider.createTerminal() interface
otherwise PreviledgeVoilationException would be thrown.
CiscoProvider.deleteTerminal()
.
Pre-conditions:
terminal
- The referece to the desired CiscoTerminal object to be deleted.
javax.telephony.InvalidArgumentException
- The terminal provided is not element of
this.getTerminals() or termial is not provider's domain.
PreviledgeVoilationException
- The terminal given in the argument is not
a terminal created using Provider.createTerminal() method. Applications can delete
only those terminal which are created using Provider.createTerminal() interface.
javax.telephony.InvalidStateException
javax.telephony.PrivilegeViolationException
int getAppDSCPValue()
This method can be used by applications to get the DSCP value from the provider.
CiscoProvider.getAppDSCPValue()
.
Pre-conditions:
javax.telephony.Address[] getAddresses(java.lang.String number)
javax.telephony.Address getAddress(java.lang.String number, java.lang.String partition) throws javax.telephony.InvalidArgumentException
javax.telephony.InvalidArgumentException
CiscoIntercomAddress[] getIntercomAddresses()
Returns array of CiscoInterComAddress present in provider domain.
If there is no intercom address address configured on any of the terminal in provider domain, it will retrun null.
CiscoCall getCall(int callleg)
Returns CiscoCall present in provider domain.
If there is no call on any of the terminal in provider domain, with this call leg, null is returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |