Class SftpEmbeddedInfraService
java.lang.Object
org.apache.camel.test.infra.common.services.AbstractService
org.apache.camel.test.infra.ftp.services.embedded.SftpEmbeddedInfraService
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.test.infra.common.services.InfrastructureService,FtpInfraService
@InfraService(service=FtpInfraService.class,
description="Embedded SFTP Server",
serviceAlias="sftp")
public class SftpEmbeddedInfraService
extends org.apache.camel.test.infra.common.services.AbstractService
implements FtpInfraService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final booleanprotected org.apache.sshd.server.SshServerprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionSftpEmbeddedInfraService(boolean rootDirMode) protectedSftpEmbeddedInfraService(boolean rootDirMode, EmbeddedConfiguration embeddedConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]voidintgetPort()protected org.apache.sshd.server.auth.pubkey.PublickeyAuthenticatorvoidprotected voidregisterProperties(BiConsumer<String, String> store) voidsetUp()voidvoidtearDown()voidMethods inherited from class org.apache.camel.test.infra.common.services.AbstractService
initialize, shutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.test.infra.common.services.InfrastructureService
close, initialize, shutdown
-
Field Details
-
sshd
protected org.apache.sshd.server.SshServer sshd -
rootDirMode
protected final boolean rootDirMode -
port
protected int port -
testDirectory
-
-
Constructor Details
-
SftpEmbeddedInfraService
public SftpEmbeddedInfraService() -
SftpEmbeddedInfraService
public SftpEmbeddedInfraService(boolean rootDirMode) -
SftpEmbeddedInfraService
protected SftpEmbeddedInfraService(boolean rootDirMode, EmbeddedConfiguration embeddedConfiguration)
-
-
Method Details
-
setUp
- Specified by:
setUpin classorg.apache.camel.test.infra.common.services.AbstractService- Throws:
Exception
-
setUpServer
- Throws:
Exception
-
getPublickeyAuthenticator
protected org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator getPublickeyAuthenticator() -
tearDown
public void tearDown()- Specified by:
tearDownin classorg.apache.camel.test.infra.common.services.AbstractService
-
tearDownServer
public void tearDownServer() -
disconnectAllSessions
- Throws:
IOException
-
buildKnownHosts
public byte[] buildKnownHosts() -
getKnownHostsFile
-
getFtpRootDir
- Specified by:
getFtpRootDirin interfaceFtpInfraService
-
registerProperties
- Specified by:
registerPropertiesin classorg.apache.camel.test.infra.common.services.AbstractService
-
registerProperties
public void registerProperties()- Specified by:
registerPropertiesin interfaceorg.apache.camel.test.infra.common.services.InfrastructureService
-
getPort
public int getPort()- Specified by:
getPortin interfaceFtpInfraService
-