* @throws AgentInfoException see <code>Container</code>
*/
public void loadAgent(AgentInfo agentInfo) throws AgentInfoException
{
if(! (agentInfo instanceof BasicAgentInfo))
throw new AgentInfoException(AgentInfoException.WRONG_AGENTINFO);
BasicAgentInfo info = (BasicAgentInfo)agentInfo;
// Checks for AgentInfo
if(this.agentInfos.containsKey(info.getAgentName()))
throw new AgentInfoException(AgentInfoException.NAME_NOT_UNIQUE);
if(info.getAgentName() == null)
throw new AgentInfoException(AgentInfoException.NO_AGENT_NAME);
if(info.getAgentName().equals(""))
throw new AgentInfoException(AgentInfoException.NO_AGENT_NAME);
if(info.getAgentName().equals(HOST_ADDRESS))
throw new AgentInfoException(AgentInfoException.NAME_NOT_UNIQUE);
if(info.getAgent() == null)
throw new AgentInfoException(AgentInfoException.NO_AGENT);
if(info.getPackager() == null)
throw new AgentInfoException(AgentInfoException.NO_PACKAGER);
if(info.getSecurityPolicy() == null)
throw new AgentInfoException(AgentInfoException.NO_SECURITYPOLICY);
// set preconditions
info.setAgentState(AgentInfo.STATE_PREPARED);
this.agentInfos.put(info.getAgentName(), info);