diff options
author | Instrumental <jonathan.gathman@att.com> | 2019-09-16 09:22:24 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-09-16 16:16:51 -0500 |
commit | 07fb3ece74a9aa1fad8e2a9fab73b4de3e36853b (patch) | |
tree | 058001a686d135d76713b22db74e817f2084622a /cadi/core/src | |
parent | 7afca63faf20cf6ee680f80e08d4cfebecbab9c8 (diff) |
Improved multi Proxy DNSLocator based
Issue-ID: AAF-961
Change-Id: I21d4a8013ca6f65306e32c5a2e2fa4ba230df2b7
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/core/src')
-rw-r--r-- | cadi/core/src/main/java/org/onap/aaf/cadi/User.java | 2 | ||||
-rw-r--r-- | cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/User.java b/cadi/core/src/main/java/org/onap/aaf/cadi/User.java index 4848e504..cb3b4e8f 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/User.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/User.java @@ -40,7 +40,7 @@ public final class User<PERM extends Permission> { public String name; private byte[] cred; public Principal principal; - Map<String, Permission> perms ; + Map<String, Permission> perms; long permExpires; private final long interval; int count; diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java b/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java index fbaa4a5a..2c9bb8c4 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java @@ -45,17 +45,20 @@ public class CSV { private Access access; private boolean processAll; private char delimiter = ','; + private boolean go; public CSV(Access access, File file) { this.access = access; csv = file; processAll = false; + go = true; } public CSV(Access access, String csvFilename) { this.access = access; csv = new File(csvFilename); processAll = false; + go = true; } public CSV setDelimiter(char delimiter) { @@ -88,7 +91,7 @@ public class CSV { try { String line; StringBuilder sb = new StringBuilder(); - while((line = br.readLine())!=null) { + while(go && (line = br.readLine())!=null) { line=line.trim(); if(!line.startsWith("#") && line.length()>0) { // System.out.println(line); uncomment to debug @@ -268,6 +271,13 @@ public class CSV { return csv.getAbsolutePath(); } } + + /** + * Provides a way to stop processing records from inside a Visit + */ + public void stop() { + go = false; + } public void delete() { csv.delete(); |