int oldstatus = status;
status = i;
if (oldstatus < INITIALIZED && status >= INITIALIZED) {
initVM();
notifyListeners(new LineEvent(this, LineEvent.Type.OPEN, 0));
} else if (oldstatus >= INITIALIZED && status < INITIALIZED) {
freeVM();
activeLines = null;
notifyListeners(new LineEvent(this, LineEvent.Type.CLOSE, 0));
}
if (oldstatus < RUNNING && status == RUNNING)
notifyListeners(new LineEvent(this, LineEvent.Type.START, 0));
else if (oldstatus == RUNNING && status < RUNNING)
notifyListeners(new LineEvent(this, LineEvent.Type.STOP, 0));
status = i;
}