Structure documentation.
This commit is contained in:
parent
f788724881
commit
ba7147ba0e
4 changed files with 18 additions and 27 deletions
|
|
@ -53,12 +53,15 @@ import org.jgrapes.util.events.WatchFile;
|
|||
/**
|
||||
* A component that handles the communication over the Qemu monitor
|
||||
* socket.
|
||||
*
|
||||
* If the log level for this class is set to fine, the messages
|
||||
* exchanged on the monitor socket are logged.
|
||||
*/
|
||||
public class QemuMonitor extends Component {
|
||||
|
||||
@SuppressWarnings({ "PMD.FieldNamingConventions",
|
||||
"PMD.VariableNamingConventions" })
|
||||
private static final Logger monitorLog
|
||||
private static final Logger logger
|
||||
= Logger.getLogger(QemuMonitor.class.getName());
|
||||
|
||||
@SuppressWarnings("PMD.UseConcurrentHashMap")
|
||||
|
|
@ -165,7 +168,7 @@ public class QemuMonitor extends Component {
|
|||
}
|
||||
|
||||
private void writeToMonitor(String message) {
|
||||
monitorLog.fine(() -> "monitor(out): " + message);
|
||||
logger.fine(() -> "monitor(out): " + message);
|
||||
monitorChannel.associated(Writer.class).ifPresent(writer -> {
|
||||
try {
|
||||
writer.append(message).append('\n').flush();
|
||||
|
|
@ -194,7 +197,7 @@ public class QemuMonitor extends Component {
|
|||
|
||||
private void processMonitorInput(String line)
|
||||
throws IOException {
|
||||
monitorLog.fine(() -> "monitor(in): " + line);
|
||||
logger.fine(() -> "monitor(in): " + line);
|
||||
try {
|
||||
var response
|
||||
= ((Runner) channel()).mapper().readValue(line, JsonNode.class);
|
||||
|
|
|
|||
|
|
@ -72,15 +72,12 @@ import org.jgrapes.util.events.InitialConfiguration;
|
|||
import org.jgrapes.util.events.WatchFile;
|
||||
|
||||
/**
|
||||
* The Runner is responsible for manageing the Qemu process and
|
||||
* optionally a process that emulates a TPM (software TPM). It
|
||||
* it's function is best described by a state diagram.
|
||||
* The Runner is responsible for managing the Qemu process and
|
||||
* optionally a process that emulates a TPM (software TPM). It's
|
||||
* main function is best described by the following state diagram.
|
||||
*
|
||||
* 
|
||||
*
|
||||
* If the log level for `org.jdrupes.vmoperator.runner.qemu.monitor`
|
||||
* is set to fine, the messages exchanged on the monitor socket are logged.
|
||||
*
|
||||
* @startuml RunnerStates.svg
|
||||
* [*] --> Initializing
|
||||
* Initializing -> Initializing: InitialConfiguration/configure Runner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue