mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-02 22:52:12 +01:00
18 lines
367 B
Java
18 lines
367 B
Java
|
package cc.arduino.packages;
|
||
|
|
||
|
import processing.app.AbstractMonitor;
|
||
|
import processing.app.NetworkMonitor;
|
||
|
import processing.app.SerialMonitor;
|
||
|
|
||
|
public class MonitorFactory {
|
||
|
|
||
|
public AbstractMonitor newMonitor(BoardPort port) {
|
||
|
if ("network".equals(port.getProtocol())) {
|
||
|
return new NetworkMonitor(port);
|
||
|
}
|
||
|
|
||
|
return new SerialMonitor(port);
|
||
|
}
|
||
|
|
||
|
}
|