public class ZBeacon extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ZBeacon.Builder |
static interface |
ZBeacon.Listener
All beacons with matching prefix are passed to a listener.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BROADCAST_HOST |
static long |
DEFAULT_BROADCAST_INTERVAL |
| Constructor and Description |
|---|
ZBeacon(int port,
byte[] beacon) |
ZBeacon(String broadcastAddress,
byte[] serverAddress,
int port,
byte[] beacon,
long broadcastInterval,
boolean ignoreLocalAddress,
boolean blocking) |
ZBeacon(String host,
int port,
byte[] beacon) |
ZBeacon(String host,
int port,
byte[] beacon,
boolean ignoreLocalAddress) |
ZBeacon(String host,
int port,
byte[] beacon,
boolean ignoreLocalAddress,
boolean blocking) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBeacon() |
long |
getBroadcastInterval() |
ZBeacon.Listener |
getListener() |
byte[] |
getPrefix() |
void |
setBeacon(byte[] beacon) |
void |
setBroadcastInterval(long broadcastInterval) |
void |
setListener(ZBeacon.Listener listener) |
void |
setPrefix(byte[] prefix) |
void |
setUncaughtExceptionHandlers(Thread.UncaughtExceptionHandler clientHandler,
Thread.UncaughtExceptionHandler serverHandler) |
void |
start() |
void |
startClient() |
void |
startServer() |
void |
stop() |
public static final long DEFAULT_BROADCAST_INTERVAL
public static final String DEFAULT_BROADCAST_HOST
public ZBeacon(int port,
byte[] beacon)
public ZBeacon(String host, int port, byte[] beacon)
public ZBeacon(String host, int port, byte[] beacon, boolean ignoreLocalAddress)
public ZBeacon(String host, int port, byte[] beacon, boolean ignoreLocalAddress, boolean blocking)
public ZBeacon(String broadcastAddress, byte[] serverAddress, int port, byte[] beacon, long broadcastInterval, boolean ignoreLocalAddress, boolean blocking)
public void setUncaughtExceptionHandlers(Thread.UncaughtExceptionHandler clientHandler, Thread.UncaughtExceptionHandler serverHandler)
public void startClient()
public void startServer()
public void start()
public void stop()
throws InterruptedException
InterruptedExceptionpublic void setBeacon(byte[] beacon)
public byte[] getBeacon()
public void setPrefix(byte[] prefix)
public byte[] getPrefix()
public void setListener(ZBeacon.Listener listener)
public ZBeacon.Listener getListener()
public long getBroadcastInterval()
public void setBroadcastInterval(long broadcastInterval)
Copyright © 2020. All rights reserved.