ソースを参照

Allow communication engines to deny resume by clock

tags/1.0.33
ymlam 1年前
コミット
bb665f8e67
1個のファイルの変更5行の追加10行の削除
  1. +5
    -10
      src/main/java/altk/comm/engine/Broadcast.java

+ 5
- 10
src/main/java/altk/comm/engine/Broadcast.java ファイルの表示

@@ -1020,12 +1020,9 @@ public abstract class Broadcast
protected String resume(String reason) {
if (reason == ACTION_BY_CLOCK) {
boolean inAcceptqble = false;
if (this.reason == null) return null;
for (String acceptable : getPauseModesResumableByClock()) {
if (this.reason.equalsIgnoreCase(acceptable)) inAcceptqble = true;
}
if (!inAcceptqble) return null;
boolean reason_is_ok = this.reason == ACTION_BY_CLOCK || !child_denies_resume_by_clock();
if (!reason_is_ok) return null;
}
if (!withinOperatingHours()) return "Cannot resume outside operating hours";
@@ -1039,17 +1036,15 @@ public abstract class Broadcast
case SUCCESS:
resumeFlag.notifyAll();
return "Broadcast resumed";
case NO_CHANGE:
default:
return null;
}
}
}
/** derived class may override by adding more modes */
protected List<String> getPauseModesResumableByClock() {
Vector<String> modes = new Vector<String>();
modes.add(ACTION_BY_CLOCK);
return modes;
protected boolean child_denies_resume_by_clock() {
return false;
}
/**


読み込み中…
キャンセル
保存