Package de.dfki.owlsmx.gui.util.tasks

Examples of de.dfki.owlsmx.gui.util.tasks.AddServicesToMatchmakerTask


            System.err.println("Test collection incomplete:\nThere were no service requests found in the test collection. Please add some.");
            System.exit(0);
        }
       
        // Create task for adding services to the matchmaker and run queries
        AddServicesToMatchmakerTask addServicesTask = new AddServicesToMatchmakerTask();
        RunQueriesTask runQueriesTask = new RunQueriesTask();
        System.out.println(runQueriesTask.getLengthOfTask() + " queries and " + addServicesTask.getLengthOfTask() + " services loaded");
       
        // Start the first task that runs in a SwingThread
        System.out.print("The AddServicesToMatchmakerTask is starting ..");
        addServicesTask.go();
        System.out.println(addServicesTask.getMessage());
        // Wait till the task is done
        boolean wait = true;
        while(wait){
            try{
                Thread.sleep(500);
            } catch(InterruptedException e){
                System.err.println(e.getMessage());
                e.printStackTrace();
            }
            System.out.println(addServicesTask.getMessage());
            if(addServicesTask.isDone()){
                // Stop the thread
                addServicesTask.stop();
                System.out.println(". done :)");
                wait = false;
            }
        }
        // Now the queries can be started
View Full Code Here

TOP

Related Classes of de.dfki.owlsmx.gui.util.tasks.AddServicesToMatchmakerTask

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.