|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cisco.ipphone.sdk.RisProvider
public class RisProvider
The RisProvider class provides a simple Java "wrapper" around the CUCM RIS realtime API.
This implementation of the IPAddressProviderIF interface caches
IP address information and automatically refreshes the information at the specified interval.
The initial loading of IP addresses from the DeviceListX API is performed by the calling thread
of the RisProvider constructor - this ensures that the provider is ready for requests as
soon as the constructor method returns. Subsequent updates are handled automatically by the
RisProvider class using a Timer thread. The refresh logic is designed so that the calling
thread will always return immediately - it will never block while waiting for the device list to be
updated (except for the initial load as stated above).
Note: This class is for sample application purposes only - a fully-functional production application
would make more efficient use of the RIS API capabilities, as needed by the application.
IPAddressProviderIF| Field Summary | |
|---|---|
static int |
DEFAULT_INTERVAL
|
static int |
MAX_DEVICES
|
| Constructor Summary | |
|---|---|
RisProvider(java.lang.String callManager,
java.lang.String callManagerUserId,
java.lang.String callManagerPassword)
Equivalent to calling: IPAddressProvider(callManager, callManagerUserId, callManagerPassword, false, IPAddressProvider.DEFAULT_INTERVAL); |
|
RisProvider(java.lang.String callManager,
java.lang.String callManagerUserId,
java.lang.String callManagerPassword,
boolean useHttps)
Equivalent to calling: IPAddressProvider(callManager, callManagerUserId, callManagerPassword, useHttps, IPAddressProvider.DEFAULT_INTERVAL); |
|
RisProvider(java.lang.String callManager,
java.lang.String callManagerUserId,
java.lang.String callManagerPassword,
boolean useHttps,
int refreshInterval)
Creates a new RisProvider and immediately loads the IP address table |
|
| Method Summary | |
|---|---|
java.util.HashMap |
getAllIPAddresses()
This method retrieves all of the current active IP addresses of devices. |
java.lang.String |
getIPAddress(Phone phone)
This method retrieves the current active IP address of the specified Phone. |
java.lang.String[] |
getIPAddresses(Phone[] phones)
This method retrieves the current active IP addresses of the specified Phones. |
Phone |
getPhone(java.lang.String ipAddress)
This method does the inverse of the other methods - it accepts an IP address as a parameter and searches for the Phone currently using that address. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_INTERVAL
public static final int MAX_DEVICES
| Constructor Detail |
|---|
public RisProvider(java.lang.String callManager,
java.lang.String callManagerUserId,
java.lang.String callManagerPassword)
callManager - StringcallManagerUserId - StringcallManagerPassword - String
public RisProvider(java.lang.String callManager,
java.lang.String callManagerUserId,
java.lang.String callManagerPassword,
boolean useHttps)
callManager - StringcallManagerUserId - StringcallManagerPassword - StringuseHttps - boolean
public RisProvider(java.lang.String callManager,
java.lang.String callManagerUserId,
java.lang.String callManagerPassword,
boolean useHttps,
int refreshInterval)
callManager - String Hostname or IP address of the CallManager server hosting the DeviceListX APIcallManagerUserId - String The UserId used to authenticate to the CallManager for CCMAdmin accesscallManagerPassword - String The password of the above UserIduseHttps - boolean If 'true' then https is used rather than http (Note: https is required for CallManager 4.1)refreshInterval - int Interval in seconds to refresh the IP address data| Method Detail |
|---|
public Phone getPhone(java.lang.String ipAddress)
getPhone in interface IPAddressProviderIFipAddress - a String containing the current IP address of the requested Phone
null if the address could not be foundpublic java.lang.String getIPAddress(Phone phone)
getIPAddress in interface IPAddressProviderIFphone - the Phone for which an IP address is requested
null will be returned.public java.lang.String[] getIPAddresses(Phone[] phones)
getIPAddresses in interface IPAddressProviderIFphones - an Array of Phones for which IP addresses are requested
null.public java.util.HashMap getAllIPAddresses()
getAllIPAddresses in interface IPAddressProviderIFpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||