event.scala

This commit is contained in:
bluejoe2008@gmail.com 2018-05-10 23:05:52 +08:00
parent e2e3779e63
commit ab3a86c6c3
2 changed files with 14 additions and 13 deletions

View File

@ -7,6 +7,18 @@ trait Event {
}
case class LaunchProcess() extends Event {
}
case class ProcessStarted(processName: String) extends Event {
}
case class ProcessFailed(processName: String) extends Event {
}
case class ProcessCompleted(processName: String) extends Event {
}
trait EventHandler {
def handle(event: Event, args: Any): Unit;
}

View File

@ -212,23 +212,12 @@ class FlowExecutionImpl(id: String, flow: Flow, args: Map[String, Any])
override def getId(): String = id;
override def addListener(listener: FlowExecutionListener): Unit = listeners += listener;
override def addListener(listener: FlowExecutionListener): Unit =
listeners += listener;
override def getFlow(): Flow = flow;
}
case class LaunchProcess() extends Event {
}
case class ProcessStarted(processName: String) extends Event {
}
case class ProcessFailed(processName: String) extends Event {
}
case class ProcessCompleted(processName: String) extends Event {
}
class ProcessAsQuartzJob extends Job with Logging {
override def execute(context: JobExecutionContext): Unit = {
val map = context.getJobDetail.getJobDataMap;