| @@ -8,31 +8,33 @@ package altk.comm.engine; | |||||
| public class Job | public class Job | ||||
| { | { | ||||
| /** | /** | ||||
| * | |||||
| * Because enum has no inheritance, JobStatus is the union of | |||||
| * all possible job status from all backend engines built on CommEngine. | |||||
| */ | */ | ||||
| static public enum JobStatus | static public enum JobStatus | ||||
| { | { | ||||
| // TODO: Some of them, like CANCELED and EXPIRED, should not be used, and should be cleaned out. | |||||
| READY(false), | READY(false), | ||||
| TRYING(false), | |||||
| GO_NEXT_PHONE(false), | |||||
| TRUNK_ERROR(false), | |||||
| LONG_DURATION(true), | |||||
| TRYING(false), // VoiceEngine | |||||
| GO_NEXT_PHONE(false), // VoiceEngine | |||||
| //TRUNK_ERROR(false), | |||||
| LONG_DURATION(true), // VoiceEngine | |||||
| SUCCESS(true), | SUCCESS(true), | ||||
| NO_MORE_RETRY(true), | |||||
| ADDRESS_ERROR(true), | |||||
| SERVICE_PROVIDER_PROTOCOL_ERROR(true), | |||||
| SERVICE_PROVIDER_GENERATED_ERROR(true), | |||||
| SERVICE_PROVIDER_HTTP_ERROR(true), | |||||
| SERVICE_PROVIDER_CONNECT_ERROR(true), | |||||
| SERVICE_PROVIDER_OTHER_ERROR(true), | |||||
| CANCELED(true), | |||||
| EXPIRED(true), | |||||
| MESSAGE_ERROR(true), | |||||
| SERVICE_ACCESS_BLOCKED(true), | |||||
| PLATFORM_ERROR(true), | |||||
| FAILED(true), // for | |||||
| UNKNOWN_ERROR(true), | |||||
| ABORT(true); | |||||
| NO_MORE_RETRY(true), // VoiceEngine | |||||
| ADDRESS_ERROR(true), // All | |||||
| SERVICE_PROVIDER_PROTOCOL_ERROR(true), // SMS | |||||
| SERVICE_PROVIDER_GENERATED_ERROR(true), // SMS | |||||
| SERVICE_PROVIDER_HTTP_ERROR(true), // SMS | |||||
| SERVICE_PROVIDER_CONNECT_ERROR(true), // SMS | |||||
| SERVICE_PROVIDER_OTHER_ERROR(true), // Email | |||||
| CANCELED(true), // Voice - is it really? | |||||
| EXPIRED(true), // Voice - is it really? | |||||
| MESSAGE_ERROR(true), // Email, SMS | |||||
| SERVICE_ACCESS_BLOCKED(true), // SMS | |||||
| PLATFORM_ERROR(true), // SMS | |||||
| FAILED(true), // SMS | |||||
| UNKNOWN_ERROR(true), // SMS | |||||
| ABORT(true); // Voice | |||||
| private boolean isTerminal; | private boolean isTerminal; | ||||