Package jade.core

Examples of jade.core.ProfileImpl


  }
 
  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "false");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
View Full Code Here


  }
 
  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
View Full Code Here

  }
 
  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
View Full Code Here

  }
 
  private static void testAgents() throws Exception {
   
    Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
    AgentController senderAgent1 = cc.createNewAgent("SenderAgent-1",
        SenderAgent.class.getCanonicalName(), null);
    AgentController senderAgent2 = cc.createNewAgent("SenderAgent-2",
        SenderAgent.class.getCanonicalName(), null);
View Full Code Here

  }
 
  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
View Full Code Here

*/
public class Boot extends jade.Boot {
  public static void main(String args[]) {
    try {
      // Create the Profile
      ProfileImpl p = null;
      if (args.length > 0) {
        if (args[0].startsWith("-")) {
          // Settings specified as command line arguments
          p = new ProfileImpl(parseCmdLineArgs(args));
        }
        else {
          // Settings specified in a property file
          p = new ProfileImpl(args[0]);
        }
      }
      else {
        // Settings specified in the default property file
        p = new ProfileImpl(DEFAULT_FILENAME);
      }

      // Start a new JADE runtime system
      Runtime.instance().setCloseVM(true);
      // Check whether this is the Main Container or a peripheral container
      if (p.getBooleanProperty(Profile.MAIN, true)) {
        Runtime.instance().createMainContainer(p);
      } else {
        Runtime.instance().createAgentContainer(p);
      }
     
      // Activate the proper SMSManager
      SMSManager.getInstance(p.getProperties());
    }
    catch (ProfileException pe) {
      System.err.println("Error creating the Profile ["+pe.getMessage()+"]");
      pe.printStackTrace();
      printUsage();
View Full Code Here

   * agent platform.
   */
  public static void main(String args[]) {
    try {
      // Create the Profile
      ProfileImpl p = null;
      if (args.length > 0) {
        if (args[0].startsWith("-")) {
          // Settings specified as command line arguments
          Properties pp = parseCmdLineArgs(args);
          if (pp != null) {
            p = new ProfileImpl(pp);
          }
          else {
            // One of the "exit-immediately" options was specified!
            return;
          }
        }
        else {
          // Settings specified in a property file
          p = new ProfileImpl(args[0]);
        }
      }
      else {
        // Settings specified in the default property file
        p = new ProfileImpl(DEFAULT_FILENAME);
      }

      // Start a new JADE runtime system
      Runtime.instance().setCloseVM(true);
      //#PJAVA_EXCLUDE_BEGIN
      // Check whether this is the Main Container or a peripheral container
      if (p.getBooleanProperty(Profile.MAIN, true)) {
        Runtime.instance().createMainContainer(p);
      } else {
        Runtime.instance().createAgentContainer(p);
      }
      //#PJAVA_EXCLUDE_END
View Full Code Here

   * Old method, only for compliance with former versions (prior 3.0)
   */
  public TransportAddress activate(InChannel.Dispatcher disp)
  throws MTPException {
    try {
      return activate(disp,new ProfileImpl(new ExtendedProperties()));
    } catch(Exception e) {
      throw new MTPException(e.getMessage());
    }
  }
View Full Code Here

  }
 
  public void activate(InChannel.Dispatcher disp, TransportAddress ta)
  throws MTPException {
    try {
      activate(disp,ta,new ProfileImpl(new ExtendedProperties()));
    } catch(Exception e) {
      throw new MTPException(e.getMessage());
    }
  }
View Full Code Here

    init(agentClassName, null, jadeProfile);
  }
 
  final void initProfile() {
    // to initialize the profile every restart, otherwise an exception would be thrown by JADE
    profile = (jadeProps == null ? new ProfileImpl(false) : new ProfileImpl(jadeProps));
  }
View Full Code Here

TOP

Related Classes of jade.core.ProfileImpl

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.