@Override
    public void createAgent(String agent_name, String path) {
        logger.fine("Creating agent " + agent_name + " in Main Container");
        Object reference = new Object();
        Object empty[] = new Object[1];
        empty[0] = reference;
        try {
            AgentController agentController = mainContainer.createNewAgent(
                    agent_name, path, empty);
            this.createdAgents.put(agent_name, agentController);
            agentController.start();
            logger.fine("Agent " + agent_name
                    + " created and started in Main Container");
            try {
                Thread.sleep(MILLIS_TO_WAIT_FOR_AGENT_STARTING);
            } catch (InterruptedException e) {
                logger.warning("It was not possible to wait for agent starting... Maybe, the agent is not completely started yet.");
            }
        } catch (StaleProxyException e) {
            logger.warning("Exception creating or starting agent in MainContainer... "
                    + e);
        }
        // Register the agent
    }
@ Override public void createAgent ( String agent_name , String path ) { logger . fine ( "Creating agent " + agent_name + " in Main Container" ) ; Object reference = new Object ( ) ; Object empty [ ] = new Object [ 1 ] ; empty [ 0 ] = reference ; try { AgentController agentController = mainContainer . createNewAgent ( agent_name , path , empty ) ; this . createdAgents . put ( agent_name , agentController ) ; agentController . start ( ) ; logger . fine ( "Agent " + agent_name + " created and started in Main Container" ) ; try { Thread . sleep ( MILLIS_TO_WAIT_FOR_AGENT_STARTING ) ; } catch ( InterruptedException e ) { logger . warning ( "It was not possible to wait for agent starting... Maybe, the agent is not completely started yet." ) ; } } catch ( StaleProxyException e ) { logger . warning ( "Exception creating or starting agent in MainContainer... " + e ) ; } }
/*
(non-Javadoc)

@see
es.upm.dit.gsi.beast.platform.Connector#createAgent(java.lang.String,
java.lang.String)