|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.wlan.hotspot.HotspotAuthenticationAgent
public abstract class HotspotAuthenticationAgent
Hotspot authentication agents serve as intermediaries between client applications and
hotpost status listeners (HotspotStatusListener
), initiating login/logout and monitoring the state of the client
application's connections to various hotspots.
The client must pass an instance of this class to its HotspotClient.HotspotClient(net.rim.device.api.wlan.hotspot.HotspotCredentialsAgent, net.rim.device.api.wlan.hotspot.HotspotAuthenticationAgent, int)
constructor.
probeNetwork
- perform network probing. This method is not supported in the Hotspot API version 1.0.cancelProbeNetwork
- cancel network probing. This method is not supported in the Hotspot API version 1.0.HotspotClientRegistry.isFeatureSupported
to check if probing feature is supported.
If the client wishes to use the methods above then it must implement HotspotStatusListener
to use as a parameter.
For more information, please refer to the API overview section provided in HotspotClientRegistry
.
Field Summary | ||
---|---|---|
|
static byte |
STATE_CANCELLING_LOGIN
Client is attempting to cancel login. |
|
static byte |
STATE_LOGGED_IN
Client has logged in successfully. |
|
static byte |
STATE_LOGGED_OUT
Client is logged out. |
|
static byte |
STATE_LOGGING_IN
Client is attempting to login. |
|
static byte |
STATE_LOGGING_OUT
Client is attempting to logout. |
|
static byte |
STATE_PROBING_NETWORK
Client is probing a network. |
Constructor Summary | ||
---|---|---|
|
HotspotAuthenticationAgent()
Creates a new instance of HotspotAuthenticationAgent. |
Method Summary | ||
---|---|---|
|
void |
addListener(HotspotStatusListener listener)
Adds a hotspot status listener. |
|
abstract void |
cancelLogin(HotspotInfo hotspot)
Cancels login to a hotspot. |
|
void |
cancelProbeNetwork()
Cancels network probing. |
|
abstract int |
getSessionState()
Retrieves the session state of the authentication agent. |
|
abstract void |
login(HotspotInfo hotspot)
Initiates login to a hotspot. |
|
abstract void |
logout(HotspotInfo hotspot)
Initiates logout from a hotspot. |
|
protected void |
notifyListeners(AuthenticationStatusEvent event)
This method must be used to update all listeners during any hotspot process. |
|
void |
probeNetwork(HotspotInfo hotspot)
Performs network probing. |
|
void |
removeListener(HotspotStatusListener listener)
Removes a hotspot status listener from the agent. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte STATE_LOGGED_OUT
public static final byte STATE_LOGGING_IN
public static final byte STATE_LOGGED_IN
public static final byte STATE_LOGGING_OUT
public static final byte STATE_CANCELLING_LOGIN
public static final byte STATE_PROBING_NETWORK
This state is not supported in the Hotspot API version 1.0.
Use HotspotClientRegistry.isFeatureSupported(byte)
to check if network probing is supported.
Constructor Detail |
---|
public HotspotAuthenticationAgent()
Method Detail |
---|
public abstract void login(HotspotInfo hotspot)
When this method is called, it must set the hotspot authentication agent's session state
to HotspotAuthenticationAgent.STATE_LOGGING_IN
.
After a successful login, the session state must be set to HotspotAuthenticationAgent.STATE_LOGGED_IN
and the client
must update its listeners using the notifyListeners
method.
hotspot
- currently associated hotspot information.public abstract void logout(HotspotInfo hotspot)
When this method is called, it must set the hotspot authentication agent's session state
to HotspotAuthenticationAgent.STATE_LOGGING_OUT
.
After a successful logout, the session state must be set to HotspotAuthenticationAgent.STATE_LOGGED_OUT
and the client
must update its listeners using the notifyListeners
method.
hotspot
- currently associated hotspot informationpublic abstract int getSessionState()
STATE_
constants defined in this class.public abstract void cancelLogin(HotspotInfo hotspot)
When this method is called, the client must set the hotspot authentication agent's session state
to HotspotAuthenticationAgent.STATE_CANCELLING_LOGIN
.
After a successful cancellation, the session state must be set to HotspotAuthenticationAgent.STATE_LOGGED_OUT
and the client
must update its listeners using the notifyListeners
method.
hotspot
- currently associated hotspot information.public void probeNetwork(HotspotInfo hotspot)
This method is not supported in the Hotspot API version 1.0.
Use HotspotClientRegistry.isFeatureSupported(byte)
to check if network probing is supported.
When this method is called, it must set the hotspot authentication agent's session state to
HotspotAuthenticationAgent.STATE_PROBING_NETWORK
.
After probing is complete, the session state must be set to HotspotAuthenticationAgent.STATE_LOGGED_OUT
.
hotspot
- currently associated networkpublic void cancelProbeNetwork()
This method is not supported in the Hotspot API version 1.0.
Use HotspotClientRegistry.isFeatureSupported(byte)
to check if network probing is supported.
After cancellation is complete, the session state must be set to HotspotAuthenticationAgent.STATE_LOGGED_OUT
.
public final void addListener(HotspotStatusListener listener)
notifyListeners
when status is available.
listener
- HotspotStatusListener
listener for hotspot status updates.protected final void notifyListeners(AuthenticationStatusEvent event)
event
- AuthenticationStatusEvent
used to update listenerspublic final void removeListener(HotspotStatusListener listener)
listener
- HotspotStatusListener
instance to be removed
|
|||||||||
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.