LowpanManager

public class LowpanManager
extends Object

java.lang.Object
   ↳ com.google.android.things.lowpan.LowpanManager


Manager object for looking up LoWPAN interfaces.

See also:

Summary

Nested classes

class LowpanManager.Callback

Callback base class for LowpanManager

Public methods

static LowpanManager getInstance()

Gets an instance of LowpanManager.

LowpanInterface getInterface()

Gets default LowpanInterface.

LowpanInterface getInterface(String name)

Returns a reference to the requested LowpanInterface object.

String[] getInterfaceList()

Returns a string array containing the names of LoWPAN interfaces.

void registerCallback(LowpanManager.Callback cb)
void registerCallback(Handler handler, LowpanManager.Callback cb)

Registers a callback object to receive notifications when LoWPAN interfaces are added or removed.

void unregisterCallback(LowpanManager.Callback cb)

Unregisters a previously registered LowpanManager.Callback object.

Inherited methods

From class java.lang.Object

Public methods

getInstance

LowpanManager getInstance ()

Gets an instance of LowpanManager.

Returns
LowpanManager An instance of the LowpanManager object, or null if this device does not support this feature.

getInterface

LowpanInterface getInterface ()

Gets default LowpanInterface.

Returns
LowpanInterface a reference to the first registered LowpanInterface object. If there are no LoWPAN interfaces registered, returns null.

getInterface

LowpanInterface getInterface (String name)

Returns a reference to the requested LowpanInterface object. If the given interface doesn't exist, or it is not a LoWPAN interface, returns null.

Parameters
name String

Returns
LowpanInterface

getInterfaceList

String[] getInterfaceList ()

Returns a string array containing the names of LoWPAN interfaces. This list may contain fewer interfaces if the calling process does not have permissions to see individual interfaces.

Returns
String[]

registerCallback

void registerCallback (LowpanManager.Callback cb)

Parameters
cb LowpanManager.Callback

Throws
LowpanException

registerCallback

void registerCallback (Handler handler, 
                LowpanManager.Callback cb)

Registers a callback object to receive notifications when LoWPAN interfaces are added or removed.

Parameters
handler Handler

cb LowpanManager.Callback

Throws
LowpanException

unregisterCallback

void unregisterCallback (LowpanManager.Callback cb)

Unregisters a previously registered LowpanManager.Callback object.

Parameters
cb LowpanManager.Callback