Package com.almende.eve.entity

Examples of com.almende.eve.entity.AgentMetaData


      getAgentFactory().createAgent(type, id)
   
      ObjectDatastore datastore = new AnnotationObjectDatastore();
     
      // remove any old registration
      AgentMetaData meta = datastore.load(AgentMetaData.class, id);
      if (meta != null) {
        datastore.delete(meta);
      }
     
      // store new registration
      meta = new AgentMetaData(type, id);
      datastore.store(meta);
     
      try {
        trigger("create", toInfo(meta));
      }
View Full Code Here


    Agent agent = factory.getAgent(id);
    if (agent != null) {
      ObjectDatastore datastore = new AnnotationObjectDatastore();
     
      // remove any old registration
      AgentMetaData meta = datastore.load(AgentMetaData.class, id);
      if (meta != null) {
        datastore.delete(meta);
      }
     
      // store new registration
      meta = new AgentMetaData(agent.getClass().getName(), agent.getId());
      datastore.store(meta);
     
      try {
        trigger("register", toInfo(meta));
      }
View Full Code Here

   * @param id
   * @throws Exception
   */
  public void unregister(@Name("id") String id) throws Exception {
    ObjectDatastore datastore = new AnnotationObjectDatastore();
    AgentMetaData meta = datastore.load(AgentMetaData.class, id);
    if (meta != null) {
      try {
        trigger("unregister", toInfo(meta));
        datastore.delete(meta);
      }
View Full Code Here

   * @return
   * @throws Exception
   */
  public void delete(@Name("id") String id) throws Exception {
    ObjectDatastore datastore = new AnnotationObjectDatastore();
    AgentMetaData meta = datastore.load(AgentMetaData.class, id);
    if (meta != null) {
      try {
        trigger("delete", toInfo(meta));
      }
      catch (Exception e) {}
View Full Code Here

    }

    List<Map<String, Object>> info = new ArrayList<Map<String,Object>>();
    QueryResultIterator<AgentMetaData> it = command.now();
    while (it.hasNext()) {
      AgentMetaData meta = it.next();
      Map<String, Object> i = toInfo(meta);
      if (i != null) {
        info.add(i);
      }
      else {
View Full Code Here

   * @return info
   * @throws Exception
   */
  public Map<String, Object> get(@Name("id") String id) throws Exception {
    ObjectDatastore datastore = new AnnotationObjectDatastore();
    AgentMetaData meta = datastore.load(AgentMetaData.class, id);
    if (meta != null) {
      return toInfo(meta);
    }
    else {
      Agent agent = getAgentFactory().getAgent(id);
View Full Code Here

TOP

Related Classes of com.almende.eve.entity.AgentMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.