public interface SftpFileSystemClientSessionInitializer
SftpFileSystem
via a SftpFileSystemProvider
Modifier and Type | Field and Description |
---|---|
static SftpFileSystemClientSessionInitializer |
DEFAULT |
static final SftpFileSystemClientSessionInitializer DEFAULT
default ClientSession createClientSession(SftpFileSystemProvider provider, SftpFileSystemInitializationContext context) throws IOException
SftpFileSystemProvider.newFileSystem(java.net.URI, Map)
method in order to obtain an
initial (non-authenticated) ClientSession
.provider
- The SftpFileSystemProvider
instance requesting the sessioncontext
- The initialization SftpFileSystemInitializationContext
ClientSession
IOException
- If failed to connectdefault void authenticateClientSession(SftpFileSystemProvider provider, SftpFileSystemInitializationContext context, ClientSession session) throws IOException
SftpFileSystemProvider.newFileSystem(java.net.URI, Map)
method in order to authenticate
the session obtained from
createClientSession(SftpFileSystemProvider, SftpFileSystemInitializationContext)
provider
- The SftpFileSystemProvider
instance requesting the sessioncontext
- The initialization SftpFileSystemInitializationContext
session
- The created ClientSession
IOException
- If failed to authenticatedefault SftpFileSystem createSftpFileSystem(SftpFileSystemProvider provider, SftpFileSystemInitializationContext context, ClientSession session, SftpVersionSelector selector, SftpErrorDataHandler errorDataHandler) throws IOException
SftpFileSystemProvider.newFileSystem(java.net.URI, Map)
method in order to create the
SftpFileSystem
once session has been authenticated.provider
- The SftpFileSystemProvider
instance requesting the sessioncontext
- The initialization SftpFileSystemInitializationContext
session
- The authenticated ClientSession
selector
- The resolved SftpVersionSelector
to useerrorDataHandler
- The SftpErrorDataHandler
to handle incoming data through the error stream - if
null
the data is silently ignoredSftpFileSystem
IOException
- If failed to create the file-systemCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.