|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.wlan.hotspot.HotspotClient
public abstract class HotspotClient
Classes that extend the abstract class HotspotClient can register with the HotspotClientRegistry
class and manage connections between the application to which they belong and the system that
controls the device's Wi-Fi radio.
HotspotCredentialsAgent
and an instance of HotspotAuthenticationAgent
.
HotspotClient.getHotspotCredentialsAgent()
HotspotClient.getHotspotAuthenticationAgent()
HotspotClient.getSupportedNetworkTypes()
HotspotClient.setSupportedNetworkTypes(int)
HotspotClient.enable(boolean)
HotspotClient.isEnabled()
HotspotClientRegistry
.
Field Summary | ||
---|---|---|
|
static int |
NETWORK_TYPE_AUTOMATIC
The bit of the network types bitmask that indicates whether the hotspot client supports automatic login type networks. |
|
static int |
NETWORK_TYPE_MANUAL
The bit of the network types bitmask that indicates whether the hotspot client supports manual login type networks. |
|
static int |
URL_FORGOT_PASSWORD
This URL type is used to construct the bitmask in getAvailableURLs and
passed into loadURL when the user clicks the forgot password button. |
|
static int |
URL_REGISTRATION
This URL type is used to construct the bitmask in getAvailableURLs and
passed into loadURL when the user clicks the sign-up button. |
Constructor Summary | ||
---|---|---|
|
protected |
HotspotClient(HotspotCredentialsAgent credentials,
HotspotAuthenticationAgent authentication,
int networkType)
Protected constructor used to create a hotspot client. |
Method Summary | ||
---|---|---|
|
protected void |
enable(boolean enable)
Enables and disables the client. |
|
abstract String |
getClientName()
Retrieves the client's name. |
|
HotspotAuthenticationAgent |
getHotspotAuthenticationAgent()
Retrieves this client's HotspotAuthenticationAgent . |
|
HotspotCredentialsAgent |
getHotspotCredentialsAgent()
Retrieves this client's HotspotCredentialsAgent . |
|
ApplicationMenuItem[] |
getMenuItems()
Retrieves custom menu items from the client. |
|
int |
getSupportedNetworkTypes()
Retrieves a bitmask (int) that indicates which types of network are supported by the client. |
|
abstract HotspotInfo[] |
getSupportedNetworks(WLANInfo.WLANAPInfo[] networks)
Processes scanned networks against client's database and returns only those networks that are supported by the client. |
|
int |
getSupportedURLs()
Retrieves a bitmask (int) that indicates which URLs are available. |
|
boolean |
isEnabled()
Determines whether the client is enabled in the system or not. |
|
void |
loadURL(int type)
If the client supports one or more URLs then it must override this method. |
|
protected boolean |
setSupportedNetworkTypes(int type)
Sets supported network types. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NETWORK_TYPE_AUTOMATIC
public static final int NETWORK_TYPE_MANUAL
public static final int URL_REGISTRATION
getAvailableURLs
and
passed into loadURL
when the user clicks the sign-up button.
public static final int URL_FORGOT_PASSWORD
getAvailableURLs
and
passed into loadURL
when the user clicks the forgot password button.
Constructor Detail |
---|
protected HotspotClient(HotspotCredentialsAgent credentials, HotspotAuthenticationAgent authentication, int networkType) throws IllegalArgumentException
credentials
- implementation of HotspotCredentialsAgent
.authentication
- implementation of of HotspotAuthenticationAgent
.networkType
- bitmask that indicates which network types are supported, constructed using NETWORK_TYPE_
constants.
IllegalArgumentException
- HotspotCredentialsAgent or HotspotAuthenticationAgent is null
, or networkType is invalid.Method Detail |
---|
public int getSupportedURLs()
By default, this method returns 0.
HotspotClient.URL_REGISTRATION
bit of the bitmask is set, the client supports registration URL.HotspotClient.URL_FORGOT_PASSWORD
bit of the bitmask is set, the client supports forgot password URL.
URL_
constants.public void loadURL(int type)
URL_
constants.
It is highly recommended that the client uses a URL where the user cannot complete login, so that the user will be forced to use the Wi-Fi credentials screen to enter credentials to be updated in the client.
type
- one of the URL_
type constantspublic final int getSupportedNetworkTypes()
HotspotClient.NETWORK_TYPE_AUTOMATIC
bit of the bitmask is set, the client supports automatic login networks.HotspotClient.NETWORK_TYPE_MANUAL
bit of the bitmask is set, the client supports manual login networks.HotspotClient.NETWORK_TYPE_DEFAULT_TO_MANUAL
bit of the bitmask is set then the profile which represents automatic login networks
will be set to manual login type by default. The user has the ability to change it back to automatic, unlike just manual login networks type
where the user is not allowed to change the profile to automatic. This bit will be ignored if NETWORK_TYPE_AUTOMATIC
is not set.
public ApplicationMenuItem[] getMenuItems()
By default, this method returns null
.
public abstract HotspotInfo[] getSupportedNetworks(WLANInfo.WLANAPInfo[] networks) throws HotspotException
networks
- array of scanned networks
null
if it does not support any of the networks.
HotspotException
- with HotspotException#DATABASE_UNAVAILABLE
flag if database
is unavailable or with HotspotException#HOTSPOT_CLIENT_DISABLED
flag if client is disabled.public abstract String getClientName()
During installation, client's name will be as the profile name. If a profile with the same name already exists in the database, then the new profile name will be enumerated.
protected final boolean setSupportedNetworkTypes(int type)
type
- bitmask for supported networks. The bitmask must be constructed using NETWORK_TYPE_
constants.
true
if update has been performed, or false
if update cannot be performed.protected final void enable(boolean enable)
By default, the client is enabled.
enabled
- true
to enable client and false
to disable client.public final boolean isEnabled()
true
if the client is enabled and false
if the client is disabled.public final HotspotAuthenticationAgent getHotspotAuthenticationAgent()
HotspotAuthenticationAgent
.
public final HotspotCredentialsAgent getHotspotCredentialsAgent()
HotspotCredentialsAgent
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.