Package akka.io
Class Udp
- java.lang.Object
-
- akka.io.Udp
-
public class Udp extends java.lang.ObjectUDP Extension for Akka’s IO layer.This extension implements the connectionless UDP protocol without calling
connecton 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 classUdp.BindSend 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 classUdp.Bind$static classUdp.BoundThis message is sent by the listener actor in response to aUdp.Bindcommand.static classUdp.Bound$static interfaceUdp.CommandThe common type of all commands supported by the UDP implementation.static classUdp.CommandFailedWhen a command fails it will be replied to with this message type, wrapping the failing command object.static classUdp.CommandFailed$static interfaceUdp.EventThe common type of all events emitted by the UDP implementation.static interfaceUdp.MessageThe common interface forUdp.CommandandUdp.Event.static classUdp.NoAckEachUdp.Sendcan optionally request a positive acknowledgment to be sent to the commanding actor.static classUdp.NoAck$DefaultUdp.NoAckinstance which is used when no acknowledgment information is explicitly provided.static classUdp.ReceivedWhen 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 classUdp.Received$static classUdp.ResumeReading$This message must be sent to the listener actor to re-enable reading from the socket after aSuspendReadingcommand.static classUdp.SendThis 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 classUdp.Send$static classUdp.SimpleSenderRetrieve a reference to a “simple sender” actor of the UDP extension.static classUdp.SimpleSender$static interfaceUdp.SimpleSenderReadyThe “simple sender” sends this message type in response to aUdp.SimpleSenderquery.static classUdp.SimpleSenderReady$static classUdp.SO$Scala API: This object provides access to all socket options applicable to UDP sockets.static classUdp.SuspendReading$Send this message to a listener actor (which sent aUdp.Boundmessage) to have it stop reading datagrams from the network.static classUdp.Unbind$Send this message to the listener actor that previously sent aUdp.Boundmessage in order to close the listening socket.static interfaceUdp.UnboundThis message is sent by the listener actor in response to anUnbindcommand after the socket has been closed.static classUdp.Unbound$
-
Constructor Summary
Constructors Constructor Description Udp()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Tapply(ActorSystem system)static Tapply(ClassicActorSystemProvider system)static UdpExtcreateExtension(ExtendedActorSystem system)static booleanequals(java.lang.Object other)static UdpExtget(ActorSystem system)Java API: retrieve the Udp extension for the given system.static UdpExtget(ClassicActorSystemProvider system)static inthashCode()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)
-
-