Class RetrieverImpl
- java.lang.Object
-
- org.opennms.features.deviceconfig.retrieval.impl.RetrieverImpl
-
- All Implemented Interfaces:
AutoCloseable
,Retriever
public class RetrieverImpl extends Object implements Retriever, AutoCloseable
Orchestrates device config retrieval.Device config uploads are triggered using the SshScriptingService and files received by a tft server are processed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.features.deviceconfig.retrieval.api.Retriever
Retriever.Failure, Retriever.Protocol, Retriever.Success
-
-
Constructor Summary
Constructors Constructor Description RetrieverImpl(SshScriptingService sshScriptingService, TftpServer tftpServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
CompletionStage<io.vavr.control.Either<Retriever.Failure,Retriever.Success>>
retrieveConfig(Retriever.Protocol protocol, String script, String user, String password, SocketAddress target, String hostKeyFingerprint, String configType, Map<String,String> vars, java.time.Duration timeout)
Asks devices to upload their configuration by executing the given script and accepts the uploaded data.
-
-
-
Constructor Detail
-
RetrieverImpl
public RetrieverImpl(SshScriptingService sshScriptingService, TftpServer tftpServer)
-
-
Method Detail
-
retrieveConfig
public CompletionStage<io.vavr.control.Either<Retriever.Failure,Retriever.Success>> retrieveConfig(Retriever.Protocol protocol, String script, String user, String password, SocketAddress target, String hostKeyFingerprint, String configType, Map<String,String> vars, java.time.Duration timeout)
Description copied from interface:Retriever
Asks devices to upload their configuration by executing the given script and accepts the uploaded data.- Specified by:
retrieveConfig
in interfaceRetriever
- Returns:
- The returned completion stage is guaranteed to complete successfully, i.e. timeouts and all other
kinds of failures are returned as a
Failure
instances.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-