protected void bureauInitialized ( ClientObject client , String bureauId ) { final Bureau bureau = _bureaus . get ( bureauId ) ; if ( bureau == null ) { log . warning ( "Initialization of non-existent bureau" , "bureauId" , bureauId ) ; return ; } bureau . clientObj = client ; log . info ( "Bureau created, launching pending agents" , "bureau" , bureau ) ; // find all pending agents Set < AgentObject > pending = Sets . newHashSet ( ) ; for ( Map . Entry < AgentObject , AgentState > entry : bureau . agentStates . entrySet ( ) ) { if ( entry . getValue ( ) == AgentState . PENDING ) { pending . add ( entry . getKey ( ) ) ; } } // create them for ( AgentObject agent : pending ) { log . info ( "Creating agent" , "agent" , agent . which ( ) ) ; BureauSender . createAgent ( bureau . clientObj , agent . getOid ( ) ) ; bureau . agentStates . put ( agent , AgentState . STARTED ) ; } bureau . summarize ( ) ; }
Callback for when the bureau client acknowledges starting up . Starts all pending agents and causes subsequent agent start requests to be sent directly to the bureau .