com.oneandone.iocunitejb.simulators.sftpclient.SftpConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ioc-unit-simulators Show documentation
Show all versions of ioc-unit-simulators Show documentation
Some serversimulators used ejbcdiunit to build an ejb-test-environment.
package com.oneandone.iocunitejb.simulators.sftpclient;
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.Session;
import com.jcraft.jsch.SftpException;
public class SftpConnection {
private Session session;
private ChannelSftp channel;
private String pwd;
public SftpConnection(Session session, ChannelSftp channel) throws SftpException {
if (session == null) {
throw new IllegalArgumentException("session must not be null");
}
if (channel == null) {
throw new IllegalArgumentException("channel must not be null");
}
this.session = session;
this.channel = channel;
pwd = channel.pwd();
}
public Session getSession() {
return session;
}
public ChannelSftp getChannel() {
return channel;
}
public String getPwd() {
return pwd;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy