incorporate Patrik’s feedback

- rename to DynamicAccess
- rename to createInstanceFor / createClassFor
- fix a few little things
This commit is contained in:
Roland 2012-02-10 11:36:23 +01:00
parent b193bcee04
commit dca309c535
19 changed files with 56 additions and 58 deletions

View file

@ -128,12 +128,12 @@ class Serialization(val system: ExtendedActorSystem) extends Extension {
/**
* Tries to load the specified Serializer by the fully-qualified name; the actual
* loading is performed by the systems [[akka.actor.PropertyMaster]].
* loading is performed by the systems [[akka.actor.DynamicAccess]].
*/
def serializerOf(serializerFQN: String): Either[Throwable, Serializer] = {
val pm = system.propertyMaster
pm.getInstanceFor[Serializer](serializerFQN, Seq(classOf[ExtendedActorSystem] -> system))
.fold(_ pm.getInstanceFor[Serializer](serializerFQN, Seq()), Right(_))
val dynamicAccess = system.dynamicAccess
dynamicAccess.createInstanceFor[Serializer](serializerFQN, Seq(classOf[ExtendedActorSystem] -> system))
.fold(_ dynamicAccess.createInstanceFor[Serializer](serializerFQN, Seq()), Right(_))
}
/**