public class SftpSession extends ObjectSE implements Session<com.jcraft.jsch.ChannelSftp.LsEntry>
Session 実装。JSCH セッションインスタンスをラップします。| コンストラクターと説明 |
|---|
SftpSession(org.springframework.integration.sftp.session.JSchSessionWrapper wrapper) |
SftpSession(com.jcraft.jsch.Session jschSession) |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | append(InputStreamSE inputStream, StringSE destination) ファイルに追加します。 |
void | close() |
boolean | exists(StringSE path) リモートファイルまたはディレクトリが存在するかどうかを確認します。 |
boolean | finalizeRaw()Session.readRaw(String) から InputStream を閉じた後に呼び出します。 |
com.jcraft.jsch.ChannelSftp | getClientInstance() このセッションの基礎となるクライアントライブラリのクライアントインスタンスを取得します。 |
StringSE | getHostPort() このセッションが接続されているホストとポートのペアを返します。 |
boolean | isOpen() |
com.jcraft.jsch.ChannelSftp.LsEntry[] | list(StringSE path) |
StringSE[] | listNames(StringSE path) |
boolean | mkdir(StringSE remoteDirectory) |
void | read(StringSE source, OutputStreamSE os) |
InputStreamSE | readRaw(StringSE source) リモートファイルを生の InputStreamSE として取得します。 |
boolean | remove(StringSE path) |
void | rename(StringSE pathFrom, StringSE pathTo) |
boolean | rmdir(StringSE remoteDirectory) リモートディレクトリを削除します。 |
void | setChannelConnectTimeout(java.time.Duration timeout) 接続タイムアウトを設定します。 |
boolean | test() セッションがまだ生きていることをテストします。 |
void | write(InputStreamSE inputStream, StringSE destination) |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic SftpSession(com.jcraft.jsch.Session jschSession)
public SftpSession(org.springframework.integration.sftp.session.JSchSessionWrapper wrapper)
public void setChannelConnectTimeout(java.time.Duration timeout)
timeout - 設定するタイムアウト。public boolean remove(StringSE path) throws IOExceptionSE
Session<com.jcraft.jsch.ChannelSftp.LsEntry> の remove IOExceptionSEpublic com.jcraft.jsch.ChannelSftp.LsEntry[] list(StringSE path) throws IOExceptionSE
Session<com.jcraft.jsch.ChannelSftp.LsEntry> の list IOExceptionSEpublic StringSE[] listNames(StringSE path) throws IOExceptionSE
Session<com.jcraft.jsch.ChannelSftp.LsEntry> の listNames IOExceptionSEpublic void read(StringSE source, OutputStreamSE os) throws IOExceptionSE
Session<com.jcraft.jsch.ChannelSftp.LsEntry> の read IOExceptionSEpublic InputStreamSE readRaw(StringSE source) throws IOExceptionSE
SessionInputStreamSE として取得します。Session<com.jcraft.jsch.ChannelSftp.LsEntry> の readRaw source - リモートファイルのパス。IOExceptionSE - IOException。public boolean finalizeRaw()
SessionSession.readRaw(String) から InputStream を閉じた後に呼び出します。一部のセッションプロバイダーで必要です。Session<com.jcraft.jsch.ChannelSftp.LsEntry> の finalizeRaw public void write(InputStreamSE inputStream, StringSE destination) throws IOExceptionSE
Session<com.jcraft.jsch.ChannelSftp.LsEntry> の write IOExceptionSEpublic void append(InputStreamSE inputStream, StringSE destination) throws IOExceptionSE
SessionSession<com.jcraft.jsch.ChannelSftp.LsEntry> の append inputStream - ストリーム。destination - 宛先。IOExceptionSE - IO 例外。public void close()
CloseableSE の closeSE AutoCloseableSE の closeSE Session<com.jcraft.jsch.ChannelSftp.LsEntry> の close public void rename(StringSE pathFrom, StringSE pathTo) throws IOExceptionSE
Session<com.jcraft.jsch.ChannelSftp.LsEntry> の rename IOExceptionSEpublic boolean mkdir(StringSE remoteDirectory) throws IOExceptionSE
Session<com.jcraft.jsch.ChannelSftp.LsEntry> の mkdir IOExceptionSEpublic boolean rmdir(StringSE remoteDirectory) throws IOExceptionSE
SessionSession<com.jcraft.jsch.ChannelSftp.LsEntry> の rmdir remoteDirectory - ディレクトリ。IOExceptionSE - IO 例外。public boolean exists(StringSE path)
Sessionpublic com.jcraft.jsch.ChannelSftp getClientInstance()
SessionObject を返します。これは、別のジェネリクスパラメーターを追加した場合に必要になります。実装では、戻り値の型を絞り込む必要があります。Session<com.jcraft.jsch.ChannelSftp.LsEntry> の getClientInstance public StringSE getHostPort()
SessionSession<com.jcraft.jsch.ChannelSftp.LsEntry> の getHostPort public boolean test()
SessionSession.isOpen() に委譲します。