Oracle Java Wireless Client

com.oracle.mobile.io.accesspoint
Class AccessPoint

java.lang.Object
  extended by com.oracle.mobile.io.accesspoint.AccessPoint
Direct Known Subclasses:
WifiAccessPoint

public class AccessPoint
extends java.lang.Object

An access point is an internet connectivity configuration that is predefined on a device. An access point can represent different network profiles for the same bearer type, such as different cellular data network APNs or for different bearers that may be available on a device, such as WiFi or bluetooth.


Field Summary
static int BEARER_BLUETOOTH
          Bluetooth bearer
static int BEARER_CSD
          Circuit Switched Data bearer
static int BEARER_ETHERNET
          Ethernet bearer
static int BEARER_PSD
          Packet Switched Data (GPRS, W-CDMA etc) bearer
static int BEARER_UNKNOWN
          Unknown bearer
static int BEARER_WIFI
          Wi-Fi bearer
static int BEARER_WIMAX
          WiMax bearer
static int NETWORK_PRIVATE
          An access point with NETWORK_PRIVATE network type can be used to access a private network.
static int NETWORK_PUBLIC
          An access point with NETWORK_PUBLIC network type can be used for public internet access.
static int NETWORK_SERVICE_SPECIFIC
          An access point with NETWORK_SERVICE_SPECIFIC network type is used for operator specific services.
static int NETWORK_UNKNOWN
          Unknown network type
 
Method Summary
 boolean equals(java.lang.Object object)
          Checks if another object is "equal" to this one.
 int getBearerType()
          Gets the bearer type of this access point.
 java.lang.String getHttpProxy()
          Returns http proxy defined on the device for this access point or null if access point is not requires http proxy to establish connection.
 int getId()
          Gets the id of this access point Id is unique identifier of an Access Point
 java.lang.String getLocalAddress()
          Gets the local IP number bound to this access point as String.
 java.lang.String getName()
          Gets the name of this access point.
 java.lang.String getNetworkServiceType()
          Returns the service type of access point's target network or null if there is no specific service type for this network.
 int getNetworkType()
          Returns a kind of access point's target network.
 int getPriority()
          Gets the priority of this access point.
 int hashCode()
          Returns a hash code value for the object.
 boolean isAvailable()
          Checks whether access point connectivity is possible.
 boolean isConnected()
          Checks whether access point connectivity exists and it is possible to pass data using this access point.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEARER_UNKNOWN

public static final int BEARER_UNKNOWN
Unknown bearer

See Also:
Constant Field Values

BEARER_CSD

public static final int BEARER_CSD
Circuit Switched Data bearer

See Also:
Constant Field Values

BEARER_PSD

public static final int BEARER_PSD
Packet Switched Data (GPRS, W-CDMA etc) bearer

See Also:
Constant Field Values

BEARER_WIFI

public static final int BEARER_WIFI
Wi-Fi bearer

See Also:
Constant Field Values

BEARER_WIMAX

public static final int BEARER_WIMAX
WiMax bearer

See Also:
Constant Field Values

BEARER_BLUETOOTH

public static final int BEARER_BLUETOOTH
Bluetooth bearer

See Also:
Constant Field Values

BEARER_ETHERNET

public static final int BEARER_ETHERNET
Ethernet bearer

See Also:
Constant Field Values

NETWORK_UNKNOWN

public static final int NETWORK_UNKNOWN
Unknown network type

See Also:
Constant Field Values

NETWORK_PUBLIC

public static final int NETWORK_PUBLIC
An access point with NETWORK_PUBLIC network type can be used for public internet access.

See Also:
Constant Field Values

NETWORK_PRIVATE

public static final int NETWORK_PRIVATE
An access point with NETWORK_PRIVATE network type can be used to access a private network.

See Also:
Constant Field Values

NETWORK_SERVICE_SPECIFIC

public static final int NETWORK_SERVICE_SPECIFIC
An access point with NETWORK_SERVICE_SPECIFIC network type is used for operator specific services. Service type for this network can be retrieved using getNetworkServiceType method.

See Also:
Constant Field Values
Method Detail

getPriority

public int getPriority()
Gets the priority of this access point.

Returns:
the priority of this access point

getName

public java.lang.String getName()
Gets the name of this access point.

Returns:
the name of this access point

getBearerType

public int getBearerType()
Gets the bearer type of this access point.

Returns:
one of the bearer type constant values defined in this class

getNetworkType

public int getNetworkType()
Returns a kind of access point's target network.

Returns:
one of the network type constant values defined in this class

getNetworkServiceType

public java.lang.String getNetworkServiceType()
Returns the service type of access point's target network or null if there is no specific service type for this network. For example, an access point which represents cellular data network APN for receiving MMS messages can return "MMS" type.

Returns:
the service type of access point's target network

isAvailable

public boolean isAvailable()
Checks whether access point connectivity is possible. Access point may be unavailable for example when the flight mode in on, or when the device is out of the coverage area for any network of this type.

Returns:
true if available, false otherwise.

isConnected

public boolean isConnected()
Checks whether access point connectivity exists and it is possible to pass data using this access point. Application can try to establish connection using available but not connected access point. The device tries to connect to this access point in this case.

Returns:
true if connected, false otherwise.

getHttpProxy

public java.lang.String getHttpProxy()
Returns http proxy defined on the device for this access point or null if access point is not requires http proxy to establish connection. This proxy server will be used automatically for all http connection.

Returns:
the proxy server's hostname or ip address followed by ':' and port or null

getLocalAddress

public java.lang.String getLocalAddress()
Gets the local IP number bound to this access point as String. It is possible to get local address only for connected access point otherwise getLocalAddress returns null. In case of IPv6 address it will be enclosed with '[', ']' characters.

Returns:
the local IP address or null if it is not possible to get local address

equals

public boolean equals(java.lang.Object object)
Checks if another object is "equal" to this one. An AccessPoint object is equal to another object if the other object is an instance AccessPoint and it represents the same access point defined on the device.

Overrides:
equals in class java.lang.Object
Parameters:
object - an object to compare
Returns:
true it the object is an instance of the same class and it represents the same access point

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable

getId

public int getId()
Gets the id of this access point Id is unique identifier of an Access Point

Returns:
id of the access point

Oracle Java Wireless Client

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