Class CachingSessionFactory.CachedSession
java.lang.Object
org.springframework.integration.file.remote.session.CachingSessionFactory.CachedSession
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Session<F>
- Enclosing class:
- CachingSessionFactory<F>
- 
Method SummaryModifier and TypeMethodDescriptionvoidappend(InputStream inputStream, String destination) Append to a file.voidclose()voiddirty()Mark this session as dirty, indicating that it should not be reused and any delegated sessions should be taken care of before closing.booleanCheck if the remote file or directory exists.booleanInvoke after closing the InputStream fromSession.readRaw(String).Get the underlying client library's client instance for this session.Return the host:port pair this session is connected to.booleanisOpen()F[]String[]booleanvoidread(String source, OutputStream os) Retrieve a remote file as a rawInputStream.booleanvoidbooleanRemove a remote directory.voidwrite(InputStream inputStream, String destination) 
- 
Method Details- 
closepublic void close()
- 
remove- Specified by:
- removein interface- Session<F>
- Throws:
- IOException
 
- 
list- Specified by:
- listin interface- Session<F>
- Throws:
- IOException
 
- 
read- Specified by:
- readin interface- Session<F>
- Throws:
- IOException
 
- 
write- Specified by:
- writein interface- Session<F>
- Throws:
- IOException
 
- 
appendDescription copied from interface:SessionAppend to a file.- Specified by:
- appendin interface- Session<F>
- Parameters:
- inputStream- the stream.
- destination- the destination.
- Throws:
- IOException- an IO Exception.
 
- 
isOpenpublic boolean isOpen()
- 
rename- Specified by:
- renamein interface- Session<F>
- Throws:
- IOException
 
- 
mkdir- Specified by:
- mkdirin interface- Session<F>
- Throws:
- IOException
 
- 
rmdirDescription copied from interface:SessionRemove a remote directory.- Specified by:
- rmdirin interface- Session<F>
- Parameters:
- directory- The directory.
- Returns:
- True if the directory was removed.
- Throws:
- IOException- an IO exception.
 
- 
existsDescription copied from interface:SessionCheck if the remote file or directory exists.- Specified by:
- existsin interface- Session<F>
- Parameters:
- path- the remote path.
- Returns:
- trueor- falseif remote path exists or not.
- Throws:
- IOException- an IO exception during remote interaction.
 
- 
listNames- Specified by:
- listNamesin interface- Session<F>
- Throws:
- IOException
 
- 
readRawDescription copied from interface:SessionRetrieve a remote file as a rawInputStream.- Specified by:
- readRawin interface- Session<F>
- Parameters:
- source- The path of the remote file.
- Returns:
- The raw inputStream.
- Throws:
- IOException- Any IOException.
 
- 
finalizeRawDescription copied from interface:SessionInvoke after closing the InputStream fromSession.readRaw(String). Required by some session providers.- Specified by:
- finalizeRawin interface- Session<F>
- Returns:
- true if successful.
- Throws:
- IOException- Any IOException.
 
- 
dirtypublic void dirty()Description copied from interface:SessionMark this session as dirty, indicating that it should not be reused and any delegated sessions should be taken care of before closing.
- 
getClientInstanceDescription copied from interface:SessionGet the underlying client library's client instance for this session. Returns anObjectto avoid significant changes to -file, -ftp, -sftp modules, which would be required if we added another generic parameter. Implementations should narrow the return type.- Specified by:
- getClientInstancein interface- Session<F>
- Returns:
- The client instance.
 
- 
getHostPortDescription copied from interface:SessionReturn the host:port pair this session is connected to.- Specified by:
- getHostPortin interface- Session<F>
- Returns:
- the host:port pair this session is connected to.
 
 
-