parent
30b1c8ff18
commit
a55715f369
|
@ -118,7 +118,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
|||
}
|
||||
};
|
||||
|
||||
incomingData = stream.getDataBuffer();
|
||||
incomingData = createDataBuffer(stream, logger);
|
||||
Runtime.getRuntime().addShutdownHook(hook);
|
||||
rpmListener = value -> {
|
||||
if (value <= COMPOSITE_OFF_RPM) {
|
||||
|
@ -131,6 +131,12 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
|||
};
|
||||
}
|
||||
|
||||
public static IncomingDataBuffer createDataBuffer(IoStream stream, Logger logger) {
|
||||
IncomingDataBuffer incomingData = new IncomingDataBuffer(logger);
|
||||
stream.setInputListener(incomingData::addData);
|
||||
return incomingData;
|
||||
}
|
||||
|
||||
public static void sleep(int millis) {
|
||||
try {
|
||||
Thread.sleep(millis);
|
||||
|
|
Loading…
Reference in New Issue