Class SshCache.Entry

  • Enclosing class:
    SshCache

    private class SshCache.Entry
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.jcraft.jsch.ChannelSftp channelSftp  
      private java.lang.String host  
      private int port  
      private com.jcraft.jsch.Session session  
      private java.lang.String user  
    • Constructor Summary

      Constructors 
      Constructor Description
      Entry​(com.jcraft.jsch.Session newSession, java.lang.String newUser, java.lang.String newHost, int newPort)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.jcraft.jsch.ChannelSftp getChannelSftp()  
      java.lang.String getHost()  
      int getPort()  
      private com.jcraft.jsch.Session getSession()  
      java.lang.String getUser()  
      void releaseChannelSftp()
      remove channelSftp and disconnect if necessary
      void setChannelSftp​(com.jcraft.jsch.ChannelSftp newChannel)
      attach an sftp channel to this cache entry
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • session

        private com.jcraft.jsch.Session session
      • channelSftp

        private com.jcraft.jsch.ChannelSftp channelSftp
      • host

        private java.lang.String host
      • user

        private java.lang.String user
      • port

        private int port
    • Constructor Detail

      • Entry

        public Entry​(com.jcraft.jsch.Session newSession,
                     java.lang.String newUser,
                     java.lang.String newHost,
                     int newPort)
    • Method Detail

      • getHost

        public java.lang.String getHost()
        Returns:
        the host
      • getPort

        public int getPort()
        Returns:
        the port
      • getUser

        public java.lang.String getUser()
        Returns:
        the user
      • setChannelSftp

        public void setChannelSftp​(com.jcraft.jsch.ChannelSftp newChannel)
        attach an sftp channel to this cache entry
        Parameters:
        newChannel - to attach
      • getChannelSftp

        public com.jcraft.jsch.ChannelSftp getChannelSftp()
        Returns:
        the attached sftp channel
      • getSession

        private com.jcraft.jsch.Session getSession()
        Returns:
        the session
      • releaseChannelSftp

        public void releaseChannelSftp()
        remove channelSftp and disconnect if necessary