Changes based on latest code review

This commit is contained in:
WSSIA
2016-09-19 21:50:04 +01:00
parent f2159515bc
commit dbd605e378
4 changed files with 43 additions and 18 deletions
@@ -25,13 +25,25 @@ public class Event implements IEvent, Runnable {
private int eventId;
private int eventTime;
private boolean isSynchronous;
private Thread thread;
private boolean isComplete = false;
private ThreadCompleteListener eventListener;
public Event(final int eventId, final int eventTime) {
/**
*
* @param eventId event ID
* @param eventTime event time
* @param isSynchronous is of synchronous type
*/
public Event(final int eventId, final int eventTime, final boolean isSynchronous) {
this.eventId = eventId;
this.eventTime = eventTime;
this.isSynchronous = isSynchronous;
}
public boolean isSynchronous() {
return isSynchronous;
}
@Override
@@ -42,6 +54,9 @@ public class Event implements IEvent, Runnable {
@Override
public void stop() {
if (null == thread) {
return;
}
thread.interrupt();
}