Class UDPReceiver

java.lang.Object
services.moleculer.transporter.tcp.UDPReceiver
Direct Known Subclasses:
UDPBroadcastReceiver, UDPMulticastReceiver

public abstract class UDPReceiver extends Object
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
    • namespace

      protected final String namespace
      Current namespace
    • debug

      protected final boolean debug
      Debug mode
    • useHostname

      protected final boolean useHostname
      Use hostnames instead of IP addresses As the DHCP environment is dynamic, any later attempt to use IPs instead hostnames would most likely yield false results. Therefore, use hostnames if you are using DHCP.
    • nodeID

      protected final String nodeID
      Current NodeID
    • udpAddress

      protected final String udpAddress
      IP address
    • udpReuseAddr

      protected final boolean udpReuseAddr
      Resuse addresses
    • udpPort

      protected final int udpPort
      UDP broadcast/multicast port
    • udpMulticastTTL

      protected final int udpMulticastTTL
      UDP multicast TTL
    • port

      protected final int port
      TCP port (used by the Transporter and Gossiper services)
    • executor

      protected ExecutorService executor
      Receiver's executor
    • transporter

      protected final TcpTransporter transporter
      Parent transporter
  • Constructor Details

  • Method Details

    • connect

      protected void connect() throws Exception
      Throws:
      Exception
    • disconnect

      protected void disconnect()
    • send

      protected abstract void send()
    • receive

      protected abstract void receive()
    • processReceivedMessage

      protected void processReceivedMessage(DatagramPacket packet, byte[] buffer)