akka.actor

IOManager

class IOManager extends Extension

IOManager contains a reference to the IOManagerActor for an ActorSystem.

This is the recommended entry point to creating sockets for performing IO.

Use the companion object to retrieve the instance of this class for an ActorSystem.

val ioManager = IOManager(context.system)
val socket = ioManager.connect("127.0.0.1")

An IOManager does not need to be manually stopped when not in use as it will automatically enter an idle state when it has no channels to manage.

Attributes
final
Linear Supertypes
Extension, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. IOManager
  2. Extension
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. val actor : ActorRef

    A reference to the IOManagerActor that performs the actual IO.

    A reference to the IOManagerActor that performs the actual IO. It communicates with other actors using subclasses of IOMessage.

  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def connect (host: String, port: Int)(implicit owner: ActorRef): SocketHandle

    Create a SocketChannel connecting to a host and port.

    Create a SocketChannel connecting to a host and port. Messages will be sent from the IOManagerActor to the owner ActorRef.

    host

    the hostname or IP to connect to

    port

    the port to connect to

    owner

    the ActorRef that will receive messages from the IOManagerActor

    returns

    a SocketHandle to uniquely identify the created socket

  10. def connect (address: SocketAddress)(implicit owner: ActorRef): SocketHandle

    Create a SocketChannel connecting to an address.

    Create a SocketChannel connecting to an address. Messages will be sent from the IOManagerActor to the owner ActorRef.

    address

    the address to connect to

    owner

    the ActorRef that will receive messages from the IOManagerActor

    returns

    a SocketHandle to uniquely identify the created socket

  11. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  12. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  15. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  16. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  17. def listen (host: String, port: Int)(implicit owner: ActorRef): ServerHandle

    Create a ServerSocketChannel listening on a host and port.

    Create a ServerSocketChannel listening on a host and port. Messages will be sent from the IOManagerActor to the owner ActorRef.

    host

    the hostname or IP to listen on

    port

    the port to listen on

    owner

    the ActorRef that will receive messages from the IOManagerActor

    returns

    a ServerHandle to uniquely identify the created socket

  18. def listen (address: SocketAddress)(implicit owner: ActorRef): ServerHandle

    Create a ServerSocketChannel listening on an address.

    Create a ServerSocketChannel listening on an address. Messages will be sent from the IOManagerActor to the owner ActorRef.

    address

    the address to listen on

    owner

    the ActorRef that will receive messages from the IOManagerActor

    returns

    a ServerHandle to uniquely identify the created socket

  19. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  20. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  21. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  22. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  23. def toString (): String

    Definition Classes
    AnyRef → Any
  24. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  26. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Extension

Inherited from AnyRef

Inherited from Any