Class UDPReceiver
java.lang.Object
services.moleculer.transporter.tcp.UDPReceiver
- Direct Known Subclasses:
UDPBroadcastReceiver, UDPMulticastReceiver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanDebug modeprotected ExecutorServiceReceiver's executorprotected static final org.slf4j.Loggerprotected final StringCurrent namespaceprotected final StringCurrent NodeIDprotected final intTCP port (used by the Transporter and Gossiper services)protected final TcpTransporterParent transporterprotected final StringIP addressprotected final intUDP multicast TTLprotected final intUDP broadcast/multicast portprotected final booleanResuse addressesprotected final booleanUse 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. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUDPReceiver(String nodeID, String udpAddress, TcpTransporter transporter) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconnect()protected voidprotected voidprocessReceivedMessage(DatagramPacket packet, byte[] buffer) protected abstract voidreceive()protected abstract voidsend()
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
namespace
Current namespace -
debug
protected final boolean debugDebug mode -
useHostname
protected final boolean useHostnameUse 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
Current NodeID -
udpAddress
IP address -
udpReuseAddr
protected final boolean udpReuseAddrResuse addresses -
udpPort
protected final int udpPortUDP broadcast/multicast port -
udpMulticastTTL
protected final int udpMulticastTTLUDP multicast TTL -
port
protected final int portTCP port (used by the Transporter and Gossiper services) -
executor
Receiver's executor -
transporter
Parent transporter
-
-
Constructor Details
-
UDPReceiver
-
-
Method Details
-
connect
-
disconnect
protected void disconnect() -
send
protected abstract void send() -
receive
protected abstract void receive() -
processReceivedMessage
-