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);
 

See Also:
WLANInfo
Since:
BlackBerry API 4.3.0

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_UNSPECIFIED_REASON

static final int WLAN_UNSPECIFIED_REASON
WLAN connection failed for an unspecified reason.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

WLAN_CONNECTION_TERMINATED

static final int WLAN_CONNECTION_TERMINATED
WLAN connection was unexpectedly terminated.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

WLAN_IP_ADDRESS_LOST

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

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

WLAN_DHCP_UNREACHABLE

static final int WLAN_DHCP_UNREACHABLE
The device could not reach a DHCP server.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

WLAN_OUT_OF_COVERAGE

static final int WLAN_OUT_OF_COVERAGE
The device went out of WLAN coverage.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

WLAN_AUTH_FAIL

static final int WLAN_AUTH_FAIL
WLAN supplicant authentication failed.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

WLAN_ASSOCIATION_FAILED

static final int WLAN_ASSOCIATION_FAILED
The device could not associate with a WLAN network.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0


Method Detail

networkConnected

void networkConnected()
Invoked when the device has connected to a WLAN network.

Since:
BlackBerry API 4.3.0

networkDisconnected

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:
BlackBerry API 4.3.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal