/* This is my attempt to lunch the mobile agent
{}Thread
*/
package Project1;
import COM.meitca.concordia.*;


public class Launcher{
	
	public static void main (String[] args){
		// TODO: Add initialization code here
		String destination= "localhost";
		

		try {
			// First we construct the agent
			Class1 agent = new Class1();
			//p.start();

			// Second we set up the Agents itinerary.  Notice that
			// we can specify the method to call by name.
			Itinerary itinerary = new Itinerary();

			itinerary.addDestination(new Destination("localhost", "run"));
			agent.setItinerary(itinerary);

            // Set up the URL pointing to the Agent's codebase.
			agent.setHomeCodebaseURL(null);
			
			//Set related classs
			//Must be releted with "Project1.VirtAgent"
			String[] relatedClasses = {"Project1.VirtAgent", "Project1.Pause"};
			agent.setRelatedClasses(relatedClasses);

			// Last, we actually launch the agent with the Agent launch method
			System.out.println("Spreman za start\n");
			agent.launch();

		} catch (Exception e) {
			System.err.println(e.getMessage());
			e.printStackTrace();
		}
	}

}
