#NEWLINE# def instantiate( self , actor_name , actor_type , argd , signature = None ) : #NEWLINE# #INDENT# "\n        Instantiate an actor.\n          - 'actor_name' is <namespace>:<identifier>, e.g. app:src, or app:component:src\n          - 'actor_type' is the actor class to instatiate\n          - 'argd' is a dictionary with <actor_name>:<argdict> pairs\n          - 'signature' is the GlobalStore actor-signature to lookup the actor\n        " #NEWLINE# req = self . get_req ( actor_name ) #NEWLINE# _log . analyze ( self . node . id , '+ SECURITY' , { #NEWLINE# #INDENT# 'sec' : str ( self . sec ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( found , is_primitive , actor_def ) = self . actorstore . lookup ( actor_type ) #NEWLINE# if ( ( not found ) or ( not is_primitive ) ) : #NEWLINE# #INDENT# raise Exception ( ( 'Not known actor type: %s' % actor_type ) ) #NEWLINE# #UNINDENT# actor_id = self . instantiate_primitive ( actor_name , actor_type , argd , req , signature ) #NEWLINE# if ( not actor_id ) : #NEWLINE# #INDENT# raise Exception ( ( 'Could not instantiate actor of type: %s' % actor_type ) ) #NEWLINE# #UNINDENT# self . actor_map [ actor_name ] = actor_id #NEWLINE# self . node . app_manager . add ( self . app_id , actor_id )