diff --git a/akka-core/src/main/scala/actor/Actor.scala b/akka-core/src/main/scala/actor/Actor.scala index 11deb7166d..19d34d9af2 100644 --- a/akka-core/src/main/scala/actor/Actor.scala +++ b/akka-core/src/main/scala/actor/Actor.scala @@ -42,7 +42,7 @@ trait Transactor extends Actor { * * @author Jonas Bonér */ -bstract class RemoteActor(hostname: String, port: Int) extends Actor { +abstract class RemoteActor(hostname: String, port: Int) extends Actor { makeRemote(hostname, port) } @@ -161,7 +161,7 @@ object Actor extends Logging { case object Spawn new Actor() { start - send(Spawn) + this ! Spawn def receive = { case Spawn => body; stop } @@ -466,7 +466,7 @@ trait Actor extends TransactionManagement with Logging { _remoteAddress.foreach(address => RemoteClient.unregister(address.getHostName, address.getPort, uuid)) } } - +$ def isRunning = _isRunning /** @@ -476,27 +476,12 @@ trait Actor extends TransactionManagement with Logging { * If invoked from within an actor then the actor reference is implicitly passed on as the implicit 'sender' argument. *

* - * This actor 'sender' reference is then available in the receiving actor in the 'sender' member variable. + * This actor 'sender' reference is then available in the receiving actor in the 'sender' member variable, + * if invoked from within an Actor. If not then no sender is available. *

    *   actor ! message
    * 
*

- * - * If invoked from within a *non* Actor instance then either add this import to resolve the implicit argument: - *

-   *   import Actor.Sender.Self
-   *   actor ! message
-   * 
- * - * Or pass in the implicit argument explicitly: - *
-   *   actor.!(message)(Some(this))
-   * 
- * - * Or use the 'send(..)' method; - *
-   *   actor.send(message)
-   * 
*/ def !(message: Any)(implicit sender: Option[Actor] = None) = { if (_isKilled) throw new ActorKilledException("Actor [" + toString + "] has been killed, can't respond to messages") @@ -504,11 +489,6 @@ trait Actor extends TransactionManagement with Logging { else throw new IllegalStateException("Actor has not been started, you need to invoke 'actor.start' before using it") } - /** - * Same as the '!' method but does not take an implicit sender as second parameter. - */ - def send(message: Any) = this.!(message)(None) - /** * Sends a message asynchronously and waits on a future for a reply message. *

diff --git a/project/build/AkkaProject.scala b/project/build/AkkaProject.scala index 09360d27e1..714b669c28 100644 --- a/project/build/AkkaProject.scala +++ b/project/build/AkkaProject.scala @@ -444,6 +444,7 @@ class AkkaParent(info: ProjectInfo) extends AkkaDefaults(info) { class AkkaSampleSecurityProject(info: ProjectInfo) extends AkkaDefaults(info) { val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1.1" % "compile" val jsr250 = "javax.annotation" % "jsr250-api" % "1.0" + val commons_codec = "commons-codec" % "commons-codec" % "1.3" % "compile" lazy val dist = deployTask(info, deployPath) dependsOn(`package`, packageDocs, packageSrc) describedAs("Deploying") }