public synchronized WebPage display(WebInterface myWebInterface) {
   return new IntroduceIdentityPage(
       myWebInterface, (WoTOwnIdentity) mOwner, mID, mPuzzlesToSolve, myWebInterface.l10n());
 }
Esempio n. 2
0
  @Override
  public void terminate() {
    if (logDEBUG) Logger.debug(this, "Terminating Freetalk ...");

    /* We use single try/catch blocks so that failure of termination of one service does not prevent termination of the others */
    try {
      mWebInterface.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    if (mNNTPServer != null) {
      try {
        mNNTPServer.terminate();
      } catch (Exception e) {
        Logger.error(this, "Error during termination.", e);
      }
    }

    try {
      mFCPInterface.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    /* WebInterface is stateless and does not need to be terminated */

    try {
      mTaskManager.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      mMessageListInserter.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      mOldMessageListFetcher.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      mNewMessageListFetcher.stop();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      mMessageInserter.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      mMessageFetcher.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      mMessageManager.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      mIdentityManager.terminate();
    } catch (Exception e) {
      Logger.error(this, "Error during termination.", e);
    }

    try {
      closeDatabase();
    } catch (Exception e) {
      Logger.error(this, "Error while closing database.", e);
    }

    if (logDEBUG) Logger.debug(this, "Freetalk plugin terminated.");
  }