Removed client-managed actors, a lot of deprecated methods and DataFlowVariable (superceded by Future)
This commit is contained in:
parent
46460a9616
commit
0dff50fa52
24 changed files with 53 additions and 1113 deletions
|
|
@ -151,81 +151,6 @@ abstract class RemoteSupport extends ListenerManagement with RemoteServerModule
|
|||
clear
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Client-managed ActorRef out of the Actor of the specified Class.
|
||||
* If the supplied host and port is identical of the configured local node, it will be a local actor
|
||||
* <pre>
|
||||
* import Actor._
|
||||
* val actor = actorOf(classOf[MyActor],"www.akka.io", 2552)
|
||||
* actor.start
|
||||
* actor ! message
|
||||
* actor.stop
|
||||
* </pre>
|
||||
* You can create and start the actor in one statement like this:
|
||||
* <pre>
|
||||
* val actor = actorOf(classOf[MyActor],"www.akka.io", 2552).start
|
||||
* </pre>
|
||||
*/
|
||||
@deprecated("Will be removed after 1.1")
|
||||
def actorOf(factory: => Actor, host: String, port: Int): ActorRef =
|
||||
Actor.remote.clientManagedActorOf(() => factory, host, port)
|
||||
|
||||
/**
|
||||
* Creates a Client-managed ActorRef out of the Actor of the specified Class.
|
||||
* If the supplied host and port is identical of the configured local node, it will be a local actor
|
||||
* <pre>
|
||||
* import Actor._
|
||||
* val actor = actorOf(classOf[MyActor],"www.akka.io",2552)
|
||||
* actor.start
|
||||
* actor ! message
|
||||
* actor.stop
|
||||
* </pre>
|
||||
* You can create and start the actor in one statement like this:
|
||||
* <pre>
|
||||
* val actor = actorOf(classOf[MyActor],"www.akka.io",2552).start
|
||||
* </pre>
|
||||
*/
|
||||
@deprecated("Will be removed after 1.1")
|
||||
def actorOf(clazz: Class[_ <: Actor], host: String, port: Int): ActorRef = {
|
||||
import ReflectiveAccess.{ createInstance, noParams, noArgs }
|
||||
clientManagedActorOf(() =>
|
||||
createInstance[Actor](clazz.asInstanceOf[Class[_]], noParams, noArgs).getOrElse(
|
||||
throw new ActorInitializationException(
|
||||
"Could not instantiate Actor" +
|
||||
"\nMake sure Actor is NOT defined inside a class/trait," +
|
||||
"\nif so put it outside the class/trait, f.e. in a companion object," +
|
||||
"\nOR try to change: 'actorOf[MyActor]' to 'actorOf(new MyActor)'.")),
|
||||
host, port)
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Client-managed ActorRef out of the Actor of the specified Class.
|
||||
* If the supplied host and port is identical of the configured local node, it will be a local actor
|
||||
* <pre>
|
||||
* import Actor._
|
||||
* val actor = actorOf[MyActor]("www.akka.io",2552)
|
||||
* actor.start
|
||||
* actor ! message
|
||||
* actor.stop
|
||||
* </pre>
|
||||
* You can create and start the actor in one statement like this:
|
||||
* <pre>
|
||||
* val actor = actorOf[MyActor]("www.akka.io",2552).start
|
||||
* </pre>
|
||||
*/
|
||||
@deprecated("Will be removed after 1.1")
|
||||
def actorOf[T <: Actor : Manifest](host: String, port: Int): ActorRef = {
|
||||
import ReflectiveAccess.{ createInstance, noParams, noArgs }
|
||||
clientManagedActorOf(() =>
|
||||
createInstance[Actor](manifest[T].erasure.asInstanceOf[Class[_]], noParams, noArgs).getOrElse(
|
||||
throw new ActorInitializationException(
|
||||
"Could not instantiate Actor" +
|
||||
"\nMake sure Actor is NOT defined inside a class/trait," +
|
||||
"\nif so put it outside the class/trait, f.e. in a companion object," +
|
||||
"\nOR try to change: 'actorOf[MyActor]' to 'actorOf(new MyActor)'.")),
|
||||
host, port)
|
||||
}
|
||||
|
||||
protected override def manageLifeCycleOfListeners = false
|
||||
protected[akka] override def notifyListeners(message: => Any): Unit = super.notifyListeners(message)
|
||||
|
||||
|
|
@ -444,10 +369,6 @@ trait RemoteClientModule extends RemoteModule { self: RemoteModule =>
|
|||
def typedActorFor[T](intfClass: Class[T], serviceId: String, implClassName: String, timeout: Long, hostname: String, port: Int, loader: ClassLoader): T =
|
||||
typedActorFor(intfClass, serviceId, implClassName, timeout, hostname, port, Some(loader))
|
||||
|
||||
@deprecated("Will be removed after 1.1")
|
||||
def clientManagedActorOf(factory: () => Actor, host: String, port: Int): ActorRef
|
||||
|
||||
|
||||
/**
|
||||
* Clean-up all open connections.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue