object UdpMessage
Java API: factory methods for the message types used when communicating with the Udp service.
- Source
- Udp.scala
- Alphabetic
- By Inheritance
- UdpMessage
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bind(handler: ActorRef, endpoint: InetSocketAddress): Command
Bind without specifying options.
- def bind(handler: ActorRef, endpoint: InetSocketAddress, options: Iterable[SocketOption]): Command
Send this message to the UdpExt#manager in order to bind to the given local port (or an automatically assigned one if the port number is zero).
Send this message to the UdpExt#manager in order to bind to the given local port (or an automatically assigned one if the port number is zero). The listener actor for the newly bound port will reply with a Udp.Bound message, or the manager will reply with a Udp.CommandFailed message.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noAck: NoAck
Default Udp.NoAck instance which is used when no acknowledgment information is explicitly provided.
Default Udp.NoAck instance which is used when no acknowledgment information is explicitly provided. Its “token” is
null
. - def noAck(token: AnyRef): NoAck
Each Udp.Send can optionally request a positive acknowledgment to be sent to the commanding actor.
Each Udp.Send can optionally request a positive acknowledgment to be sent to the commanding actor. If such notification is not desired the Udp.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 a Udp.CommandFailed message.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def resumeReading: Command
This message must be sent to the listener actor to re-enable reading from the socket after a
Udp.SuspendReading
command. - def send(payload: ByteString, target: InetSocketAddress): Command
The same as
send(payload, target, noAck())
. - def send(payload: ByteString, target: InetSocketAddress, ack: Event): Command
This message is understood by the “simple sender” which can be obtained by sending the Udp.SimpleSender query to the UdpExt#manager as well as by the listener actors which are created in response to Udp.Bind.
This message is understood by the “simple sender” which can be obtained by sending the Udp.SimpleSender query to the UdpExt#manager as well as by the listener actors which are created in response to Udp.Bind. It will send the given payload data as one UDP datagram to the given target address. The UDP actor will respond with Udp.CommandFailed if the send could not be enqueued to the O/S kernel because the send buffer was full. If the given
ack
is not of type Udp.NoAck the UDP actor will reply with the given object as soon as the datagram has been successfully enqueued to the O/S kernel.The sending UDP socket’s address belongs to the “simple sender” which does not handle inbound datagrams and sends from an ephemeral port; therefore sending using this mechanism is not suitable if replies are expected, use Udp.Bind in that case.
- def simpleSender: Command
Retrieve a simple sender without specifying options.
- def simpleSender(options: Iterable[SocketOption]): Command
Retrieve a reference to a “simple sender” actor of the UDP extension.
Retrieve a reference to a “simple sender” actor of the UDP extension. The newly created “simple sender” will reply with the Udp.SimpleSenderReady notification.
The “simple sender” is a convenient service for being able to send datagrams when the originating address is meaningless, i.e. when no reply is expected.
The “simple sender” will not stop itself, you will have to send it a pekko.actor.PoisonPill when you want to close the socket.
- def suspendReading: Command
Send this message to a listener actor (which sent a Udp.Bound message) to have it stop reading datagrams from the network.
Send this message to a listener actor (which sent a Udp.Bound message) 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 the
Udp.ResumeReading
command. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unbind: Command
Send this message to the listener actor that previously sent a Udp.Bound message in order to close the listening socket.
Send this message to the listener actor that previously sent a Udp.Bound message in order to close the listening socket. The recipient will reply with an Udp.Unbound message.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])