Package com.almende.eve.agent

Examples of com.almende.eve.agent.AgentHost


   * creating the agent, triggering the call, etc.
   *
   * @param args the arguments
   */
  public static void main(final String[] args) {
    final AgentHost host = AgentHost.getInstance();
    host.setStateFactory(new MemoryStateFactory());
    try {
     
      final MyFirstAgent agent = host.createAgent(MyFirstAgent.class,
          "MyFirstAgent");
      agent.callMyself();
     
    } catch (final Exception e) {
      System.err.println("Strange, couldn't create agent in host.");
View Full Code Here


  /**
   * Load agent.
   */
  public final void loadAgent() {
    if (myAgent == null) {
      final AgentHost host = AgentHost.getInstance();
     
      try {
        myAgent = host.getAgent(agentId);
      } catch (final Exception e) {
        LOG.severe("Couldn't load agent of ResultMonitor."
            + e.getLocalizedMessage());
      }
    }
View Full Code Here

     * Instantiates a new my cookie store.
     *
     * @throws IOException Signals that an I/O exception has occurred.
     */
    MyCookieStore() throws IOException {
      final AgentHost host = AgentHost.getInstance();
      StateFactory factory = null;
      if (host.getConfig() != null) {
        factory = host.getStateFactoryFromConfig(host.getConfig(),
            "cookies");
      }
      if (factory == null) {
        factory = host.getStateFactory();
      }
      if (factory.exists(COOKIESTORE)) {
        myState = factory.get(COOKIESTORE);
      } else {
        myState = factory.create(COOKIESTORE);
View Full Code Here

   * creating the agent, triggering the call, etc.
   *
   * @param args
   */
  public static void main(String[] args) {
    AgentHost host = AgentHost.getInstance();
    host.setStateFactory(new MemoryStateFactory());
    try {
     
      MyFirstAgent agent = host.createAgent(MyFirstAgent.class, "MyFirstAgent");
      agent.callMyself();
     
    } catch (Exception e) {
      System.err.println("Strange, couldn't create agent in host.");
      e.printStackTrace();
View Full Code Here

    loadAgent();
  }
 
  public final void loadAgent() {
    if (myAgent == null) {
      AgentHost factory = AgentHost.getInstance();
     
      try {
        myAgent = factory.getAgent(agentId);
      } catch (Exception e) {
        LOG.severe("Couldn't load agent of ResultMonitor."
            + e.getLocalizedMessage());
      }
    }
View Full Code Here

TOP

Related Classes of com.almende.eve.agent.AgentHost

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.