Package org.apache.pekko.io
Class UdpConnectedMessage$
java.lang.Object
org.apache.pekko.io.UdpConnectedMessage$
Java API: factory methods for the message types used when communicating with the UdpConnected service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UdpConnectedMessage$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnect(ActorRef handler, InetSocketAddress remoteAddress) Connect without specifying thelocalAddressoroptions.connect(ActorRef handler, InetSocketAddress remoteAddress, Iterable<Inet.SocketOption> options) Connect without specifying thelocalAddress.connect(ActorRef handler, InetSocketAddress remoteAddress, InetSocketAddress localAddress, Iterable<Inet.SocketOption> options) 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.Send this message to a connection actor (which had previously sent theUdpConnected.Connectedmessage) in order to close the socket.noAck()DefaultUdpConnected.NoAckinstance which is used when no acknowledgment information is explicitly provided.EachUdpConnected.Sendcan optionally request a positive acknowledgment to be sent to the commanding actor.This message must be sent to the listener actor to re-enable reading from the socket after aUdpConnected.SuspendReadingcommand.send(ByteString data) Send without requesting acknowledgment.send(ByteString data, Object ack) This message is understood by the connection actors to send data to their designated destination.Send this message to a listener actor (which sent aUdp.Boundmessage) to have it stop reading datagrams from the network.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
UdpConnectedMessage$
public UdpConnectedMessage$()
-
-
Method Details
-
connect
public UdpConnected.Command connect(ActorRef handler, InetSocketAddress remoteAddress, InetSocketAddress localAddress, Iterable<Inet.SocketOption> options) 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. All received datagrams will be sent to the designatedhandleractor. -
connect
public UdpConnected.Command connect(ActorRef handler, InetSocketAddress remoteAddress, Iterable<Inet.SocketOption> options) Connect without specifying thelocalAddress. -
connect
Connect without specifying thelocalAddressoroptions. -
send
This message is understood by the connection actors to send data to their designated destination. The connection actor will respond withUdpConnected.CommandFailedif the send could not be enqueued to the O/S kernel because the send buffer was full. If the givenackis not of typeUdpConnected.NoAckthe connection actor will reply with the given object as soon as the datagram has been successfully enqueued to the O/S kernel. -
send
Send without requesting acknowledgment. -
disconnect
Send this message to a connection actor (which had previously sent theUdpConnected.Connectedmessage) in order to close the socket. The connection actor will reply with aUdpConnected.Disconnectedmessage. -
noAck
EachUdpConnected.Sendcan optionally request a positive acknowledgment to be sent to the commanding actor. If such notification is not desired theUdpConnected.Send.ack()must be set to an instance of this class. The token contained within can be used to recognize which write failed when receiving aUdpConnected.CommandFailedmessage. -
noAck
DefaultUdpConnected.NoAckinstance which is used when no acknowledgment information is explicitly provided. Its “token” isnull. -
suspendReading
Send this message to a listener actor (which sent aUdp.Boundmessage) to have it stop reading datagrams from the network. If the O/S kernel’s receive buffer runs full then subsequent datagrams will be silently discarded. Re-enable reading from the socket using theUdpConnected.ResumeReadingcommand. -
resumeReading
This message must be sent to the listener actor to re-enable reading from the socket after aUdpConnected.SuspendReadingcommand.
-