Class

net.liftweb.actor

MockLiftActor

Related Doc: package actor

Permalink

class MockLiftActor extends MockSpecializedLiftActor[Any] with LiftActor

A MockLiftActor for use in testing other compnents that talk to actors.

Much like MockSpecializedLiftActor, this class is intended to be injected into other components, such as snippets, during testing. Whereas these components would normally talk to a real actor that would process their message, this mock actor simply records them and exposes methods the unit test can use to investigate what messages have been received by the actor.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MockLiftActor
  2. LiftActor
  3. ForwardableActor
  4. GenericActor
  5. TypedActor
  6. MockSpecializedLiftActor
  7. SpecializedLiftActor
  8. SimpleActor
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MockLiftActor()

    Permalink

Value Members

  1. def !(msg: Any): Unit

    Permalink

    Send a message to the mock actor, which will be recorded and not processed by the message handler.

    Send a message to the mock actor, which will be recorded and not processed by the message handler.

    Definition Classes
    MockSpecializedLiftActorSpecializedLiftActorSimpleActor
  2. def !!(msg: Any): Box[Any]

    Permalink

    Send a message to the Actor and wait for the actor to process the message and reply.

    Send a message to the Actor and wait for the actor to process the message and reply.

    Definition Classes
    LiftActorTypedActor
  3. def !!(msg: Any, timeout: Long): Box[Any]

    Permalink

    Send a message to the Actor and wait for up to timeout milliseconds for the actor to process the message and reply.

    Send a message to the Actor and wait for up to timeout milliseconds for the actor to process the message and reply.

    Definition Classes
    LiftActorTypedActor
  4. def !<(msg: Any): LAFuture[Any]

    Permalink

    Send a message to the Actor and get an LAFuture that will contain the reply (if any) from the message

    Send a message to the Actor and get an LAFuture that will contain the reply (if any) from the message

    Definition Classes
    LiftActor
  5. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def !?(timeout: Long, message: Any): Box[Any]

    Permalink

    Send a message to the Actor and wait for up to timeout milliseconds for the actor to process the message and reply.

    Send a message to the Actor and wait for up to timeout milliseconds for the actor to process the message and reply.

    Definition Classes
    LiftActorTypedActor
  7. def !?(msg: Any): Any

    Permalink

    Send a message to the Actor and wait for the actor to process the message and reply.

    Send a message to the Actor and wait for the actor to process the message and reply.

    Definition Classes
    LiftActorTypedActor
  8. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  9. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def around[R](f: ⇒ R): R

    Permalink

    You can wrap calls around the evaluation of the mailbox.

    You can wrap calls around the evaluation of the mailbox. This allows you to set up the environment.

    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  11. def aroundLoans: List[CommonLoanWrapper]

    Permalink

    A list of LoanWrappers that will be executed around the evaluation of mailboxes

    A list of LoanWrappers that will be executed around the evaluation of mailboxes

    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def exceptionHandler: PartialFunction[Throwable, Unit]

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  17. def execTranslate(f: (Any) ⇒ Unit)(v: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LiftActorSpecializedLiftActor
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def forwardMessageTo(msg: Any, forwardTo: TypedActor[Any, Any]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LiftActorForwardableActor
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hasReceivedMessage_?(msg: Any): Boolean

    Permalink

    Test to see if this actor has received a particular message.

    Test to see if this actor has received a particular message.

    Definition Classes
    MockSpecializedLiftActor
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. def highPriorityReceive: Box[PartialFunction[Any, Unit]]

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  24. def insertMsgAtHeadOfQueue_!(msg: Any): Unit

    Permalink

    This method inserts the message at the head of the mailbox.

    This method inserts the message at the head of the mailbox. It's protected because this functionality may or may not want to be exposed.

    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def messageCount: Int

    Permalink

    Return the number of messages this mock actor has received.

    Return the number of messages this mock actor has received.

    Definition Classes
    MockSpecializedLiftActor
  27. def messageHandler: PartialFunction[Any, Unit]

    Permalink
  28. def messages: List[Any]

    Permalink

    Returns the list of messages the mock actor has received.

    Returns the list of messages the mock actor has received.

    Definition Classes
    MockSpecializedLiftActor
  29. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. def reply(v: Any): Unit

    Permalink

    The Actor should call this method with a reply to the message

    The Actor should call this method with a reply to the message

    Attributes
    protected
    Definition Classes
    LiftActorForwardableActor
  33. def send(msg: Any): Unit

    Permalink

    Send a message to the Actor.

    Send a message to the Actor. This call will always succeed and return almost immediately. The message will be processed asynchronously. This is a Java-callable alias for !.

    Definition Classes
    SpecializedLiftActor
  34. def sendAndGetFuture(msg: Any): LAFuture[Any]

    Permalink

    Send a message to the Actor and get an LAFuture that will contain the reply (if any) from the message.

    Send a message to the Actor and get an LAFuture that will contain the reply (if any) from the message. This method calls !< and is here for Java compatibility.

    Definition Classes
    LiftActor
  35. def sendAndGetReply(timeout: Long, msg: Any): Any

    Permalink

    Send a message to the Actor and wait for up to timeout milliseconds for the actor to process the message and reply.

    Send a message to the Actor and wait for up to timeout milliseconds for the actor to process the message and reply. This method is the Java callable version of !?.

    Definition Classes
    LiftActor
  36. def sendAndGetReply(msg: Any): Any

    Permalink

    Send a message to the Actor and wait for the actor to process the message and reply.

    Send a message to the Actor and wait for the actor to process the message and reply. This method is the Java callable version of !?.

    Definition Classes
    LiftActor
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def testTranslate(f: (Any) ⇒ Boolean)(v: Any): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    LiftActorSpecializedLiftActor
  39. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LiftActor

Inherited from ForwardableActor[Any, Any]

Inherited from GenericActor[Any]

Inherited from TypedActor[Any, Any]

Inherited from MockSpecializedLiftActor[Any]

Inherited from SpecializedLiftActor[Any]

Inherited from SimpleActor[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped