public class Context
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAppName()
Returns the application name set by the application.
|
java.lang.String |
getAppVersion()
Returns the application version set by the application.
|
static java.lang.String |
getConnectionProtocol()
Gets the protocol used for communication with the server.
|
static Context |
getContext()
Returns an instance of the Context class.
|
java.lang.String |
getDeviceType()
Returns the device type set by the application.
|
java.lang.String |
getHost()
Returns the server host name set by the application.
|
static Logger |
getLogger()
Returns the logger instance to caller.
|
java.lang.String |
getPassword()
Returns the password used for authentication as set by the application.
|
java.lang.String |
getPort()
Returns the server port number set by the application.
|
java.lang.String |
getServerURL()
Returns the server URL set by the Mobile Support Client.
|
java.lang.String |
getUserName()
Returns the user name needed for authentication.
|
static void |
setInitializeConf(java.lang.String host,
java.lang.String port,
java.lang.String appName,
java.lang.String appVersion,
java.lang.String deviceType,
java.lang.String userName,
java.lang.String password,
java.lang.String conProtocolType)
Initializes basic configuration for client-server communication (host, port, authentication details and connection protocol).
|
static void |
setLogger(Logger loggerInstance)
Sets the logger instance.
|
public static Context getContext()
public static void setInitializeConf(java.lang.String host, java.lang.String port, java.lang.String appName, java.lang.String appVersion, java.lang.String deviceType, java.lang.String userName, java.lang.String password, java.lang.String conProtocolType) throws com.softwareag.mobile.data.client.SyncClientException
host
- Server host name or IP address.port
- Server port number.appName
- Name of the application that is registered with the mobile sync component.appVersion
- Version of the application that is registered with the mobile sync component.deviceType
- Name of the device type that is registered with the mobile sync component.userName
- Name of the user to authenticate with the server.password
- Password for authentication with the server.conProtocolType
- Type of communication protocol to use (0 indicates HTTP, 1 indicates HTTPS).com.softwareag.mobile.data.client.SyncClientException
- - Handles errors related to data synchronization operations. public java.lang.String getServerURL()
public java.lang.String getHost()
public java.lang.String getPort()
public java.lang.String getUserName()
public java.lang.String getPassword()
public java.lang.String getAppName()
public java.lang.String getAppVersion()
public java.lang.String getDeviceType()
public static void setLogger(Logger loggerInstance)
{@link
- com.softwareag.mobile.data.utils.Logger Logger}public static java.lang.String getConnectionProtocol()