Oracle Java Wireless Client

com.oracle.mobile.io.accesspoint
Class AccessPointManager

java.lang.Object
  extended by com.oracle.mobile.io.accesspoint.AccessPointManager

public class AccessPointManager
extends java.lang.Object

AccessPointManager class provides the basic capabilities for retrieving information about access points.


Method Summary
 void addListener(AccessPointListener listener)
          Registers listener for access point related events
 AccessPoint getAccessPointById(int id)
          Factory method to get access point by Id.
 AccessPoint getAccessPointFromConnection(javax.microedition.io.Connection c)
          Gets the access point used in the specified connection.
 AccessPoint[] getAllAccessPoints()
          Get all access points defined in the system.
 AccessPoint getDefaultAccessPoint()
          Returns the access point to be used for all suite connection for which access point was not specified explicitly.
static AccessPointManager getInstance()
           
 void removeListener(AccessPointListener listener)
          Removes listener for access point related events
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AccessPointManager getInstance()

addListener

public void addListener(AccessPointListener listener)
Registers listener for access point related events

Parameters:
listener - AccessPointListener object to receive notifications about access points

removeListener

public void removeListener(AccessPointListener listener)
Removes listener for access point related events

Parameters:
listener - access point listener to remove

getAllAccessPoints

public AccessPoint[] getAllAccessPoints()
Get all access points defined in the system. Array is ordered by priority from HIGH to LOW

Returns:
array of the access points

getDefaultAccessPoint

public AccessPoint getDefaultAccessPoint()
Returns the access point to be used for all suite connection for which access point was not specified explicitly. This value is set by user in setting dialog.

Returns:
access point instance or null if it was not set or there is no such access point

getAccessPointById

public AccessPoint getAccessPointById(int id)
Factory method to get access point by Id.

Parameters:
id - the id of the access point
Returns:
corresponding AccessPoint instance or null

getAccessPointFromConnection

public AccessPoint getAccessPointFromConnection(javax.microedition.io.Connection c)
                                         throws java.io.IOException
Gets the access point used in the specified connection. It is not possible to get an access point for loopback connections.

Parameters:
c - network Connection instance to get access point
Returns:
AccessPoint instance of an access point used to establish connection, null if it is not possible to get this information.
Throws:
java.io.IOException - if any I/O error occurs
java.lang.IllegalArgumentException - it c is not a network connection

Oracle Java Wireless Client

Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.