Package ej.net.util.wifi
Class AccessPointConfiguration
- java.lang.Object
-
- ej.net.util.wifi.AccessPointConfiguration
-
public class AccessPointConfiguration extends Object
A configuration to connect to anAccessPoint.
-
-
Constructor Summary
Constructors Constructor Description AccessPointConfiguration(AccessPoint accessPoint)Instantiates anAccessPointConfigurationwith an access point.AccessPointConfiguration(String ssid)Instantiates anAccessPointConfigurationwith a Service Set IDentification (SSID).AccessPointConfiguration(String ssid, String passphrase, SecurityMode securityMode)Instantiates anAccessPointConfiguration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessPointgetAccessPoint()Gets the accessPoint.StringgetPassphrase()Gets the passphrase.SecurityModegetSecurityMode()Gets the security mode.StringgetSSID()Gets the Service Set IDentification (SSID).voidsetAccessPoint(AccessPoint accessPoint)Sets the accessPoint.voidsetPassphrase(String passphrase)Sets the passphrase.voidsetSecurityMode(SecurityMode securityMode)Sets the securityMode.voidsetSSID(String ssid)Sets the Service Set IDentification (SSID).
-
-
-
Constructor Detail
-
AccessPointConfiguration
public AccessPointConfiguration(@NonNull String ssid) throws NullPointerException
Instantiates anAccessPointConfigurationwith a Service Set IDentification (SSID).- Parameters:
ssid- the SSID to set.- Throws:
NullPointerException- when ssid isnull.
-
AccessPointConfiguration
public AccessPointConfiguration(@NonNull AccessPoint accessPoint) throws NullPointerException
Instantiates anAccessPointConfigurationwith an access point.- Parameters:
accessPoint- the AccessPoint to use.- Throws:
NullPointerException- if accessPoint isnullor its SSID.
-
AccessPointConfiguration
public AccessPointConfiguration(@NonNull String ssid, @Nullable String passphrase, @Nullable SecurityMode securityMode)
Instantiates anAccessPointConfiguration.- Parameters:
ssid- the SSID to set.passphrase- the passphrase to use.securityMode- the securityMode to use.- Throws:
NullPointerException- when ssid isnull.
-
-
Method Detail
-
getPassphrase
public String getPassphrase()
Gets the passphrase.- Returns:
- the passphrase, can be
null.
-
setPassphrase
public void setPassphrase(@Nullable String passphrase)
Sets the passphrase.- Parameters:
passphrase- the passphrase to set.
-
getSSID
public String getSSID()
Gets the Service Set IDentification (SSID). If anAccessPointis set, gets theAccessPointSSID.- Returns:
- the SSID.
- See Also:
AccessPoint.getSSID()
-
setSSID
public void setSSID(@NonNull String ssid) throws NullPointerException
Sets the Service Set IDentification (SSID). If anAccessPointis set, sets theAccessPointSSID.- Parameters:
ssid- the SSID to set.- Throws:
NullPointerException- if the SSID isnull.
-
getSecurityMode
public SecurityMode getSecurityMode()
Gets the security mode. If anAccessPointis set, set theAccessPointSecurity Mode- Returns:
- the security mode.
- See Also:
AccessPoint.getSecurityMode()
-
setSecurityMode
public void setSecurityMode(@Nullable SecurityMode securityMode)
Sets the securityMode. If anAccessPointis set, sets theAccessPointsecurityMode.- Parameters:
securityMode- the securityMode to set.
-
getAccessPoint
public AccessPoint getAccessPoint()
Gets the accessPoint.- Returns:
- the accessPoint.
-
setAccessPoint
public void setAccessPoint(@Nullable AccessPoint accessPoint)
Sets the accessPoint.- Parameters:
accessPoint- the accessPoint to set.
-
-