Class GuestAgentClient
java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jdrupes.vmoperator.runner.qemu.QemuConnector
org.jdrupes.vmoperator.runner.qemu.AgentConnector
org.jdrupes.vmoperator.runner.qemu.GuestAgentClient
- All Implemented Interfaces:
Iterable<ComponentType>
,Channel
,ComponentType
,Eligible
,Manager
A component that handles the communication with the guest agent.
If the log level for this class is set to fine, the messages exchanged on the monitor socket are logged.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
-
Field Summary
Fields inherited from class org.jdrupes.vmoperator.runner.qemu.AgentConnector
channelId
Fields inherited from class org.jdrupes.vmoperator.runner.qemu.QemuConnector
mapper
-
Constructor Summary
ConstructorsConstructorDescriptionGuestAgentClient
(Channel componentChannel) Instantiates a new guest agent client. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
When the agent has connected, request the OS information.protected void
Called when the agent in the VM closes the connection.void
onConfigureQemu
(ConfigureQemu event) On configure qemu.void
On guest agent command.void
onProcessExited
(ProcessExited event) On process exited.void
Shutdown the VM.protected void
processInput
(String line) Process agent input.Methods inherited from class org.jdrupes.vmoperator.runner.qemu.AgentConnector
configureConnection, onVserportChanged
Methods inherited from class org.jdrupes.vmoperator.runner.qemu.QemuConnector
configure, onClientConnected, onClosed, onConnectError, onFileChanged, onInput, onStart, qemuChannel, rep, sendCommand, socketConnected, writer
Methods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setName
Methods inherited from class org.jgrapes.core.internal.ComponentVertex
activeEventPipeline, addHandler, attach, channelReplacements, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, toString, unregisterAsGenerator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GuestAgentClient
Instantiates a new guest agent client.- Parameters:
componentChannel
- the component channel- Throws:
IOException
- Signals that an I/O exception has occurred.
-
-
Method Details
-
agentConnected
When the agent has connected, request the OS information.- Overrides:
agentConnected
in classAgentConnector
-
agentDisconnected
Description copied from class:AgentConnector
Called when the agent in the VM closes the connection.The default implementation does nothing.
- Overrides:
agentDisconnected
in classAgentConnector
-
processInput
Process agent input.- Specified by:
processInput
in classQemuConnector
- Parameters:
line
- the line- Throws:
IOException
- Signals that an I/O exception has occurred.
-
onGuestAgentCommand
On guest agent command.- Parameters:
event
- the event- Throws:
IOException
- Signals that an I/O exception has occurred.
-
onStop
Shutdown the VM.- Parameters:
event
- the event
-
onProcessExited
On process exited.- Parameters:
event
- the event
-
onConfigureQemu
On configure qemu.- Parameters:
event
- the event
-