public class WIFIProtocol
extends AbstractComProtocol
WIFI protocol implementation
Modifier and Type | Class and Description |
---|---|
static interface |
WIFIProtocol.SecurityType |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
P2P_IOTIZE_IP |
Constructor and Description |
---|
WIFIProtocol(android.net.wifi.WifiManager wifiManager,
android.net.ConnectivityManager connManager) |
Modifier and Type | Method and Description |
---|---|
void |
_connect() |
void |
_disconnect() |
boolean |
checkSocketConnection() |
static android.net.wifi.WifiConfiguration |
createConfiguration(android.net.wifi.ScanResult accessPoint,
java.lang.String password) |
static android.net.wifi.WifiConfiguration |
createConfiguration(java.lang.String ssid,
java.lang.String securityType) |
static android.net.wifi.WifiConfiguration |
createConfiguration(java.lang.String ssid,
java.lang.String securityType,
java.lang.String password) |
boolean |
equals(java.lang.Object o) |
static WIFIProtocol |
fromIP(android.content.Context context,
java.lang.String deviceIp) |
static WIFIProtocol |
fromIP(android.content.Context context,
java.lang.String deviceIp,
android.net.wifi.WifiConfiguration wifiConfig) |
java.lang.String |
getSSID() |
HostProtocol |
getType() |
android.net.wifi.WifiConfiguration |
getWifiConfigBySSID(java.lang.String ssid) |
int |
hashCode() |
boolean |
isConnectedToAccessPoint(java.lang.String SSID) |
boolean |
isConnectedToAnyAccessPoint() |
boolean |
isConnectedToCurrentConfigAccessPoint() |
byte[] |
read() |
static java.lang.String |
sanitizeWifiSSID(java.lang.String ssid) |
void |
sendAsync(byte[] responseMessage,
<any> event) |
WIFIProtocol |
setConfigurationPassword(java.lang.String password) |
WIFIProtocol |
setIoTizeIp(java.lang.String ip) |
WIFIProtocol |
setScanResult(android.net.wifi.ScanResult scanResult) |
WIFIProtocol |
setWifiConfiguration(java.lang.String ssid,
java.lang.String securityType,
java.lang.String password) |
WIFIProtocol |
setWifiConfiguration(android.net.wifi.WifiConfiguration conf) |
java.lang.String |
toString() |
void |
write(byte[] message) |
public static final java.lang.String P2P_IOTIZE_IP
public WIFIProtocol(android.net.wifi.WifiManager wifiManager, android.net.ConnectivityManager connManager)
public WIFIProtocol setIoTizeIp(java.lang.String ip)
public WIFIProtocol setWifiConfiguration(android.net.wifi.WifiConfiguration conf)
public WIFIProtocol setConfigurationPassword(java.lang.String password)
public WIFIProtocol setScanResult(android.net.wifi.ScanResult scanResult)
public void _connect() throws IoTizeComException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
IoTizeComException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void write(byte[] message) throws java.lang.Exception
java.lang.Exception
public byte[] read() throws java.lang.Exception
java.lang.Exception
public void sendAsync(byte[] responseMessage, <any> event)
public HostProtocol getType()
public void _disconnect() throws java.io.IOException
java.io.IOException
public android.net.wifi.WifiConfiguration getWifiConfigBySSID(java.lang.String ssid)
@Nullable public java.lang.String getSSID()
public boolean isConnectedToAnyAccessPoint()
public boolean isConnectedToAccessPoint(java.lang.String SSID)
public static android.net.wifi.WifiConfiguration createConfiguration(java.lang.String ssid, java.lang.String securityType)
public static android.net.wifi.WifiConfiguration createConfiguration(java.lang.String ssid, java.lang.String securityType, @Nullable java.lang.String password)
public static android.net.wifi.WifiConfiguration createConfiguration(android.net.wifi.ScanResult accessPoint, java.lang.String password)
public static java.lang.String sanitizeWifiSSID(@NonNull java.lang.String ssid)
public boolean checkSocketConnection()
public boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String toString()
public WIFIProtocol setWifiConfiguration(java.lang.String ssid, @NonNull java.lang.String securityType, @Nullable java.lang.String password)
public boolean isConnectedToCurrentConfigAccessPoint()
public static WIFIProtocol fromIP(@NonNull android.content.Context context, java.lang.String deviceIp)
public static WIFIProtocol fromIP(@NonNull android.content.Context context, java.lang.String deviceIp, android.net.wifi.WifiConfiguration wifiConfig)