Package org.apache.pekko.io
Class UdpConnected
java.lang.Object
org.apache.pekko.io.UdpConnected
UDP Extension for Akka’s IO layer.
This extension implements the connectionless UDP protocol with
calling connect
on the underlying sockets, i.e. with restricting
from whom data can be received. For “unconnected” UDP mode see Udp
.
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 UdpConnectedMessage
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
The common type of all commands supported by the UDP implementation.static final class
When a command fails it will be replied to with this message type, wrapping the failing command object.static class
static final class
Send this message to theUdpExt.manager()
in order to bind to a local port (optionally with the chosenlocalAddress
) and create a UDP socket which is restricted to sending to and receiving from the givenremoteAddress
.static class
static interface
This message is sent by the connection actor to the actor which sent theUdpConnected.Connect
message when the UDP socket has been bound to the local and remote addresses given.static class
static class
Send this message to a connection actor (which had previously sent theUdpConnected.Connected
message) in order to close the socket.static interface
This message is sent by the connection actor to the actor which sent theDisconnect
message when the UDP socket has been closed.static class
static interface
The common type of all events emitted by the UDP implementation.static interface
The common interface forUdpConnected.Command
andUdpConnected.Event
.static class
EachUdpConnected.Send
can optionally request a positive acknowledgment to be sent to the commanding actor.static class
DefaultUdpConnected.NoAck
instance which is used when no acknowledgment information is explicitly provided.static final class
When a connection actor receives a datagram from its socket it will send it to the handler designated in theUdp.Bind
message using this message type.static class
static class
This message must be sent to the listener actor to re-enable reading from the socket after aSuspendReading
command.static final class
This message is understood by the connection actors to send data to their designated destination.static class
static class
Send this message to a listener actor (which sent aUdp.Bound
message) to have it stop reading datagrams from the network. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic T
apply
(ActorSystem system) static T
apply
(ClassicActorSystemProvider system) static UdpConnectedExt
createExtension
(ExtendedActorSystem system) static final boolean
static UdpConnectedExt
get
(ActorSystem system) Java API: retrieve the UdpConnected extension for the given system.static UdpConnectedExt
get
(ClassicActorSystemProvider system) static final int
hashCode()
static UdpConnected$
lookup()
-
Constructor Details
-
UdpConnected
public UdpConnected()
-
-
Method Details
-
lookup
-
createExtension
-
get
Java API: retrieve the UdpConnected extension for the given system. -
get
-
apply
-
apply
-
hashCode
public static final int hashCode() -
equals
-