com.motorola.oem.websession
Class WebSession

java.lang.Object
  extended by com.motorola.oem.websession.WebSession

public class WebSession
extends java.lang.Object

 Holds internet configuration parameters associated/needed in a Web Session.
 
Note: The different service types, defined in this class, suit different purposes (see the device's User Guide for details).

See Also:
WebSessionManager

Field Summary
static int ACCESS_READ
          Read only access type
static int ACCESS_RW
          Read / write access type
static int CSD_LINE_TYPE_ISDN
          ISDN line type used for the CSD connection
static int CSD_LINE_TYPE_MODEM
          Modem line type used for the CSD connection
static int CSD_SPEED_14400_BAUD
          14400 Bps - Data transfer rate for CSD connection
static int CSD_SPEED_2400_BAUD
          2400 Bps - Data transfer rate for CSD connection
static int CSD_SPEED_4800_BAUD
          4800 Bps - Data transfer rate for CSD connection
static int CSD_SPEED_9600_BAUD
          9600 Bps - Data transfer rate for CSD connection
static int MAX_LENGTH_CSD_NO
          Maximum length of csdNo1 or csdNo2
static int MAX_LENGTH_CSD_PASSWORD
          Maximum length of csdPassword1 or csdPassword2
static int MAX_LENGTH_CSD_USER_NAME
          Maximum length of csdUserName1 or csdUserName2
static int MAX_LENGTH_DNS
          Maximum length of dns1 or dns2
static int MAX_LENGTH_DOMAIN
          Maximum length of domain1 or domain2
static int MAX_LENGTH_GPRS_APN
          Maximum length of gprsApn
static int MAX_LENGTH_GPRS_PASSWORD
          Maximum length of gprsPassword
static int MAX_LENGTH_GPRS_USER_NAME
          Maximum length of gprsUserName
static int MAX_LENGTH_HOME_PAGE
          Maximum length of homePage
static int MAX_LENGTH_PROXY
          Maximum length of proxy1 or proxy2
static int MAX_LENGTH_SESSION_NAME
          Maximum length of sessionName
static int SERVICE_TYPE_HTTP
          HTTP service type
static int SERVICE_TYPE_HTTP_SECURE
          HTTP SECURE service type
static int SERVICE_TYPE_WAP
          WAP service type
static int SERVICE_TYPE_WAP_CONNECTIONLESS
          WAP CONNECTIONLESS service type
static int SERVICE_TYPE_WAP_SECURE
          WAP SECURE service type
static int SERVICE_TYPE_WAP_SECURE_CONNECTIONLESS
          WAP SECURE CONNECTIONLESS service type
static int TIMEOUT_1_MIN
          1 minute timeout
static int TIMEOUT_10_MIN
          10 minute timeout
static int TIMEOUT_15_MIN
          15 minute timeout
static int TIMEOUT_2_MIN
          2 minute timeout
static int TIMEOUT_5_MIN
          5 minute timeout
 
Constructor Summary
WebSession()
          Create a new WebSession instance.
WebSession(WebSession ws)
          Create a new WebSession instance and initialize it according to the specified WebSession (ws).
 
Method Summary
 int getAccessType()
          Get access type.
 java.lang.String getCsdNo1()
          Get CSD No. 1.
 java.lang.String getCsdNo2()
          Get CSD No. 2.
 java.lang.String getCsdPassword1()
          Get CSD Password 1.
 java.lang.String getCsdPassword2()
          Get CSD Password 2.
 int getCsdSpeed1()
          Get CSD Speed 1.
 int getCsdSpeed2()
          Get CSD Speed 2.
 java.lang.String getCsdUserName1()
          Get CSD User Name 1.
 java.lang.String getCsdUserName2()
          Get CSD User Name 2.
 java.lang.String getDns1()
          Get DNS 1.
 java.lang.String getDns2()
          Get DNS 2.
 java.lang.String getDomain1()
          Get domain 1.
 java.lang.String getDomain2()
          Get domain 2.
 java.lang.String getGprsApn()
          Get GPRS APN.
 java.lang.String getGprsPassword()
          Get GPRS Password.
 java.lang.String getGprsUserName()
          Get GPRS User Name.
 java.lang.String getHomePage()
          Get homepage.
 int getLineType1()
          Get line type 1.
 int getLineType2()
          Get line type 2.
 int getPort1()
          Get port 1.
 int getPort2()
          Get port 2.
 java.lang.String getProxy1()
          Get proxy 1.
 java.lang.String getProxy2()
          Get proxy 2.
 int getServiceType1()
          Get service type 1.
 int getServiceType2()
          Get service type 2.
 java.lang.String getSessionName()
          Get session name.
 int getTimeOut()
          Get time out.
 void setAccessType(int accessType)
          Set access type.
 void setCsdNo1(java.lang.String csdNo1)
          Set CSD No. 1.
 void setCsdNo2(java.lang.String csdNo2)
          Set CSD No. 2.
 void setCsdPassword1(java.lang.String csdPassword1)
          Set CSD Password 1.
 void setCsdPassword2(java.lang.String csdPassword2)
          Set CSD Password 2.
 void setCsdSpeed1(int csdSpeed1)
          Set CSD Speed 1.
 void setCsdSpeed2(int csdSpeed2)
          Set CSD Speed 2.
 void setCsdUserName1(java.lang.String csdUserName1)
          Set CSD User Name 1.
 void setCsdUserName2(java.lang.String csdUserName2)
          Set CSD User Name 2.
 void setDns1(java.lang.String dns1)
          Set DNS 1.
 void setDns2(java.lang.String dns2)
          Set DNS 2.
 void setDomain1(java.lang.String domain1)
          Set domain 1.
 void setDomain2(java.lang.String domain2)
          Set domain 2.
 void setGprsApn(java.lang.String gprsApn)
          Set GPRS APN.
 void setGprsPassword(java.lang.String gprsPassword)
          Set GPRS Password.
 void setGprsUserName(java.lang.String gprsUserName)
          Set GPRS User Name.
 void setHomePage(java.lang.String homePage)
          Set homepage.
 void setLineType1(int lineType1)
          Set line type 1.
 void setLineType2(int lineType2)
          Set line type 2 .
 void setPort1(int port1)
          Set port 1.
 void setPort2(int port2)
          Set port 2.
 void setProxy1(java.lang.String proxy1)
          Set proxy 1.
 void setProxy2(java.lang.String proxy2)
          Set proxy 2.
 void setServiceType1(int serviceType1)
          Set service type 1.
 void setServiceType2(int serviceType2)
          Set service type 2.
 void setSessionName(java.lang.String sessionName)
          Set session's name.
 void setTimeOut(int timeOut)
          Set time out.
 java.lang.String toString()
          Represent WebSession object as a String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVICE_TYPE_WAP

public static final int SERVICE_TYPE_WAP
WAP service type

See Also:
Constant Field Values

SERVICE_TYPE_WAP_CONNECTIONLESS

public static final int SERVICE_TYPE_WAP_CONNECTIONLESS
WAP CONNECTIONLESS service type

See Also:
Constant Field Values

SERVICE_TYPE_WAP_SECURE

public static final int SERVICE_TYPE_WAP_SECURE
WAP SECURE service type

See Also:
Constant Field Values

SERVICE_TYPE_WAP_SECURE_CONNECTIONLESS

public static final int SERVICE_TYPE_WAP_SECURE_CONNECTIONLESS
WAP SECURE CONNECTIONLESS service type

See Also:
Constant Field Values

SERVICE_TYPE_HTTP

public static final int SERVICE_TYPE_HTTP
HTTP service type

See Also:
Constant Field Values

SERVICE_TYPE_HTTP_SECURE

public static final int SERVICE_TYPE_HTTP_SECURE
HTTP SECURE service type

See Also:
Constant Field Values

TIMEOUT_1_MIN

public static final int TIMEOUT_1_MIN
1 minute timeout

See Also:
Constant Field Values

TIMEOUT_2_MIN

public static final int TIMEOUT_2_MIN
2 minute timeout

See Also:
Constant Field Values

TIMEOUT_5_MIN

public static final int TIMEOUT_5_MIN
5 minute timeout

See Also:
Constant Field Values

TIMEOUT_10_MIN

public static final int TIMEOUT_10_MIN
10 minute timeout

See Also:
Constant Field Values

TIMEOUT_15_MIN

public static final int TIMEOUT_15_MIN
15 minute timeout

See Also:
Constant Field Values

ACCESS_READ

public static final int ACCESS_READ
Read only access type

See Also:
Constant Field Values

ACCESS_RW

public static final int ACCESS_RW
Read / write access type

See Also:
Constant Field Values

CSD_SPEED_2400_BAUD

public static final int CSD_SPEED_2400_BAUD
2400 Bps - Data transfer rate for CSD connection

See Also:
Constant Field Values

CSD_SPEED_4800_BAUD

public static final int CSD_SPEED_4800_BAUD
4800 Bps - Data transfer rate for CSD connection

See Also:
Constant Field Values

CSD_SPEED_9600_BAUD

public static final int CSD_SPEED_9600_BAUD
9600 Bps - Data transfer rate for CSD connection

See Also:
Constant Field Values

CSD_SPEED_14400_BAUD

public static final int CSD_SPEED_14400_BAUD
14400 Bps - Data transfer rate for CSD connection

See Also:
Constant Field Values

CSD_LINE_TYPE_MODEM

public static final int CSD_LINE_TYPE_MODEM
Modem line type used for the CSD connection

See Also:
Constant Field Values

CSD_LINE_TYPE_ISDN

public static final int CSD_LINE_TYPE_ISDN
ISDN line type used for the CSD connection

See Also:
Constant Field Values

MAX_LENGTH_SESSION_NAME

public static final int MAX_LENGTH_SESSION_NAME
Maximum length of sessionName

See Also:
Constant Field Values

MAX_LENGTH_HOME_PAGE

public static final int MAX_LENGTH_HOME_PAGE
Maximum length of homePage

See Also:
Constant Field Values

MAX_LENGTH_PROXY

public static final int MAX_LENGTH_PROXY
Maximum length of proxy1 or proxy2

See Also:
Constant Field Values

MAX_LENGTH_DOMAIN

public static final int MAX_LENGTH_DOMAIN
Maximum length of domain1 or domain2

See Also:
Constant Field Values

MAX_LENGTH_DNS

public static final int MAX_LENGTH_DNS
Maximum length of dns1 or dns2

See Also:
Constant Field Values

MAX_LENGTH_CSD_NO

public static final int MAX_LENGTH_CSD_NO
Maximum length of csdNo1 or csdNo2

See Also:
Constant Field Values

MAX_LENGTH_CSD_USER_NAME

public static final int MAX_LENGTH_CSD_USER_NAME
Maximum length of csdUserName1 or csdUserName2

See Also:
Constant Field Values

MAX_LENGTH_CSD_PASSWORD

public static final int MAX_LENGTH_CSD_PASSWORD
Maximum length of csdPassword1 or csdPassword2

See Also:
Constant Field Values

MAX_LENGTH_GPRS_APN

public static final int MAX_LENGTH_GPRS_APN
Maximum length of gprsApn

See Also:
Constant Field Values

MAX_LENGTH_GPRS_USER_NAME

public static final int MAX_LENGTH_GPRS_USER_NAME
Maximum length of gprsUserName

See Also:
Constant Field Values

MAX_LENGTH_GPRS_PASSWORD

public static final int MAX_LENGTH_GPRS_PASSWORD
Maximum length of gprsPassword

See Also:
Constant Field Values
Constructor Detail

WebSession

public WebSession(WebSession ws)
           throws java.lang.IllegalArgumentException
Create a new WebSession instance and initialize it according to the specified WebSession (ws).

Parameters:
ws - Web Session to initialize a the new instance according to its internet configuration parameters
Throws:
java.lang.IllegalArgumentException -
  • In case one or more of the WebSession parameters are out of range. In such a case, the first invalid parameter encountered is reported.

  • WebSession

    public WebSession()
    Create a new WebSession instance.

    Method Detail

    toString

    public java.lang.String toString()
    Represent WebSession object as a String.

    Overrides:
    toString in class java.lang.Object
    Returns:
    A string containing the Web Session's class fields.

    getAccessType

    public int getAccessType()
    Get access type.

    Returns:
    access type

    setAccessType

    public void setAccessType(int accessType)
    Set access type.

    Parameters:
    accessType -

    getCsdNo1

    public java.lang.String getCsdNo1()
    Get CSD No. 1.

    Returns:
    CSD No. 1

    setCsdNo1

    public void setCsdNo1(java.lang.String csdNo1)
    Set CSD No. 1.

    Parameters:
    csdNo1 -

    getCsdNo2

    public java.lang.String getCsdNo2()
    Get CSD No. 2.

    Returns:
    CSD No. 2

    setCsdNo2

    public void setCsdNo2(java.lang.String csdNo2)
    Set CSD No. 2.

    Parameters:
    csdNo2 -

    getCsdPassword1

    public java.lang.String getCsdPassword1()
    Get CSD Password 1.

    Returns:
    CSD Password 1

    setCsdPassword1

    public void setCsdPassword1(java.lang.String csdPassword1)
    Set CSD Password 1.

    Parameters:
    csdPassword1 -

    getCsdPassword2

    public java.lang.String getCsdPassword2()
    Get CSD Password 2.

    Returns:
    CSD Password 2

    setCsdPassword2

    public void setCsdPassword2(java.lang.String csdPassword2)
    Set CSD Password 2.

    Parameters:
    csdPassword2 -

    getCsdSpeed1

    public int getCsdSpeed1()
    Get CSD Speed 1.

    Returns:
    CSD Speed 1

    setCsdSpeed1

    public void setCsdSpeed1(int csdSpeed1)
    Set CSD Speed 1.

    Parameters:
    csdSpeed1 -

    getCsdSpeed2

    public int getCsdSpeed2()
    Get CSD Speed 2.

    Returns:
    CSD Speed 2

    setCsdSpeed2

    public void setCsdSpeed2(int csdSpeed2)
    Set CSD Speed 2.

    Parameters:
    csdSpeed2 -

    getCsdUserName1

    public java.lang.String getCsdUserName1()
    Get CSD User Name 1.

    Returns:
    CSD User Name 1

    setCsdUserName1

    public void setCsdUserName1(java.lang.String csdUserName1)
    Set CSD User Name 1.

    Parameters:
    csdUserName1 -

    getCsdUserName2

    public java.lang.String getCsdUserName2()
    Get CSD User Name 2.

    Returns:
    CSD User Name 2

    setCsdUserName2

    public void setCsdUserName2(java.lang.String csdUserName2)
    Set CSD User Name 2.

    Parameters:
    csdUserName2 -

    getDns1

    public java.lang.String getDns1()
    Get DNS 1.

    Returns:
    DNS 1

    setDns1

    public void setDns1(java.lang.String dns1)
    Set DNS 1.

    Parameters:
    dns1 -

    getDns2

    public java.lang.String getDns2()
    Get DNS 2.

    Returns:
    DNS 2

    setDns2

    public void setDns2(java.lang.String dns2)
    Set DNS 2.

    Parameters:
    dns2 -

    getDomain1

    public java.lang.String getDomain1()
    Get domain 1.

    Returns:
    domain 1

    setDomain1

    public void setDomain1(java.lang.String domain1)
    Set domain 1.

    Parameters:
    domain1 -

    getDomain2

    public java.lang.String getDomain2()
    Get domain 2.

    Returns:
    domain 2

    setDomain2

    public void setDomain2(java.lang.String domain2)
    Set domain 2.

    Parameters:
    domain2 -

    getGprsApn

    public java.lang.String getGprsApn()
    Get GPRS APN.

    Returns:
    GPRS APN

    setGprsApn

    public void setGprsApn(java.lang.String gprsApn)
    Set GPRS APN.

    Parameters:
    gprsApn - GPRS APN

    getGprsPassword

    public java.lang.String getGprsPassword()
    Get GPRS Password.

    Returns:
    GPRS Password

    setGprsPassword

    public void setGprsPassword(java.lang.String gprsPassword)
    Set GPRS Password.

    Parameters:
    gprsPassword -

    getGprsUserName

    public java.lang.String getGprsUserName()
    Get GPRS User Name.

    Returns:
    GPRS User Name

    setGprsUserName

    public void setGprsUserName(java.lang.String gprsUserName)
    Set GPRS User Name.

    Parameters:
    gprsUserName -

    getHomePage

    public java.lang.String getHomePage()
    Get homepage.

    Returns:
    homepage

    setHomePage

    public void setHomePage(java.lang.String homePage)
    Set homepage.

    Parameters:
    homePage -

    getLineType1

    public int getLineType1()
    Get line type 1.

    Returns:
    Line type 1

    setLineType1

    public void setLineType1(int lineType1)
    Set line type 1.

    Parameters:
    lineType1 -

    getLineType2

    public int getLineType2()
    Get line type 2.

    Returns:
    Line type 2

    setLineType2

    public void setLineType2(int lineType2)
    Set line type 2 .

    Parameters:
    lineType2 -

    getPort1

    public int getPort1()
    Get port 1.

    Returns:
    Port 1

    setPort1

    public void setPort1(int port1)
    Set port 1.

    Parameters:
    port1 -

    getPort2

    public int getPort2()
    Get port 2.

    Returns:
    Port 2

    setPort2

    public void setPort2(int port2)
    Set port 2.

    Parameters:
    port2 -

    getProxy1

    public java.lang.String getProxy1()
    Get proxy 1.

    Returns:
    Proxy1

    setProxy1

    public void setProxy1(java.lang.String proxy1)
    Set proxy 1.

    Parameters:
    proxy1 -

    getProxy2

    public java.lang.String getProxy2()
    Get proxy 2.

    Returns:
    Proxy 2

    setProxy2

    public void setProxy2(java.lang.String proxy2)
    Set proxy 2.

    Parameters:
    proxy2 -

    getServiceType1

    public int getServiceType1()
    Get service type 1.

    Returns:
    Service type 1

    setServiceType1

    public void setServiceType1(int serviceType1)
    Set service type 1.

    Parameters:
    serviceType1 -

    getServiceType2

    public int getServiceType2()
    Get service type 2.

    Returns:
    Service type 2

    setServiceType2

    public void setServiceType2(int serviceType2)
    Set service type 2.

    Parameters:
    serviceType2 -

    getSessionName

    public java.lang.String getSessionName()
    Get session name.

    Returns:
    Session's name

    setSessionName

    public void setSessionName(java.lang.String sessionName)
    Set session's name.

    Parameters:
    sessionName -

    getTimeOut

    public int getTimeOut()
    Get time out.

    Returns:
    Time out

    setTimeOut

    public void setTimeOut(int timeOut)
    Set time out.

    Parameters:
    timeOut -