Class AgentConnector
java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jdrupes.vmoperator.runner.qemu.QemuConnector
org.jdrupes.vmoperator.runner.qemu.AgentConnector
- All Implemented Interfaces:
Iterable<ComponentType>
,Channel
,ComponentType
,Eligible
,Manager
- Direct Known Subclasses:
GuestAgentClient
,VmopAgentClient
A component that handles the communication with an agent
running in the VM.
If the log level for this class is set to fine, the messages exchanged on the socket are logged.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
-
Field Summary
FieldsFields inherited from class org.jdrupes.vmoperator.runner.qemu.QemuConnector
mapper
-
Constructor Summary
ConstructorsConstructorDescriptionAgentConnector
(Channel componentChannel) Instantiates a new agent connector. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Called when the agent in the VM opens the connection.(package private) void
As the initial configuration of this component depends on the configuration of theRunner
, it doesn’t have a handler for theConfigurationUpdate
event.void
When the virtual serial port with the configured channel id has been opened callagentConnected()
.Methods inherited from class org.jdrupes.vmoperator.runner.qemu.QemuConnector
configure, onClientConnected, onClosed, onConnectError, onFileChanged, onInput, onStart, processInput, 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
-
Field Details
-
channelId
-
-
Constructor Details
-
AgentConnector
Instantiates a new agent connector.- Parameters:
componentChannel
- the component channel- Throws:
IOException
- Signals that an I/O exception has occurred.
-
-
Method Details
-
configure
As the initial configuration of this component depends on the configuration of theRunner
, it doesn’t have a handler for theConfigurationUpdate
event.The values are forwarded from the
Runner
instead.- Parameters:
channelId
- the channel idsocketPath
- the socket path
-
onVserportChanged
When the virtual serial port with the configured channel id has been opened callagentConnected()
.- Parameters:
event
- the event
-
agentConnected
Called when the agent in the VM opens the connection.The default implementation does nothing.
-