X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fauth%2FAAIMicroServiceAuthCore.java;h=bdb3bc76be339165244fcb2e8adea05c3070cecf;hb=refs%2Fchanges%2F64%2F83764%2F2;hp=0eec7e1a0b45c25e9bc8c5e276281c81244d74c0;hpb=6b52f93a1965dfadd55410a4231446c9fb374633;p=aai%2Fbabel.git diff --git a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java index 0eec7e1..bdb3bc7 100644 --- a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java +++ b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java @@ -91,19 +91,8 @@ public class AAIMicroServiceAuthCore { } AAIMicroServiceAuthCore.reloadUsers(); - TimerTask task = new FileWatcher(new File(policyAuthFileName)) { - @Override - protected void onChange(File file) { - // here we implement the onChange - applicationLogger.debug("File " + file.getName() + " has been changed!"); - try { - AAIMicroServiceAuthCore.reloadUsers(); - } catch (AAIAuthException e) { - applicationLogger.error(ApplicationMsgs.PROCESS_REQUEST_ERROR, e); - } - applicationLogger.debug("File " + file.getName() + " has been reloaded!"); - } - }; + + TimerTask task = new AuthFileWatcher(new File(policyAuthFileName)); if (!timerSet) { timerSet = true; @@ -130,7 +119,7 @@ public class AAIMicroServiceAuthCore { *
  • If this fails, try resolving the path relative to the configuration home location (either * $CONFIG_HOME or $APP_HOME/appconfig).
  • *
  • If this fails try resolving relative to the auth folder under configuration home.
  • - * + * * @param authPolicyFile * filename or path * @return the Optional canonical path to the located policy file