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 Details

    • sshd

      protected org.apache.sshd.server.SshServer sshd
    • rootDirMode

      protected final boolean rootDirMode
    • port

      protected int port
    • testDirectory

      protected String testDirectory
  • Constructor Details

    • SftpEmbeddedInfraService

      public SftpEmbeddedInfraService()
    • SftpEmbeddedInfraService

      public SftpEmbeddedInfraService(boolean rootDirMode)
    • SftpEmbeddedInfraService

      protected SftpEmbeddedInfraService(boolean rootDirMode, EmbeddedConfiguration embeddedConfiguration)
  • Method Details

    • setUp

      public void setUp() throws Exception
      Specified by:
      setUp in class org.apache.camel.test.infra.common.services.AbstractService
      Throws:
      Exception
    • setUpServer

      public void setUpServer() throws Exception
      Throws:
      Exception
    • getPublickeyAuthenticator

      protected org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator getPublickeyAuthenticator()
    • tearDown

      public void tearDown()
      Specified by:
      tearDown in class org.apache.camel.test.infra.common.services.AbstractService
    • tearDownServer

      public void tearDownServer()
    • disconnectAllSessions

      public void disconnectAllSessions() throws IOException
      Throws:
      IOException
    • buildKnownHosts

      public byte[] buildKnownHosts()
    • getKnownHostsFile

      public String getKnownHostsFile()
    • getFtpRootDir

      public Path getFtpRootDir()
      Specified by:
      getFtpRootDir in interface FtpInfraService
    • registerProperties

      protected void registerProperties(BiConsumer<String,String> store)
      Specified by:
      registerProperties in class org.apache.camel.test.infra.common.services.AbstractService
    • registerProperties

      public void registerProperties()
      Specified by:
      registerProperties in interface org.apache.camel.test.infra.common.services.InfrastructureService
    • getPort

      public int getPort()
      Specified by:
      getPort in interface FtpInfraService