|
|
@@ -73,7 +73,6 @@ public abstract class Broadcast |
|
|
// protected XPath xpathEngine; |
|
|
// protected XPath xpathEngine; |
|
|
protected String postbackURL; |
|
|
protected String postbackURL; |
|
|
private Postback postback; |
|
|
private Postback postback; |
|
|
public long expireTime; |
|
|
|
|
|
protected String daily_start = ""; |
|
|
protected String daily_start = ""; |
|
|
protected String daily_stop = ""; |
|
|
protected String daily_stop = ""; |
|
|
|
|
|
|
|
|
@@ -127,7 +126,6 @@ public abstract class Broadcast |
|
|
CANCELED(true), // Final state |
|
|
CANCELED(true), // Final state |
|
|
PURGED(true), // Final state |
|
|
PURGED(true), // Final state |
|
|
ABORTED(true), // final state |
|
|
ABORTED(true), // final state |
|
|
EXPIRED(true), // final state |
|
|
|
|
|
/** All servicing and reporting done */ |
|
|
/** All servicing and reporting done */ |
|
|
ALLDONE(true) // Final state |
|
|
ALLDONE(true) // Final state |
|
|
; |
|
|
; |
|
|
@@ -213,7 +211,6 @@ public abstract class Broadcast |
|
|
BroadcastState.PURGED, // User action |
|
|
BroadcastState.PURGED, // User action |
|
|
BroadcastState.ABORTING, |
|
|
BroadcastState.ABORTING, |
|
|
BroadcastState.ABORTED, |
|
|
BroadcastState.ABORTED, |
|
|
BroadcastState.EXPIRED, |
|
|
|
|
|
BroadcastState.ALLDONE // When recipient list is empty |
|
|
BroadcastState.ALLDONE // When recipient list is empty |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
@@ -226,8 +223,7 @@ public abstract class Broadcast |
|
|
BroadcastState.PAUSED, // User action |
|
|
BroadcastState.PAUSED, // User action |
|
|
BroadcastState.PURGED, // User action |
|
|
BroadcastState.PURGED, // User action |
|
|
BroadcastState.ABORTING, |
|
|
BroadcastState.ABORTING, |
|
|
BroadcastState.ABORTED, |
|
|
|
|
|
BroadcastState.EXPIRED |
|
|
|
|
|
|
|
|
BroadcastState.ABORTED |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Transitions from CANCELING |
|
|
// Transitions from CANCELING |
|
|
@@ -920,20 +916,6 @@ public abstract class Broadcast |
|
|
return ""; |
|
|
return ""; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected void onExpire() |
|
|
|
|
|
{ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void setExpireTime(long expireTime) |
|
|
|
|
|
{ |
|
|
|
|
|
this.expireTime = expireTime; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public long getExpireTime() |
|
|
|
|
|
{ |
|
|
|
|
|
return expireTime; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
* |
|
|
* @return instantaneous number of jobs being serviced by service provider |
|
|
* @return instantaneous number of jobs being serviced by service provider |
|
|
@@ -945,7 +927,7 @@ public abstract class Broadcast |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Parses broadcastId and return if notInService is true. |
|
|
* Parses broadcastId and return if notInService is true. |
|
|
* Otherwise, continue parsing postBackUrl, expireTime, recipientList, |
|
|
|
|
|
|
|
|
* Otherwise, continue parsing postBackUrl, recipientList, |
|
|
* and implementation-specific data from request. |
|
|
* and implementation-specific data from request. |
|
|
* Avoid throwing an exception before parsing and setting broadcastId. |
|
|
* Avoid throwing an exception before parsing and setting broadcastId. |
|
|
* @param notInService |
|
|
* @param notInService |
|
|
@@ -1183,12 +1165,6 @@ public abstract class Broadcast |
|
|
*/ |
|
|
*/ |
|
|
private boolean serviceThreadsShouldStop() |
|
|
private boolean serviceThreadsShouldStop() |
|
|
{ |
|
|
{ |
|
|
if (System.currentTimeMillis() >= expireTime) |
|
|
|
|
|
{ |
|
|
|
|
|
setState(BroadcastState.EXPIRED); |
|
|
|
|
|
wakeUpServiceThreads(); |
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
|
|
|
if (state == BroadcastState.CANCELING || |
|
|
if (state == BroadcastState.CANCELING || |
|
|
state == BroadcastState.ABORTING || |
|
|
state == BroadcastState.ABORTING || |
|
|
state.isFinal) |
|
|
state.isFinal) |
|
|
@@ -1349,10 +1325,9 @@ public abstract class Broadcast |
|
|
{ |
|
|
{ |
|
|
if (rescheduleTimeMS < 0) return null; |
|
|
if (rescheduleTimeMS < 0) return null; |
|
|
|
|
|
|
|
|
// No more rescheduling on cancel, abort, expired, or alldone |
|
|
|
|
|
|
|
|
// No more rescheduling on cancel, abort, or alldone |
|
|
if (state == BroadcastState.CANCELING |
|
|
if (state == BroadcastState.CANCELING |
|
|
|| state == BroadcastState.CANCELED |
|
|
|| state == BroadcastState.CANCELED |
|
|
|| state == BroadcastState.EXPIRED |
|
|
|
|
|
|| state == BroadcastState.ABORTED |
|
|
|| state == BroadcastState.ABORTED |
|
|
|| state == BroadcastState.ABORTING |
|
|
|| state == BroadcastState.ABORTING |
|
|
|| state == BroadcastState.ALLDONE |
|
|
|| state == BroadcastState.ALLDONE |
|
|
|