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(InetAddress broadcastAddress,
InetAddress serverAddress,
int port,
byte[] beacon,
long broadcastInterval,
boolean ignoreLocalAddress,
boolean blocking) |
ZBeacon(int port,
byte[] beacon) |
ZBeacon(String broadcastAddress,
byte[] serverAddress,
int port,
byte[] beacon,
long broadcastInterval,
boolean ignoreLocalAddress,
boolean blocking)
Deprecated.
|
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)
Deprecated.
use the builder
|
void |
setBroadcastInterval(long broadcastInterval) |
void |
setListener(ZBeacon.Listener listener)
Deprecated.
use the builder
|
void |
setPrefix(byte[] prefix)
Deprecated.
use the builder
|
void |
setUncaughtExceptionHandlers(Thread.UncaughtExceptionHandler clientExHandler,
Thread.UncaughtExceptionHandler serverExHandler)
Deprecated.
use the builder
|
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(InetAddress broadcastAddress, InetAddress serverAddress, int port, byte[] beacon, long broadcastInterval, boolean ignoreLocalAddress, boolean blocking)
@Deprecated public ZBeacon(String broadcastAddress, byte[] serverAddress, int port, byte[] beacon, long broadcastInterval, boolean ignoreLocalAddress, boolean blocking)
@Deprecated public void setUncaughtExceptionHandlers(Thread.UncaughtExceptionHandler clientExHandler, Thread.UncaughtExceptionHandler serverExHandler)
clientExHandler - serverExHandler - public void startClient()
public void startServer()
public void start()
public void stop()
throws InterruptedException
InterruptedException@Deprecated public void setBeacon(byte[] beacon)
beacon - public byte[] getBeacon()
@Deprecated public void setPrefix(byte[] prefix)
prefix - public byte[] getPrefix()
@Deprecated public void setListener(ZBeacon.Listener listener)
listener - public ZBeacon.Listener getListener()
public long getBroadcastInterval()
public void setBroadcastInterval(long broadcastInterval)
Copyright © 2022. All rights reserved.