net.rim.device.api.system
Interface WLANConnectionListener

All Superinterfaces:
WLANListener

public interface WLANConnectionListener
extends WLANListener

An interface for receiving notifications of WLAN connection events. Objects implementing this interface can be registered with the WLAN system via WLANInfo.addListener(net.rim.device.api.system.WLANListener).
Receive notifications when the transceiver for the WLAN wireless access family connects or disconnects with a wireless access point


1.From the net.rim.device.api.system package, import the WLANListener and WLANConnectionListener interfaces and the WLANInfo class.

2. Invoke Application.addRadioListener(int wafFilter, RadioListener listener) using the RadioInfo.WAF_WLAN field and a RadioStatusListener object as parameters.

 RadioStatusListener listener = new RadioStatusListener() 
 {
     //  
 };
 
 Application.addRadioListener(RadioInfo.WAF_WLAN, listener);
 
3. Register a WLANConnectionListener object by invoking the WLANInfo.addListener() method using a WLANConnectionListener object as a parameter.
 WLANConnectionListener listener = new WLANConnectionListener() 
 {
     // 
 };
 WLANInfo.addListener(listener);
 

Since:
JDE 4.3.0
See Also:
WLANInfo

Field Summary
static int WLAN_ASSOCIATION_FAILED
          The device could not associate with a WLAN network.
static int WLAN_AUTH_FAIL
          WLAN supplicant authentication failed.
static int WLAN_CONNECTION_TERMINATED
          WLAN connection was unexpectedly terminated.
static int WLAN_DHCP_UNREACHABLE
          The device could not reach a DHCP server.
static int WLAN_IP_ADDRESS_LOST
          The device's IP address is no longer valid (e.g., lease expired).
static int WLAN_OUT_OF_COVERAGE
          The device went out of WLAN coverage.
static int WLAN_UNSPECIFIED_REASON
          WLAN connection failed for an unspecified reason.
 
Method Summary
 void networkConnected()
          Invoked when the device has connected to a WLAN network.
 void networkDisconnected(int reason)
          Invoked when the device has disconnected from a WLAN network, or when a connection attempt to a WLAN network has failed.
 

Field Detail

WLAN_ASSOCIATION_FAILED

public static final int WLAN_ASSOCIATION_FAILED
The device could not associate with a WLAN network.
Since:
JDE 4.3.0

WLAN_AUTH_FAIL

public static final int WLAN_AUTH_FAIL
WLAN supplicant authentication failed.
Since:
JDE 4.3.0

WLAN_CONNECTION_TERMINATED

public static final int WLAN_CONNECTION_TERMINATED
WLAN connection was unexpectedly terminated.
Since:
JDE 4.3.0

WLAN_DHCP_UNREACHABLE

public static final int WLAN_DHCP_UNREACHABLE
The device could not reach a DHCP server.
Since:
JDE 4.3.0

WLAN_IP_ADDRESS_LOST

public static final int WLAN_IP_ADDRESS_LOST
The device's IP address is no longer valid (e.g., lease expired).
Since:
JDE 4.3.0

WLAN_OUT_OF_COVERAGE

public static final int WLAN_OUT_OF_COVERAGE
The device went out of WLAN coverage.
Since:
JDE 4.3.0

WLAN_UNSPECIFIED_REASON

public static final int WLAN_UNSPECIFIED_REASON
WLAN connection failed for an unspecified reason.
Since:
JDE 4.3.0
Method Detail

networkConnected

public void networkConnected()
Invoked when the device has connected to a WLAN network.
Since:
JDE 4.3.0

networkDisconnected

public void networkDisconnected(int reason)
Invoked when the device has disconnected from a WLAN network, or when a connection attempt to a WLAN network has failed.
Parameters:
reason - The reason for the disconnect or failure (one of the WLAN_* constants).
Since:
JDE 4.3.0



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.