synchronized (line) {
synchronized (lineLock) {
    public synchronized void cancel() {        debugPrint("cancelling...");	cancelled = true;	try {	    Thread.sleep(cancelDelay);	} catch (InterruptedException ie) {	    ie.printStackTrace();	}        if (line != null) {            synchronized (line) {                line.stop();                line.flush();            }            notify();        }        debugPrint("...cancelled");    }