Package akka.io
Class Udp
- java.lang.Object
-
- akka.io.Udp
-
public class Udp extends java.lang.Object
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 seeUdpConnected
.For a full description of the design and philosophy behind this IO implementation please refer to the Akka online documentation.
The Java API for generating UDP commands is available at
UdpMessage
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Udp.Bind
Send 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 class
Udp.Bind$
static class
Udp.Bound
This message is sent by the listener actor in response to aUdp.Bind
command.static class
Udp.Bound$
static interface
Udp.Command
The common type of all commands supported by the UDP implementation.static class
Udp.CommandFailed
When a command fails it will be replied to with this message type, wrapping the failing command object.static class
Udp.CommandFailed$
static interface
Udp.Event
The common type of all events emitted by the UDP implementation.static interface
Udp.Message
The common interface forUdp.Command
andUdp.Event
.static class
Udp.NoAck
EachUdp.Send
can optionally request a positive acknowledgment to be sent to the commanding actor.static class
Udp.NoAck$
DefaultUdp.NoAck
instance which is used when no acknowledgment information is explicitly provided.static class
Udp.Received
When a listener 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
Udp.Received$
static class
Udp.ResumeReading$
This message must be sent to the listener actor to re-enable reading from the socket after aSuspendReading
command.static class
Udp.Send
This message is understood by the “simple sender” which can be obtained by sending theUdp.SimpleSender
query to theUdpExt.manager()
as well as by the listener actors which are created in response toUdp.Bind
.static class
Udp.Send$
static class
Udp.SimpleSender
Retrieve a reference to a “simple sender” actor of the UDP extension.static class
Udp.SimpleSender$
static interface
Udp.SimpleSenderReady
The “simple sender” sends this message type in response to aUdp.SimpleSender
query.static class
Udp.SimpleSenderReady$
static class
Udp.SO$
Scala API: This object provides access to all socket options applicable to UDP sockets.static class
Udp.SuspendReading$
Send this message to a listener actor (which sent aUdp.Bound
message) to have it stop reading datagrams from the network.static class
Udp.Unbind$
Send this message to the listener actor that previously sent aUdp.Bound
message in order to close the listening socket.static interface
Udp.Unbound
This message is sent by the listener actor in response to anUnbind
command after the socket has been closed.static class
Udp.Unbound$
-
Constructor Summary
Constructors Constructor Description Udp()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static T
apply(ActorSystem system)
static T
apply(ClassicActorSystemProvider system)
static UdpExt
createExtension(ExtendedActorSystem system)
static boolean
equals(java.lang.Object other)
static UdpExt
get(ActorSystem system)
Java API: retrieve the Udp extension for the given system.static UdpExt
get(ClassicActorSystemProvider system)
static int
hashCode()
static Udp$
lookup()
-
-
-
Method Detail
-
lookup
public static Udp$ lookup()
-
createExtension
public static UdpExt createExtension(ExtendedActorSystem system)
-
get
public static UdpExt get(ActorSystem system)
Java API: retrieve the Udp extension for the given system.
-
get
public static UdpExt get(ClassicActorSystemProvider system)
-
apply
public static T apply(ActorSystem system)
-
apply
public static T apply(ClassicActorSystemProvider system)
-
hashCode
public static final int hashCode()
-
equals
public static final boolean equals(java.lang.Object other)
-
-