Esempio n. 1
0
 public void start() throws Exception {
   if (workerThread != null) {
     throw new Exception("Vestige ME already started");
   }
   workerThread = vestigeExecutor.createWorker("me-worker", true, 0);
   defaultApplicationManager.powerOn(vestigePlatform, applicationDescriptorFactory);
   server.start();
 }
Esempio n. 2
0
 public void stop() throws Exception {
   if (workerThread == null) {
     throw new Exception("Vestige ME is not started");
   }
   server.stop();
   defaultApplicationManager.shutdown();
   try {
     ObjectOutputStream objectOutputStream =
         new ObjectOutputStream(new FileOutputStream(resolverFile));
     try {
       objectOutputStream.writeObject(defaultApplicationManager);
     } finally {
       objectOutputStream.close();
     }
   } catch (Exception e) {
     LOGGER.warn("Unable to save application manager", e);
   }
   workerThread.interrupt();
   workerThread.join();
   workerThread = null;
 }