|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.wlan.hotspot.HotspotClientRegistry
public final class HotspotClientRegistry
The HotspotClientRegistry allows client applications to add themselves to and remove themselves from the system which controls the device's Wi-Fi radio.
To register with the system, a client application must be able to provide its own HotspotClient
implementation and ApplicationDescriptor. Note that one of the client's classes must extend
Application in order to generate a valid
ApplicationDescriptor. The Application instance must also call
Application.enterEventDispatcher() to receive commands from the system.
HotspotClient, HotspotAuthenticationAgent,
and Application.HotspotCredentialsAgent to implement its credentials database or
use system's implementation.HotspotCredentialsAgent.getSystemHotspotCredentialsAgent().HotspotClient, the client must call the super's constructor
with instances of HotspotCredentialsAgent and HotspotAuthenticationAgent.HotspotClientRegistry.add(net.rim.device.api.wlan.hotspot.HotspotClient, net.rim.device.api.system.ApplicationDescriptor) method.HotspotClient.getSupportedNetworkTypes() is used to determine the supported types).HotspotCredentialsAgentWLANInfo.WLANAPInfo.HotspotClient.getSupportedNetworks(net.rim.device.api.system.WLANInfo.WLANAPInfo[]).
Note: In Hotspot API 1.0., only open security type (no layer 2 security) APs will be passed to the hotspot
clients.HotspotInfo.HotspotInfo for the hotspot (see class' documentation).HotspotAuthenticationAgent.addListener(net.rim.device.api.wlan.hotspot.HotspotStatusListener).HotspotAuthenticationAgent.verifySessionStatus(net.rim.device.api.wlan.hotspot.HotspotInfo) will be invoked.
This will prevent from notifying the user with a login notification if the session is still logged in after re-entering the coverage zone.HotspotAuthenticationAgent.login(net.rim.device.api.wlan.hotspot.HotspotInfo) will be invoked.HotspotAuthenticationAgent.cancelLogin(net.rim.device.api.wlan.hotspot.HotspotInfo) will be invoked.HotspotAuthenticationAgent.logout(net.rim.device.api.wlan.hotspot.HotspotInfo) will be invoked.HotspotAuthenticationAgent.notifyListeners(net.rim.device.api.wlan.hotspot.AuthenticationStatusEvent).HotspotAuthenticationAgent.HotspotClientRegistry.isFeatureSupported(byte) to check if probing feature is supported.
HotspotClient.getMenuItems() method.HotspotCredentialsAgent.setCredentialsControlPreference(int).
| Field Summary | ||
|---|---|---|
|
static byte |
NETWORK_DELAY_FEATURE
Used by HotspotClientRegistry.isFeatureSupported(byte) to determine whether delayed login into the network is supported. |
|
static byte |
PROBING_FEATURE
Used by HotspotClientRegistry.isFeatureSupported(byte) to determine whether network probing is supported. |
| Method Summary | ||
|---|---|---|
|
static void |
add(HotspotClient client,
ApplicationDescriptor application)
Registers a hotspot client with the device's operating system. |
|
static int |
getMajorAPIVersion()
Returns the Hotspot API's major version number. |
|
static int |
getMinorAPIVersion()
Returns the Hotspot API's minor version number. |
|
static boolean |
isFeatureSupported(byte feature)
Determines whether a given feature is supported by the Hotspot API. |
|
static void |
remove(HotspotClient client)
Removes a client from the registry. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte PROBING_FEATURE
HotspotClientRegistry.isFeatureSupported(byte) to determine whether network probing is supported.
if the network probing is not supported, HotspotInfo.PROBE_NETWORK_FLAG is used
to determine whether or not the network needs probing. The probing feature
is not supported in version 1.0.
HotspotAuthenticationAgent.probeNetwork and
HotspotAuthenticationAgent.cancelProbeNetwork are used to start/stop probing.
During probing, the client is expected to update the status using the STATUS_PROBE_ constants in HotspotStatusListener.
public static final byte NETWORK_DELAY_FEATURE
HotspotClientRegistry.isFeatureSupported(byte) to determine whether delayed login into the network is supported.
To use this feature, HotspotInfo.PROPERTY_LOGIN_DELAY should be set to the desired delay time
before the system attempts to login to any automatic login networks' hotspots.
| Method Detail |
|---|
public static void add(HotspotClient client,
ApplicationDescriptor application)
throws IllegalArgumentException,
UnsupportedOperationException
client - implementation of HotspotClient abstract class.application - ApplicationDescriptor of the client application.
IllegalArgumentException - thrown when ApplicationDescriptor is invalid.
UnsupportedOperationException - thrown when API is not active.
ControlledAccessException - thrown when the calling process does not have the necessary privileges.
public static void remove(HotspotClient client)
throws IllegalArgumentException,
UnsupportedOperationException
client - implementation of HotspotClient abstract class.
IllegalArgumentException - thrown when hotspot client is not registered.
UnsupportedOperationException - thrown when API is not active.
ControlledAccessException - thrown when the calling process does not have the necessary privileges.public static int getMajorAPIVersion()
public static int getMinorAPIVersion()
public static boolean isFeatureSupported(byte feature)
feature - one of the FEATURE_ constants defined in this class.
true if the feature is supported by the Hotspot API, false otherwise.
|
|||||||||
| 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.