// TODO: add path check
Mailbox mailbox = new Mailbox(getQueue());
UUID uuid = UUID.randomUUID();
ActorRef ref = new ActorRef(actorSystem, this, uuid, path);
ActorScope scope = new ActorScope(actorSystem, mailbox, ref, this, UUID.randomUUID(), path, props);
synchronized (mailboxes) {
mailboxes.put(mailbox, scope);
scopes.put(scope.getPath(), scope);
actorProps.put(path, props);
}
// Sending init message
scope.getActorRef().send(StartActor.INSTANCE);
return scope;
}