public class EthernetManager extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
EthernetManager.Listener
A listener interface to receive notification on changes in Ethernet.
|
Constructor and Description |
---|
EthernetManager(Context context,
IEthernetManager service)
Create a new EthernetManager instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(EthernetManager.Listener listener)
Adds a listener.
|
IpConfiguration |
getConfiguration()
Get Ethernet configuration.
|
boolean |
isAvailable()
Indicates whether the system currently has one or more
Ethernet interfaces.
|
void |
removeListener(EthernetManager.Listener listener)
Removes a listener.
|
void |
setConfiguration(IpConfiguration config)
Set Ethernet configuration.
|
public EthernetManager(Context context, IEthernetManager service)
Context.getSystemService()
to retrieve
the standard Context.ETHERNET_SERVICE
.public IpConfiguration getConfiguration()
IpConfiguration
.public void setConfiguration(IpConfiguration config)
public boolean isAvailable()
public void addListener(EthernetManager.Listener listener)
listener
- A EthernetManager.Listener
to add.IllegalArgumentException
- If the listener is null.public void removeListener(EthernetManager.Listener listener)
listener
- A EthernetManager.Listener
to remove.IllegalArgumentException
- If the listener is null.