|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cisco.ipphone.sdk.Phone
public class Phone
This class encapsulates the attributes and functions of a Cisco IP Phone. The primary purpose of this class is to provide a convenient mechanism for finding relationships between IP Phones and other system components such as Users, Extensions, and PCs. Methods implemented in this class allow simple, efficient access to that information using service Providers, such as an LDAP Directory Provider.
| Method Summary | |
|---|---|
User[] |
getControllingUsers(LDAPProviderIF lp,
java.lang.String[] excludedUsers)
Queries the specified LDAP Provider for a list of Users who are allowed to Control this device (phone). |
User |
getCurrentExtMobUser(EMProviderIF ep)
Queries the specified Extension Mobility Provider to determine if this Phone currently has an EM USer logged into it. |
java.lang.String |
getDeviceName()
|
Extension[] |
getExtensions()
This method returns an Array of Extension objects which are currently configured for this phone. |
java.lang.String |
getIPAddress(IPAddressProviderIF ipProv)
|
static Phone |
getPhone(java.lang.String deviceName)
The getPhone method is used to obtain a reference to a Phone object which has the specified, unique deviceName. |
SpeedDial[] |
getSpeedDials()
This method returns an Array of SpeedDial objects which are currently configured for this phone. |
boolean |
loadAttributes(AXLProviderIF ap)
Equivalent to calling loadAttributes(ap, false) |
boolean |
loadAttributes(AXLProviderIF ap,
boolean loadExtensions)
The loadAttributes method queries the specified AXL Provider for Phone configuration info. |
boolean |
login(EMProviderIF ep,
User loginUser)
Uses the specified Extension Mobility Provider to log the specified User into this Phone |
boolean |
logout(EMProviderIF ep)
Uses the specified Extension Mobility Provider to logout the current EM User of this Phone |
java.lang.String |
push(java.lang.String[] uris,
IPAddressProviderIF ipProv,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
This method PUSHes commands to the Phone. |
static java.lang.String |
push(java.lang.String[] uris,
java.lang.String phoneIP,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
This method PUSHes a command to the Phone. |
java.lang.String |
push(java.lang.String uri,
IPAddressProviderIF ipProv,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
This method PUSHes a command to the Phone. |
static java.lang.String |
push(java.lang.String uri,
java.lang.String phoneIP,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
This method PUSHes a command to the Phone. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Phone getPhone(java.lang.String deviceName)
new command since there are no public constructors - instead a
reference is obtained to a given Phone by calling this method. This architecture has the added
benefit of being able to directly compare Phone objects for equality - since there is guaranteed to be
only one object in existence with a given, unique deviceName. This also has the effect of minimizing memory
utilization since only a single instance of a given Phone object exists within the JVM.
deviceName - the unique deviceName of the requested Phone
public boolean loadAttributes(AXLProviderIF ap)
ap - the AXLProvider to be queried for configuration information
public boolean loadAttributes(AXLProviderIF ap,
boolean loadExtensions)
ap - the AXLProvider to be queried for configuration informationloadExtensions - boolean value specifying whether or not the Phone's Extension information
should also be loaded from AXL
public java.lang.String getDeviceName()
public java.lang.String toString()
toString in class java.lang.Objectpublic SpeedDial[] getSpeedDials()
SpeedDialpublic Extension[] getExtensions()
Extension
public User[] getControllingUsers(LDAPProviderIF lp,
java.lang.String[] excludedUsers)
lp - the LDAPProviderexcludedUsers - an Array of Strings containing UserIds which should NOT be returned in the
result. If excludedUsers is either null or an empty Array, all matching Users will be returned.
This easily filters out "application" UserIds which are Controlling groups of devices.
For example, many of the sample applications will
filter out the "sdkapps" userId which is associated with all devices for PUSH control and other purposes.
public User getCurrentExtMobUser(EMProviderIF ep)
ep - the EMProvider
null if no User is currently logged in
public boolean login(EMProviderIF ep,
User loginUser)
ep - the EMProviderloginUser - the User to be logged into this Phone
public boolean logout(EMProviderIF ep)
ep - the EMProvider
public java.lang.String getIPAddress(IPAddressProviderIF ipProv)
public java.lang.String push(java.lang.String uri,
IPAddressProviderIF ipProv,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
uri - the URI to be executed by the PhoneipProv - the IPAddressProvider to be used to obtain the IP address of this Phone in
order to perform the PUSHpushUserId - the UserId of a user with permissions to PUSH to this PhonepushPassword - the password for the above UserIdgetResult - indicates whether or not the HTTP redirect to the CiscoIPPhoneResponse
object should be followed. Unless the application requires verification of the PUSH success,
this parameter should be set to false, otherwise performance will be degraded.
public java.lang.String push(java.lang.String[] uris,
IPAddressProviderIF ipProv,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
uris - an Array of String URIs (maximum of 3) to be executed by the Phone
If an Array larger than 3 is passed, the method will fail and return nullipProv - the IPAddressProvider to be used to obtain the IP address of this Phone in
order to perform the PUSHpushUserId - the UserId of a user with permissions to PUSH to this PhonepushPassword - the password for the above UserIdgetResult - indicates whether or not the HTTP redirect to the CiscoIPPhoneResponse
object should be followed. Unless the application requires verification of the PUSH success,
this parameter should be set to false, otherwise performance will be degraded.
public static java.lang.String push(java.lang.String uri,
java.lang.String phoneIP,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
uri - the URI to be executed by the PhonephoneIP - the IP address of this PhonepushUserId - the UserId of a user with permissions to PUSH to this PhonepushPassword - the password for the above UserIdgetResult - indicates whether or not the HTTP redirect to the CiscoIPPhoneResponse
object should be followed. Unless the application requires verification of the PUSH success,
this parameter should be set to false, otherwise performance will be degraded.
public static java.lang.String push(java.lang.String[] uris,
java.lang.String phoneIP,
java.lang.String pushUserId,
java.lang.String pushPassword,
boolean getResult)
uris - an Array of String URIs (maximum of 3) to be executed by the Phone.
If an Array larger than 3 is passed, the method will fail and return nullphoneIP - the IP address of this PhonepushUserId - the UserId of a user with permissions to PUSH to this PhonepushPassword - the password for the above UserIdgetResult - indicates whether or not the HTTP redirect to the CiscoIPPhoneResponse
object should be followed. Unless the application requires verification of the PUSH success,
this parameter should be set to false, otherwise performance will be degraded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||