Package org.apache.sshd.sftp.server
Class SftpSubsystemFactory
java.lang.Object
org.apache.sshd.sftp.server.AbstractSftpEventListenerManager
org.apache.sshd.sftp.server.SftpSubsystemFactory
- All Implemented Interfaces:
NamedResource
,ExecutorServiceProvider
,ManagedExecutorServiceSupplier
,SubsystemFactory
,SftpEventListenerManager
,SftpFileSystemAccessorManager
public class SftpSubsystemFactory
extends AbstractSftpEventListenerManager
implements ManagedExecutorServiceSupplier, SubsystemFactory, SftpEventListenerManager, SftpFileSystemAccessorManager
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UnsupportedAttributePolicy
private SftpErrorStatusDataHandler
private Supplier<? extends CloseableExecutorService>
private SftpFileSystemAccessor
static final String
private UnsupportedAttributePolicy
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSubsystem
(ChannelSession channel) Supplier<? extends CloseableExecutorService>
getName()
void
void
setExecutorServiceProvider
(Supplier<? extends CloseableExecutorService> provider) void
setFileSystemAccessor
(SftpFileSystemAccessor accessor) void
Methods inherited from class org.apache.sshd.sftp.server.AbstractSftpEventListenerManager
addSftpEventListener, getRegisteredListeners, getSftpEventListenerProxy, removeSftpEventListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.util.threads.ExecutorServiceProvider
resolveExecutorService
Methods inherited from interface org.apache.sshd.sftp.server.SftpEventListenerManager
addSftpEventListener, getSftpEventListenerProxy, removeSftpEventListener
-
Field Details
-
NAME
- See Also:
-
DEFAULT_POLICY
-
executorsProvider
-
policy
-
fileSystemAccessor
-
errorStatusDataHandler
-
-
Constructor Details
-
SftpSubsystemFactory
public SftpSubsystemFactory()
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceNamedResource
- Returns:
- The resource name
-
getExecutorServiceProvider
- Specified by:
getExecutorServiceProvider
in interfaceExecutorServiceProvider
- Returns:
- A
Supplier
ofCloseableExecutorService
to be used when asynchronous execution required. Ifnull
then a single-threaded ad-hoc service is used.
-
setExecutorServiceProvider
- Specified by:
setExecutorServiceProvider
in interfaceManagedExecutorServiceSupplier
- Parameters:
provider
- TheSupplier
ofCloseableExecutorService
-s to be used when asynchronous execution is required. Ifnull
then a single-threaded ad-hoc service is used.
-
getUnsupportedAttributePolicy
-
setUnsupportedAttributePolicy
- Parameters:
p
- TheUnsupportedAttributePolicy
to use if failed to access some local file attributes - nevernull
-
getFileSystemAccessor
- Specified by:
getFileSystemAccessor
in interfaceSftpFileSystemAccessorManager
-
setFileSystemAccessor
- Specified by:
setFileSystemAccessor
in interfaceSftpFileSystemAccessorManager
-
getErrorStatusDataHandler
-
setErrorStatusDataHandler
-
createSubsystem
- Specified by:
createSubsystem
in interfaceSubsystemFactory
- Parameters:
channel
- TheChannelSession
through which the command has been received- Returns:
- a non
null
Command
instance representing the subsystem to be run - Throws:
IOException
- if failed to create the instance
-