o

org.apache.pekko.io

UdpMessage

object UdpMessage

Java API: factory methods for the message types used when communicating with the Udp service.

Source
Udp.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UdpMessage
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bind(handler: ActorRef, endpoint: InetSocketAddress): Command

    Bind without specifying options.

  6. 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.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. 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.

  15. 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.

  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. def resumeReading: Command

    This message must be sent to the listener actor to re-enable reading from the socket after a Udp.SuspendReading command.

  19. def send(payload: ByteString, target: InetSocketAddress): Command

    The same as send(payload, target, noAck()).

  20. 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.

  21. def simpleSender: Command

    Retrieve a simple sender without specifying options.

  22. 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.

  23. 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.

  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. 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.

  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped