o

akka.io

UdpConnected

object UdpConnected extends ExtensionId[UdpConnectedExt] with ExtensionIdProvider

UDP Extension for Akka’s IO layer.

This extension implements the connectionless UDP protocol with calling connect on the underlying sockets, i.e. with restricting from whom data can be received. For “unconnected” UDP mode see Udp.

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

Annotations
@ccompatUsedUntil213()
Source
UdpConnected.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UdpConnected
  2. ExtensionIdProvider
  3. ExtensionId
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait Command extends HasFailureMessage with Message

    The common type of all commands supported by the UDP implementation.

  2. final case class CommandFailed(cmd: Command) extends Event with Product with Serializable

    When a command fails it will be replied to with this message type, wrapping the failing command object.

  3. final case class Connect(handler: ActorRef, remoteAddress: InetSocketAddress, localAddress: Option[InetSocketAddress] = None, options: Traversable[SocketOption] = Nil) extends Command with Product with Serializable

    Send this message to the UdpExt#manager in order to bind to a local port (optionally with the chosen localAddress) and create a UDP socket which is restricted to sending to and receiving from the given remoteAddress.

    Send this message to the UdpExt#manager in order to bind to a local port (optionally with the chosen localAddress) and create a UDP socket which is restricted to sending to and receiving from the given remoteAddress. All received datagrams will be sent to the designated handler actor.

    Annotations
    @silent()
  4. sealed trait Connected extends Event

    This message is sent by the connection actor to the actor which sent the Connect message when the UDP socket has been bound to the local and remote addresses given.

  5. sealed trait Disconnected extends Event

    This message is sent by the connection actor to the actor which sent the Disconnect message when the UDP socket has been closed.

  6. trait Event extends Message

    The common type of all events emitted by the UDP implementation.

  7. sealed trait Message extends AnyRef

    The common interface for Command and Event.

  8. case class NoAck(token: Any) extends Event with Product with Serializable

    Each Send can optionally request a positive acknowledgment to be sent to the commanding actor.

    Each Send can optionally request a positive acknowledgment to be sent to the commanding actor. If such notification is not desired the 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 CommandFailed message.

  9. final case class Received(data: ByteString) extends Event with Product with Serializable

    When a connection actor receives a datagram from its socket it will send it to the handler designated in the Udp.Bind message using this message type.

  10. final case class Send(payload: ByteString, ack: Any) extends Command with Product with Serializable

    This message is understood by the connection actors to send data to their designated destination.

    This message is understood by the connection actors to send data to their designated destination. The connection actor will respond with 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 NoAck the connection actor will reply with the given object as soon as the datagram has been successfully enqueued to the O/S kernel.

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. def apply(system: ClassicActorSystemProvider): UdpConnectedExt

    Returns an instance of the extension identified by this ExtensionId instance.

    Returns an instance of the extension identified by this ExtensionId instance.

    Definition Classes
    ExtensionId
  5. def apply(system: ActorSystem): UdpConnectedExt

    Returns an instance of the extension identified by this ExtensionId instance.

    Returns an instance of the extension identified by this ExtensionId instance.

    Definition Classes
    ExtensionId
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  8. def createExtension(system: ExtendedActorSystem): UdpConnectedExt

    Is used by Akka to instantiate the Extension identified by this ExtensionId, internal use only.

    Is used by Akka to instantiate the Extension identified by this ExtensionId, internal use only.

    Definition Classes
    UdpConnectedExtensionId
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. final def equals(other: Any): Boolean
    Definition Classes
    ExtensionId → AnyRef → Any
  11. def get(system: ClassicActorSystemProvider): UdpConnectedExt

    Returns an instance of the extension identified by this ExtensionId instance.

    Returns an instance of the extension identified by this ExtensionId instance. Java API For extensions written in Scala that are to be used from Java also, this method should be overridden to get correct return type.

    override def get(system: ClassicActorSystemProvider): TheExtension = super.get(system)
    Definition Classes
    UdpConnectedExtensionId
  12. def get(system: ActorSystem): UdpConnectedExt

    Java API: retrieve the UdpConnected extension for the given system.

    Java API: retrieve the UdpConnected extension for the given system.

    Definition Classes
    UdpConnectedExtensionId
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def hashCode(): Int
    Definition Classes
    ExtensionId → AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def lookup(): UdpConnected.type

    Returns the canonical ExtensionId for this Extension

    Returns the canonical ExtensionId for this Extension

    Definition Classes
    UdpConnectedExtensionIdProvider
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. object Connected extends Connected with Product with Serializable
  26. object Disconnect extends Command with Product with Serializable

    Send this message to a connection actor (which had previously sent the Connected message) in order to close the socket.

    Send this message to a connection actor (which had previously sent the Connected message) in order to close the socket. The connection actor will reply with a Disconnected message.

  27. object Disconnected extends Disconnected with Product with Serializable
  28. object NoAck extends NoAck

    Default NoAck instance which is used when no acknowledgment information is explicitly provided.

    Default NoAck instance which is used when no acknowledgment information is explicitly provided. Its “token” is null.

  29. object ResumeReading extends Command with Product with Serializable

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

  30. object Send extends Serializable
  31. object SuspendReading extends Command with Product with Serializable

    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 ResumeReading command.

Deprecated Value Members

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

    (Since version ) see corresponding Javadoc for more information.

Inherited from ExtensionIdProvider

Inherited from ExtensionId[UdpConnectedExt]

Inherited from AnyRef

Inherited from Any

Ungrouped