Package org.zeromq

Class ZBeacon

java.lang.Object
org.zeromq.ZBeacon

public class ZBeacon extends Object
This class implements a peer-to-peer discovery service for local networks. A beacon can broadcast and/or capture service announcements using UDP messages on the local area network. This implementation uses IPv4 UDP broadcasts. You can define the format of your outgoing beacons, and set a filter that validates incoming beacons. Beacons are sent and received asynchronously in the background.
  • Field Details

  • Constructor Details

    • ZBeacon

      public ZBeacon(int port, byte[] beacon)
    • ZBeacon

      public ZBeacon(String host, int port, byte[] beacon)
    • ZBeacon

      public ZBeacon(String host, int port, byte[] beacon, boolean ignoreLocalAddress)
    • ZBeacon

      public ZBeacon(String host, int port, byte[] beacon, boolean ignoreLocalAddress, boolean blocking)
    • ZBeacon

      public ZBeacon(InetAddress broadcastAddress, InetAddress serverAddress, int port, byte[] beacon, long broadcastInterval, boolean ignoreLocalAddress, boolean blocking)
    • ZBeacon

      @Deprecated public ZBeacon(String broadcastAddress, byte[] serverAddress, int port, byte[] beacon, long broadcastInterval, boolean ignoreLocalAddress, boolean blocking)
      Deprecated.
  • Method Details

    • setUncaughtExceptionHandlers

      @Deprecated public void setUncaughtExceptionHandlers(Thread.UncaughtExceptionHandler clientExHandler, Thread.UncaughtExceptionHandler serverExHandler)
      Deprecated.
      use the builder
      Parameters:
      clientExHandler -
      serverExHandler -
    • startClient

      public void startClient()
    • startServer

      public void startServer()
    • start

      public void start()
    • stop

      public void stop() throws InterruptedException
      Throws:
      InterruptedException
    • setBeacon

      @Deprecated public void setBeacon(byte[] beacon)
      Deprecated.
      use the builder
      Parameters:
      beacon -
    • getBeacon

      public byte[] getBeacon()
    • setPrefix

      @Deprecated public void setPrefix(byte[] prefix)
      Deprecated.
      use the builder
      Parameters:
      prefix -
    • getPrefix

      public byte[] getPrefix()
    • setListener

      @Deprecated public void setListener(ZBeacon.Listener listener)
      Deprecated.
      use the builder
      Parameters:
      listener -
    • getListener

      public ZBeacon.Listener getListener()
    • getBroadcastInterval

      public long getBroadcastInterval()
    • setBroadcastInterval

      public void setBroadcastInterval(long broadcastInterval)