+ rw = Instance.getInstance().getConfig().getBoolean(Config.SERVER_RW,
+ rw);
+ if (!subkey.isEmpty()) {
+ List<String> allowed = Instance.getInstance().getConfig()
+ .getList(Config.SERVER_ALLOWED_SUBKEYS);
+ if (allowed.contains(subkey)) {
+ if ((subkey + "|").contains("|rw|")) {
+ rw = true;
+ }
+ if ((subkey + "|").contains("|wl|")) {
+ wl = false; // |wl| = bypass whitelist
+ whitelist = new ArrayList<String>();
+ }
+ if ((subkey + "|").contains("|bl|")) {
+ bl = false; // |bl| = bypass blacklist
+ blacklist = new ArrayList<String>();
+ }
+ }
+ }
+
+ String mode = display(wl, bl, rw);
+
+ String trace = mode + "[ " + command + "] ";
+ for (Object arg : args) {
+ trace += arg + " ";
+ }
+ long now = System.currentTimeMillis();
+ System.out.println(StringUtils.fromTime(now) + ": " + trace);
+
+ Object rep = null;
+ try {
+ rep = doRequest(action, command, args, rw, whitelist, blacklist);
+ } catch (IOException e) {
+ rep = new RemoteLibraryException(e, true);
+ }