com.cisco.ipphone.sdk
Class EMProvider

java.lang.Object
  extended by com.cisco.ipphone.sdk.EMProvider
All Implemented Interfaces:
EMProviderIF

public class EMProvider
extends java.lang.Object
implements EMProviderIF

The EMProvider class implements the EMProviderIF interface and provides a simple Java "wrapper" interface into the Cisco CallManager Extension Mobility API.

See Also:
EMProviderIF

Field Summary
static int QUERY
           
static int REQUEST
           
 
Constructor Summary
EMProvider(java.lang.String callManager, java.lang.String callManagerUserId, java.lang.String callManagerPassword, java.lang.String extMobUserId, java.lang.String extMobPassword)
          This is the only constructor provided for the EMProvider class and all parameters must be supplied.
EMProvider(java.lang.String callManager, java.lang.String callManagerUserId, java.lang.String callManagerPassword, java.lang.String extMobUserId, java.lang.String extMobPassword, boolean pre40)
          This is the only constructor provided for the EMProvider class and all parameters must be supplied.
 
Method Summary
 java.lang.String sendRequest(int action, java.lang.String command)
          This method accepts an Extension Mobility command along with the command action of either QUERY or REQUEST, and sends the request to the CallManager Extension Mobility API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY

public static final int QUERY
See Also:
Constant Field Values

REQUEST

public static final int REQUEST
See Also:
Constant Field Values
Constructor Detail

EMProvider

public EMProvider(java.lang.String callManager,
                  java.lang.String callManagerUserId,
                  java.lang.String callManagerPassword,
                  java.lang.String extMobUserId,
                  java.lang.String extMobPassword,
                  boolean pre40)
This is the only constructor provided for the EMProvider class and all parameters must be supplied. The parameters can be modified after instantiation, if needed, by direct access to the public attributes.

Parameters:
callManager - The IP address or hostname of the CallManager server hosting the AXL API
callManagerUserId - The UserId used to authenticate to the CallManager for AXL access
callManagerPassword - The password of the above UserId
extMobUserId - The UserId of a CallManager Directory user with EM Authentication Proxy Rights enabled
extMobPassword - The password of the above UserId
pre40 - If true, the provider will be compatible with CallManager releases prior to 4.0

EMProvider

public EMProvider(java.lang.String callManager,
                  java.lang.String callManagerUserId,
                  java.lang.String callManagerPassword,
                  java.lang.String extMobUserId,
                  java.lang.String extMobPassword)
This is the only constructor provided for the EMProvider class and all parameters must be supplied. The parameters can be modified after instantiation, if needed, by direct access to the public attributes.

Parameters:
callManager - The IP address or hostname of the CallManager server hosting the AXL API
callManagerUserId - The UserId used to authenticate to the CallManager for AXL access
callManagerPassword - The password of the above UserId
extMobUserId - The UserId of a CallManager Directory user with EM Authentication Proxy Rights enabled
extMobPassword - The password of the above UserId
Method Detail

sendRequest

public java.lang.String sendRequest(int action,
                                    java.lang.String command)
This method accepts an Extension Mobility command along with the command action of either QUERY or REQUEST, and sends the request to the CallManager Extension Mobility API.

Specified by:
sendRequest in interface EMProviderIF
Parameters:
action - The EM action type of either EMProvider.QUERY or EMProvider.REQUEST. The action type is determined by the type of command being issued. Some commands QUERY for EM login state while others make a REQUEST to change it.
command - The EM command String (Example: <deviceUserQuery><deviceName>SEP00036B7FFE23</deviceName></deviceUserQuery>)
Returns:
String containing the full EM response in text XML. If the request is unsuccessful, an empty String or EM error message will be returned.