public interface INetworkImplementation
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
DEFAULT_LINK_SPEED
Default Link Speed for PPP connection.
|
static byte[] |
DEFAULT_PHONE_NUMBER
Default Phone number for PPP connection.
|
static int |
ETH_TYPE
Network interface is of 'Ethernet' type.
|
static int |
MOBILE_TYPE
Network interface is of 'Mobile' type.
|
static int |
UNKNOWN_TYPE
Network interface is of 'Unknown' type.
|
static int |
WIFI_TYPE
Network interface is of 'Wi-Fi' type.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getActiveNetwork()
Retrieves the active network connection identifier.
|
java.lang.String |
getLocalIpAddress()
Retrieves the active connection IP address.
|
byte[] |
getPPPLinkSpeed()
Retrieves the PPP link speed in bits per second.
|
byte[] |
getPPPPhoneNumber()
Retrieves the phone number that was dialed for the PPP connection.
|
MacAddress |
getPrimaryMac()
Retrieves the primary MAC address of the device depending on the
active connection type.
|
ISocket |
getSocket(java.lang.String address,
int port)
Returns a socket from the given address and port.
|
ISocket |
getSSLSocket(java.lang.String address,
int port)
Returns a secure socket from the given address and port.
|
boolean |
internetAvailable()
Checks whether there is Internet connectivity or not.
|
static final byte[] DEFAULT_LINK_SPEED
MOBILE_TYPEstatic final byte[] DEFAULT_PHONE_NUMBER
MOBILE_TYPEstatic final int ETH_TYPE
static final int MOBILE_TYPE
static final int UNKNOWN_TYPE
static final int WIFI_TYPE
int getActiveNetwork()
java.lang.String getLocalIpAddress()
byte[] getPPPLinkSpeed()
This only is needed when the connection type is PPP
(see MOBILE_TYPE).
MOBILE_TYPEbyte[] getPPPPhoneNumber()
This only is needed when the connection type is PPP
(see MOBILE_TYPE).
MOBILE_TYPEMacAddress getPrimaryMac()
ISocket getSocket(java.lang.String address, int port) throws java.lang.Exception
address - The address of the host to connect.port - The port of the connection.java.lang.Exception - if any error occurs while getting a standard socket to
the given address and port.ISocket getSSLSocket(java.lang.String address, int port) throws java.lang.Exception
address - The address of the host to connect.port - The port of the connection.java.lang.Exception - if any error occurs while getting a SSL socket to the
given address and port.boolean internetAvailable()
true if there is Internet connectivity, false
otherwise.© Copyright 2014 Etherios, Inc. All rights reserved. Etherios, Inc. is a Division of Digi International Inc.