Package org.apache.pekko.io
Class Udp
java.lang.Object
org.apache.pekko.io.Udp
UDP Extension for Akka’s IO layer.
This extension implements the connectionless UDP protocol without
calling connect on the underlying sockets, i.e. without restricting
from whom data can be received. For “connected” UDP mode see UdpConnected.
For a full description of the design and philosophy behind this IO implementation please refer to the Pekko online documentation.
The Java API for generating UDP commands is available at UdpMessage.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSend this message to theUdpExt.manager()in order to bind to the given local port (or an automatically assigned one if the port number is zero).static classstatic final classThis message is sent by the listener actor in response to aUdp.Bindcommand.static classstatic interfaceThe common type of all commands supported by the UDP implementation.static final classWhen a command fails it will be replied to with this message type, wrapping the failing command object.static classstatic interfaceThe common type of all events emitted by the UDP implementation.static interfaceThe common interface forUdp.CommandandUdp.Event.static classEachUdp.Sendcan optionally request a positive acknowledgment to be sent to the commanding actor.static classDefaultUdp.NoAckinstance which is used when no acknowledgment information is explicitly provided.static final classWhen a listener actor receives a datagram from its socket it will send it to the handler designated in theUdp.Bindmessage using this message type.static classstatic classThis message must be sent to the listener actor to re-enable reading from the socket after aSuspendReadingcommand.static final classThis message is understood by the “simple sender” which can be obtained by sending theUdp.SimpleSenderquery to theUdpExt.manager()as well as by the listener actors which are created in response toUdp.Bind.static classstatic classRetrieve a reference to a “simple sender” actor of the UDP extension.static classstatic interfaceThe “simple sender” sends this message type in response to aUdp.SimpleSenderquery.static classstatic classScala API: This object provides access to all socket options applicable to UDP sockets.static classSend this message to a listener actor (which sent aUdp.Boundmessage) to have it stop reading datagrams from the network.static classSend this message to the listener actor that previously sent aUdp.Boundmessage in order to close the listening socket.static interfaceThis message is sent by the listener actor in response to anUnbindcommand after the socket has been closed.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tapply(ActorSystem system) static Tapply(ClassicActorSystemProvider system) static UdpExtcreateExtension(ExtendedActorSystem system) static final booleanstatic UdpExtget(ActorSystem system) Java API: retrieve the Udp extension for the given system.static UdpExtget(ClassicActorSystemProvider system) static final inthashCode()static Udp$lookup()
-
Constructor Details
-
Udp
public Udp()
-
-
Method Details
-
lookup
-
createExtension
-
get
Java API: retrieve the Udp extension for the given system. -
get
-
apply
-
apply
-
hashCode
public static final int hashCode() -
equals
-