/**
* The default implementation of this method just determines whether
* this line is a source or target line, calls open(no-arg) on the
* mixer, and adds the line to the appropriate vector.
* The mixer may be opened at a format different than the line's
* format if it is a DataLine.
*/
final synchronized void open(Line line) throws LineUnavailableException {
if (Printer.trace) Printer.trace(">> AbstractMixer: open(line = " + line + ")");
// $$kk: 06.11.99: ignore ourselves for now
if (this.equals(line)) {
if (Printer.trace) Printer.trace("<< AbstractMixer: open(" + line + ") nothing done");
return;
}
// source line?
if (isSourceLine(line.getLineInfo())) {
if (! sourceLines.contains(line) ) {
// call the no-arg open method for the mixer; it should open at its
// default format if it is not open yet
open(false);
// we opened successfully! add the line to the list
sourceLines.addElement(line);
}
} else {
// target line?
if(isTargetLine(line.getLineInfo())) {
if (! targetLines.contains(line) ) {
// call the no-arg open method for the mixer; it should open at its
// default format if it is not open yet
open(false);
// we opened successfully! add the line to the list
targetLines.addElement(line);
}
} else {
if (Printer.err) Printer.err("Unknown line received for AbstractMixer.open(Line): " + line);
}
}
if (Printer.trace) Printer.trace("<< AbstractMixer: open(" + line + ") completed");
}
AbstractMixer.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录