scala.actors

Channel

class Channel[Msg] extends InputChannel[Msg] with OutputChannel[Msg] with CanReply[Msg, Any]

Provides a means for typed communication among actors. Only the actor creating an instance of a Channel may receive from it.

Annotations
@deprecated
Deprecated

(Since version 2.11.0) Use the akka.actor package instead. For migration from the scala.actors package refer to the Actors Migration Guide.

Linear Supertypes
CanReply[Msg, Any], OutputChannel[Msg], InputChannel[Msg], AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Channel
  2. CanReply
  3. OutputChannel
  4. InputChannel
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Channel()

  2. new Channel(receiver: InternalActor)

Type Members

  1. type Future[+P] = actors.Future[P]

    Definition Classes
    ChannelCanReply

Value Members

  1. def !(msg: Msg): Unit

    Sends msg to this channel (asynchronous).

    Sends msg to this channel (asynchronous).

    msg

    the message to send

    Definition Classes
    ChannelOutputChannel
  2. def !!(msg: Msg): Future[Any]

    Sends msg to this channel and immediately returns a future representing the reply value.

    Sends msg to this channel and immediately returns a future representing the reply value.

    msg

    the message to be sent

    returns

    the future

    Definition Classes
    ChannelCanReply
  3. def !![A](msg: Msg, handler: PartialFunction[Any, A]): Future[A]

    Sends msg to this channel and immediately returns a future representing the reply value.

    Sends msg to this channel and immediately returns a future representing the reply value. The reply is post-processed using the partial function handler. This also allows to recover a more precise type for the reply value.

    msg

    the message to be sent

    handler

    the function to be applied to the response

    returns

    the future

    Definition Classes
    ChannelCanReply
  4. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  5. def !?(msec: Long, msg: Msg): Option[Any]

    Sends msg to this channel and awaits reply (synchronous) within msec milliseconds.

    Sends msg to this channel and awaits reply (synchronous) within msec milliseconds.

    msec

    the time span before timeout

    msg

    the message to be sent

    returns

    None in case of timeout, otherwise Some(x) where x is the reply

    Definition Classes
    ChannelCanReply
  6. def !?(msg: Msg): Any

    Sends msg to this channel and awaits reply (synchronous).

    Sends msg to this channel and awaits reply (synchronous).

    msg

    the message to be sent

    returns

    the reply

    Definition Classes
    ChannelCanReply
  7. final def ##(): Int

    Definition Classes
    AnyRef → Any
  8. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to any2stringadd[Channel[Msg]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  9. def ->[B](y: B): (Channel[Msg], B)

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to ArrowAssoc[Channel[Msg]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  10. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def ?: Msg

    Receives the next message from this channel.

    Receives the next message from this channel.

    Definition Classes
    ChannelInputChannel
  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def ensuring(cond: (Channel[Msg]) ⇒ Boolean, msg: ⇒ Any): Channel[Msg]

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to Ensuring[Channel[Msg]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (Channel[Msg]) ⇒ Boolean): Channel[Msg]

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to Ensuring[Channel[Msg]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): Channel[Msg]

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to Ensuring[Channel[Msg]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): Channel[Msg]

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to Ensuring[Channel[Msg]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to StringFormat[Channel[Msg]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  22. def forward(msg: Msg): Unit

    Forwards msg to this channel (asynchronous).

    Forwards msg to this channel (asynchronous).

    msg

    the message to forward

    Definition Classes
    ChannelOutputChannel
  23. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int

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

    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def react(f: PartialFunction[Msg, Unit]): Nothing

    Receives a message from this channel.

    Receives a message from this channel.

    This method never returns. Therefore, the rest of the computation has to be contained in the actions of the partial function.

    f

    a partial function with message patterns and actions

    Definition Classes
    ChannelInputChannel
  30. def reactWithin(msec: Long)(f: PartialFunction[Any, Unit]): Nothing

    Receives a message from this channel within a certain time span.

    Receives a message from this channel within a certain time span.

    This method never returns. Therefore, the rest of the computation has to be contained in the actions of the partial function.

    msec

    the time span before timeout

    f

    a partial function with message patterns and actions

    Definition Classes
    ChannelInputChannel
  31. def receive[R](f: PartialFunction[Msg, R]): R

    Receives a message from this channel.

    Receives a message from this channel.

    f

    a partial function with message patterns and actions

    returns

    result of processing the received value

    Definition Classes
    ChannelInputChannel
  32. def receiveWithin[R](msec: Long)(f: PartialFunction[Any, R]): R

    Receives a message from this channel within a certain time span.

    Receives a message from this channel within a certain time span.

    msec

    the time span before timeout

    f

    a partial function with message patterns and actions

    returns

    result of processing the received value

    Definition Classes
    ChannelInputChannel
  33. val receiver: InternalActor

    Returns the Actor that is receiving from this channel.

    Returns the Actor that is receiving from this channel.

    Definition Classes
    ChannelOutputChannel
  34. def send(msg: Msg, replyTo: OutputChannel[Any]): Unit

    Sends msg to this channel (asynchronous) supplying explicit reply destination.

    Sends msg to this channel (asynchronous) supplying explicit reply destination.

    msg

    the message to send

    replyTo

    the reply destination

    Definition Classes
    ChannelOutputChannel
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  36. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def [B](y: B): (Channel[Msg], B)

    Implicit information
    This member is added by an implicit conversion from Channel[Msg] to ArrowAssoc[Channel[Msg]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc