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,org.apache.sshd.common.util.threads.ExecutorServiceCarrier,org.apache.sshd.common.util.threads.ExecutorServiceProvider,org.apache.sshd.common.util.threads.ManagedExecutorServiceSupplier,SubsystemFactory,SftpErrorDataChannelReceiverProvider,SftpErrorStatusDataHandlerProvider,SftpEventListenerManager,SftpFileSystemAccessorManager,SftpFileSystemAccessorProvider,SftpSubsystemConfigurator,SftpUnsupportedAttributePolicyProvider
public class SftpSubsystemFactory extends AbstractSftpEventListenerManager implements org.apache.sshd.common.util.threads.ManagedExecutorServiceSupplier, SubsystemFactory, SftpEventListenerManager, SftpFileSystemAccessorManager, SftpSubsystemConfigurator
- Author:
- Apache MINA SSHD Project
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSftpSubsystemFactory.Builder
-
Field Summary
Fields Modifier and Type Field Description static UnsupportedAttributePolicyDEFAULT_POLICYstatic StringNAME-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Constructor Summary
Constructors Constructor Description SftpSubsystemFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandcreateSubsystem(ChannelSession channel)ChannelDataReceivergetErrorChannelDataReceiver()SftpErrorStatusDataHandlergetErrorStatusDataHandler()org.apache.sshd.common.util.threads.CloseableExecutorServicegetExecutorService()Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService>getExecutorServiceProvider()SftpFileSystemAccessorgetFileSystemAccessor()StringgetName()UnsupportedAttributePolicygetUnsupportedAttributePolicy()voidsetErrorChannelDataReceiver(ChannelDataReceiver errorChannelDataReceiver)voidsetErrorStatusDataHandler(SftpErrorStatusDataHandler handler)voidsetExecutorServiceProvider(Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> provider)voidsetFileSystemAccessor(SftpFileSystemAccessor accessor)voidsetUnsupportedAttributePolicy(UnsupportedAttributePolicy p)-
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 Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
DEFAULT_POLICY
public static final UnsupportedAttributePolicy DEFAULT_POLICY
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceNamedResource
-
getExecutorServiceProvider
public Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> getExecutorServiceProvider()
- Specified by:
getExecutorServiceProviderin interfaceorg.apache.sshd.common.util.threads.ExecutorServiceProvider
-
setExecutorServiceProvider
public void setExecutorServiceProvider(Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> provider)
- Specified by:
setExecutorServiceProviderin interfaceorg.apache.sshd.common.util.threads.ManagedExecutorServiceSupplier
-
getUnsupportedAttributePolicy
public UnsupportedAttributePolicy getUnsupportedAttributePolicy()
- Specified by:
getUnsupportedAttributePolicyin interfaceSftpUnsupportedAttributePolicyProvider- Returns:
- The
UnsupportedAttributePolicyto use if failed to access some local file attributes
-
setUnsupportedAttributePolicy
public void setUnsupportedAttributePolicy(UnsupportedAttributePolicy p)
- Parameters:
p- TheUnsupportedAttributePolicyto use if failed to access some local file attributes - nevernull
-
getFileSystemAccessor
public SftpFileSystemAccessor getFileSystemAccessor()
- Specified by:
getFileSystemAccessorin interfaceSftpFileSystemAccessorProvider- Returns:
- The
SftpFileSystemAccessorto use for accessing files and directories
-
setFileSystemAccessor
public void setFileSystemAccessor(SftpFileSystemAccessor accessor)
- Specified by:
setFileSystemAccessorin interfaceSftpFileSystemAccessorManager
-
getErrorStatusDataHandler
public SftpErrorStatusDataHandler getErrorStatusDataHandler()
- Specified by:
getErrorStatusDataHandlerin interfaceSftpErrorStatusDataHandlerProvider- Returns:
- The (never
null)SftpErrorStatusDataHandlerto use when generating failed commands error messages
-
setErrorStatusDataHandler
public void setErrorStatusDataHandler(SftpErrorStatusDataHandler handler)
-
getExecutorService
public org.apache.sshd.common.util.threads.CloseableExecutorService getExecutorService()
- Specified by:
getExecutorServicein interfaceorg.apache.sshd.common.util.threads.ExecutorServiceCarrier
-
getErrorChannelDataReceiver
public ChannelDataReceiver getErrorChannelDataReceiver()
- Specified by:
getErrorChannelDataReceiverin interfaceSftpErrorDataChannelReceiverProvider- Returns:
- A
ChannelDataReceiverto handle optional STDERR data received during SFTP session. Ifnullthen any received such data is ignored.
-
setErrorChannelDataReceiver
public void setErrorChannelDataReceiver(ChannelDataReceiver errorChannelDataReceiver)
-
createSubsystem
public Command createSubsystem(ChannelSession channel) throws IOException
- Specified by:
createSubsystemin interfaceSubsystemFactory- Throws:
IOException
-
-