Interface PacketUploader<S,​C>

  • Type Parameters:
    S - the type of packet server configurations
    C - the type of SFTP-channel

    public interface PacketUploader<S,​C>
    Interface for Packet Uploader SFTP
    Since:
    1.0.0
    Author:
    Urvil Joshi
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      C createSFTPChannel​(S sftpServer)
      This creates and connects SFTP channel based on configutaions
      void releaseConnection​(C sftpChannel)
      This releases the obtained Connection to server
      void upload​(C sftpChannel, String source)
      Uploads file to server (this method will not create destination folder it should be already present)
    • Method Detail

      • createSFTPChannel

        C createSFTPChannel​(S sftpServer)
        This creates and connects SFTP channel based on configutaions
        Parameters:
        sftpServer - packet server configurations provided by user
        Returns:
        configured SFTP-channel instance
      • upload

        void upload​(C sftpChannel,
                    String source)
        Uploads file to server (this method will not create destination folder it should be already present)
        Parameters:
        sftpChannel - configured SFTP-channel instance
        source - path of packet to be uploaded
      • releaseConnection

        void releaseConnection​(C sftpChannel)
        This releases the obtained Connection to server
        Parameters:
        sftpChannel - configured SFTP-channel instance