|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object OEM com.motorola.oem.websession.WebSessionManager
public final class WebSessionManager
WebSessionManager class provides a full control over the internet configuration.Enables operations such: Add -
addWebSession(com.motorola.oem.websession.WebSession)
Delete - removeWebSession(int)
Update - updateWebSession(com.motorola.oem.websession.WebSession, int)
Handle web session provisioning by browser message listener - see example 6 in websession package.
Each one of these parameters is stored in a Web Session.
Two types of connections are dependent of the internet configuration
(1) Standard Internet connection - used for all javax.microedition.io (std. MIDP2.0),
including OTADownload
API
(2) MMS connection - used for MMS send/receive
Note: User may store up to getMaxWebSessions()
Web sessions.
Web Sessions are stored in the non-volatile memory section.
There are four predefined (reserved) web sessions entries :
Java Session - Web session parameters for Standard Internet connection.
Mms Session - Web session parameters for MMS send/receive.
Prov Session - Web session parameters received by a Browser Message (READ ONLY).
FOTA Session - Web session parameters for Firmware upgrade (see User Guide).
These web sessions must contain operator specific values for successful internet connection.
WebSession
,
OTADownload
Field Summary | |
---|---|
static int |
AUTH_METHOD_NETWPIN
NETWPIN security method for Browser message. |
static int |
AUTH_METHOD_USERNETWPIN
USERNETWPIN security method for Browser message. |
static int |
AUTH_METHOD_USERPIN
USERPIN security method for Browser message. |
static int |
AUTH_METHOD_USERPINMAC
USERPINMAC security method for Browser message. |
static int |
BROWSER_SETTINGS_PROVISIONING_MMS
Prov Session contains settings for MMS session provisioning. |
static int |
BROWSER_SETTINGS_PROVISIONING_WEB
Prov Session contains settings for web session provisioning. |
static int |
SESSION_INDEX_INVALID
Predefined index for not existing web session. |
static int |
SESSION_INDEX_JAVA
Predefined index for "Java Session" web session. |
static int |
SESSION_INDEX_MMS
Predefined index for "Mms Session" web session. |
static int |
SESSION_INDEX_PROV
Predefined index for "Prov Session" web session. |
Method Summary | |
---|---|
int |
acceptBrowserMsg()
Accepts a WebSession provided Over The Air. |
int |
acceptBrowserMsg(java.lang.String pin)
Accepts a WebSession provided Over The Air. |
static int |
addWebSession(WebSession webSession)
Store a new WebSession entry in the device's non-volatile memory. |
static int |
findWebSessionByName(java.lang.String name)
Return index of WebSession with the specified session name. |
static int |
getCurrentWebSessionIndex()
Get index of the current Web Session. |
static WebSessionManager |
getInstance()
Returns a reference to the class's single instance. |
static int |
getMaxWebSessions()
Get the value of the maximum WebSession s amount allowed to be stored. |
static int |
getNumberWebSessions()
Get the number of WebSession s stored on the device. |
static WebSession |
getWebSession(int webSessionIndex)
Get a copy of the Web Session entry with the specified webSessionIndex . |
void |
rejectBrowserMsg()
Rejects a WebSession provided Over The Air. |
static boolean |
removeWebSession(int webSessionIndex)
Remove a WebSession entry from the non-volatile memory. |
void |
setBrowserMsgListener(WebSessionBrowserMsgListener listener)
Set A listener for WebSession events. |
static boolean |
setCurrentWebSession(int webSessionIndex)
Set the Web Session's settings for the active internet configuration for MIDP connection. |
static boolean |
updateWebSession(WebSession webSession,
int webSessionIndex)
Update an existing WebSession entry. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SESSION_INDEX_INVALID
public static final int SESSION_INDEX_JAVA
public static final int SESSION_INDEX_MMS
public static final int SESSION_INDEX_PROV
public static final int AUTH_METHOD_NETWPIN
acceptBrowserMsg()
to accept the Browser Message.
public static final int AUTH_METHOD_USERPIN
acceptBrowserMsg(String pin)
to accept the Browser Message.
public static final int AUTH_METHOD_USERNETWPIN
acceptBrowserMsg(String pin)
to accept the Browser Message.
public static final int AUTH_METHOD_USERPINMAC
acceptBrowserMsg(String pin)
to accept the Browser Message.
public static final int BROWSER_SETTINGS_PROVISIONING_WEB
public static final int BROWSER_SETTINGS_PROVISIONING_MMS
Method Detail |
---|
public static WebSessionManager getInstance() throws WebSessionException
WebSessionException
- Failed to construct WebSessionManager
.
public int acceptBrowserMsg(java.lang.String pin) throws WebSessionException
acceptBrowserMsg()
instead.WebSessionBrowserMsgListener.onBrowserMsgReceived(int)
handler.
pin
- code to check authentication
BROWSER_SETTINGS_PROVISIONING_WEB
,BROWSER_SETTINGS_PROVISIONING_MMS
,WebSessionException
- Browser settings update failedpublic int acceptBrowserMsg() throws WebSessionException
acceptBrowserMsg(String)
instead.WebSessionBrowserMsgListener.onBrowserMsgReceived(int)
handler.
BROWSER_SETTINGS_PROVISIONING_WEB
,BROWSER_SETTINGS_PROVISIONING_MMS
,WebSessionException
- If browser settings update failedpublic void rejectBrowserMsg()
WebSessionBrowserMsgListener.onBrowserMsgReceived(int)
handler.
public static int addWebSession(WebSession webSession) throws WebSessionException, java.lang.NullPointerException, java.lang.IllegalArgumentException
webSession
- A WebSession
to add
java.lang.NullPointerException
- Specified webSession
is null
java.lang.IllegalArgumentException
- One or more of the WebSession
WebSessionException
- WebSession
s amount reached the getMaxWebSessions
().
WebSessionException.AMOUNT_OUT_OF_BOUNDS_ERROR
WebSession
already exists.
WebSessionException.ALREADY_EXIST_ERROR
WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.getMaxWebSessions()
,
WebSession
public static boolean updateWebSession(WebSession webSession, int webSessionIndex) throws WebSessionException, java.lang.NullPointerException, java.lang.IllegalArgumentException
WebSession
entry.
webSession
- A well initialized WebSession
instance.webSessionIndex
- A reference to the WebSession
entry to update.
java.lang.NullPointerException
- Specified webSession
is null.
java.lang.IllegalArgumentException
- One or more of the WebSession
WebSessionException
- webSessionIndex
is invalid, or out of range: 1
to getMaxWebSessions()
.
WebSessionException.AMOUNT_OUT_OF_BOUNDS_ERROR
WebSession
entry matches the webSessionIndex
parameter.
WebSessionException.INDEX_NOT_FOUND_ERROR
WebSessionException.READ_ONLY_ERROR
WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.getMaxWebSessions()
,
getWebSession(int)
,
WebSession
public static boolean removeWebSession(int webSessionIndex) throws WebSessionException
WebSession
entry from the non-volatile memory.
webSessionIndex
- A reference to the WebSession
entry.
WebSessionException
- webSessionIndex
is invalid, or out of range: 1
to getMaxWebSessions()
.
WebSessionException.INDEX_NOT_FOUND_ERROR
WebSession
entry matches the webSessionIndex
parameter.
WebSessionException.INDEX_NOT_FOUND_ERROR
WebSessionException.READ_ONLY_ERROR
WebSessionException.CANNOT_BE_REMOVED_ERROR
WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.addWebSession(com.motorola.oem.websession.WebSession)
public static boolean setCurrentWebSession(int webSessionIndex) throws WebSessionException
webSessionIndex
- A reference to the WebSession
entry to set as current.
WebSessionException
- 1
to getMaxWebSessions()
.WebSession
entry matches the WebSessionIndex
parameter ).
WebSessionException.INDEX_NOT_FOUND_ERROR
WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.addWebSession(com.motorola.oem.websession.WebSession)
public static int getCurrentWebSessionIndex() throws WebSessionException
WebSession
if it exists
or SESSION_INDEX_INVALID
if session does not exist
WebSessionException
- WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.setCurrentWebSession(int)
public static WebSession getWebSession(int webSessionIndex) throws WebSessionException
webSessionIndex
.
webSessionIndex
- A reference to the WebSession
entry
WebSession
on success, null on failure
WebSessionException
- 1
to getMaxWebSessions()
.
WebSessionException.INDEX_OUT_OF_BOUNDS_ERROR
WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.addWebSession(com.motorola.oem.websession.WebSession)
,
updateWebSession(com.motorola.oem.websession.WebSession, int)
,
setCurrentWebSession(int)
public static final int getMaxWebSessions()
WebSession
s amount allowed to be stored.
WebSession
s amount allowed to be storedaddWebSession(com.motorola.oem.websession.WebSession)
,
updateWebSession(com.motorola.oem.websession.WebSession, int)
public static int getNumberWebSessions() throws WebSessionException
WebSession
s stored on the device.
WebSession
s
WebSessionException
- WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.addWebSession(com.motorola.oem.websession.WebSession)
,
updateWebSession(com.motorola.oem.websession.WebSession, int)
public static int findWebSessionByName(java.lang.String name) throws WebSessionException, java.lang.NullPointerException
WebSession
with the specified session name.
name
- The name of websession to find
WebSession
with the specified session name if it exists
or SESSION_INDEX_INVALID
if session does not exist
java.lang.NullPointerException
- WebSessionException
- WebSessionException.PLATFORM_NOT_READY_ERROR
WebSessionException.SIM_CARD_NOT_READY_ERROR
.public void setBrowserMsgListener(WebSessionBrowserMsgListener listener)
listener
- External listener object to receive events.
Setting null listener will cause masking of WebSession events.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |