Top Inners Fields Constructors Methods
org.apache.sshd.sftp.server

public Class SftpSubsystemFactory

extends AbstractSftpEventListenerManager
implements ManagedExecutorServiceSupplier, SubsystemFactory, SftpFileSystemAccessorManager, SftpSubsystemConfigurator
Class Inheritance
All Implemented Interfaces
org.apache.sshd.sftp.server.SftpSubsystemConfigurator, org.apache.sshd.sftp.server.SftpErrorDataChannelReceiverProvider, org.apache.sshd.sftp.server.SftpErrorStatusDataHandlerProvider, org.apache.sshd.sftp.server.SftpUnsupportedAttributePolicyProvider, org.apache.sshd.sftp.server.SftpFileSystemAccessorProvider, org.apache.sshd.common.util.threads.ExecutorServiceCarrier, org.apache.sshd.sftp.server.SftpFileSystemAccessorManager, org.apache.sshd.server.subsystem.SubsystemFactory, org.apache.sshd.common.NamedResource, org.apache.sshd.common.util.threads.ManagedExecutorServiceSupplier, org.apache.sshd.common.util.threads.ExecutorServiceProvider
Imports
java.io.IOException, java.util.Objects, java.util.function.Supplier, org.apache.sshd.common.util.GenericUtils, .ObjectBuilder, org.apache.sshd.common.util.threads.CloseableExecutorService, .ManagedExecutorServiceSupplier, org.apache.sshd.server.channel.ChannelDataReceiver, .ChannelSession, org.apache.sshd.server.command.Command, org.apache.sshd.server.subsystem.SubsystemFactory, org.apache.sshd.sftp.common.SftpConstants

Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final UnsupportedAttributePolicy
private ChannelDataReceiver
private SftpErrorStatusDataHandler
private Supplier<? extends CloseableExecutorService>
private SftpFileSystemAccessor
public static final String
private UnsupportedAttributePolicy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Command
public ChannelDataReceiver
public SftpErrorStatusDataHandler
public CloseableExecutorService
public Supplier<? extends CloseableExecutorService>
public SftpFileSystemAccessor
public String
public UnsupportedAttributePolicy
public void
public void
public void
setExecutorServiceProvider(Supplier<? extends CloseableExecutorService>
The Supplier of CloseableExecutorService-s to be used when asynchronous execution is required. If null then a single-threaded ad-hoc service is used.
provider
)

Implements org.apache.sshd.common.util.threads.ManagedExecutorServiceSupplier.setExecutorServiceProvider.

public void
public void
setUnsupportedAttributePolicy(UnsupportedAttributePolicy
The UnsupportedAttributePolicy to use if failed to access some local file attributes - never null
p
)

Inherited from org.apache.sshd.sftp.server.AbstractSftpEventListenerManager:
addSftpEventListenergetRegisteredListenersgetSftpEventListenerProxyremoveSftpEventListener

Field Detail

DEFAULT_POLICYback to summary
public static final UnsupportedAttributePolicy DEFAULT_POLICY
errorChannelDataReceiverback to summary
private ChannelDataReceiver errorChannelDataReceiver
errorStatusDataHandlerback to summary
private SftpErrorStatusDataHandler errorStatusDataHandler
executorsProviderback to summary
private Supplier<? extends CloseableExecutorService> executorsProvider
fileSystemAccessorback to summary
private SftpFileSystemAccessor fileSystemAccessor
NAMEback to summary
public static final String NAME
policyback to summary
private UnsupportedAttributePolicy policy

Constructor Detail

SftpSubsystemFactoryback to summary
public SftpSubsystemFactory()

Method Detail

createSubsystemback to summary
public Command createSubsystem(ChannelSession channel) throws IOException

Implements org.apache.sshd.server.subsystem.SubsystemFactory.createSubsystem.

Parameters
channel:ChannelSession

Doc from org.apache.sshd.server.subsystem.SubsystemFactory.createSubsystem.

The ChannelSession through which the command has been received

Returns:Command

Doc from org.apache.sshd.server.subsystem.SubsystemFactory.createSubsystem.

a non null Command instance representing the subsystem to be run

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.sshd.server.subsystem.SubsystemFactory.createSubsystem.

if failed to create the instance

getErrorChannelDataReceiverback to summary
public ChannelDataReceiver getErrorChannelDataReceiver()

Implements org.apache.sshd.sftp.server.SftpErrorDataChannelReceiverProvider.getErrorChannelDataReceiver.

Returns:ChannelDataReceiver

Doc from org.apache.sshd.sftp.server.SftpErrorDataChannelReceiverProvider.getErrorChannelDataReceiver.

A ChannelDataReceiver to handle optional STDERR data received during SFTP session. If null then any received such data is ignored.

Annotations
@Override
getErrorStatusDataHandlerback to summary
public SftpErrorStatusDataHandler getErrorStatusDataHandler()

Implements org.apache.sshd.sftp.server.SftpErrorStatusDataHandlerProvider.getErrorStatusDataHandler.

Returns:SftpErrorStatusDataHandler

Doc from org.apache.sshd.sftp.server.SftpErrorStatusDataHandlerProvider.getErrorStatusDataHandler.

The (never null) SftpErrorStatusDataHandler to use when generating failed commands error messages

Annotations
@Override
getExecutorServiceback to summary
public CloseableExecutorService getExecutorService()

Implements org.apache.sshd.common.util.threads.ExecutorServiceCarrier.getExecutorService.

Returns:CloseableExecutorService

Doc from org.apache.sshd.common.util.threads.ExecutorServiceCarrier.getExecutorService.

The CloseableExecutorService to use

Annotations
@Override
getExecutorServiceProviderback to summary
public Supplier<? extends CloseableExecutorService> getExecutorServiceProvider()

Implements org.apache.sshd.common.util.threads.ExecutorServiceProvider.getExecutorServiceProvider.

Returns:Supplier<? extends CloseableExecutorService>

Doc from org.apache.sshd.common.util.threads.ExecutorServiceProvider.getExecutorServiceProvider.

A Supplier of CloseableExecutorService to be used when asynchronous execution required. If null then a single-threaded ad-hoc service is used.

Annotations
@Override
getFileSystemAccessorback to summary
public SftpFileSystemAccessor getFileSystemAccessor()

Implements org.apache.sshd.sftp.server.SftpFileSystemAccessorProvider.getFileSystemAccessor.

Returns:SftpFileSystemAccessor

Doc from org.apache.sshd.sftp.server.SftpFileSystemAccessorProvider.getFileSystemAccessor.

The SftpFileSystemAccessor to use for accessing files and directories

Annotations
@Override
getNameback to summary
public String getName()

Implements org.apache.sshd.common.NamedResource.getName.

Returns:String

Doc from org.apache.sshd.common.NamedResource.getName.

The resource name

Annotations
@Override
getUnsupportedAttributePolicyback to summary
public UnsupportedAttributePolicy getUnsupportedAttributePolicy()

Implements org.apache.sshd.sftp.server.SftpUnsupportedAttributePolicyProvider.getUnsupportedAttributePolicy.

Returns:UnsupportedAttributePolicy

Doc from org.apache.sshd.sftp.server.SftpUnsupportedAttributePolicyProvider.getUnsupportedAttributePolicy.

The UnsupportedAttributePolicy to use if failed to access some local file attributes

Annotations
@Override
setErrorChannelDataReceiverback to summary
public void setErrorChannelDataReceiver(ChannelDataReceiver errorChannelDataReceiver)
setErrorStatusDataHandlerback to summary
public void setErrorStatusDataHandler(SftpErrorStatusDataHandler handler)
setExecutorServiceProviderback to summary
public void setExecutorServiceProvider(Supplier<? extends CloseableExecutorService> provider)

Implements org.apache.sshd.common.util.threads.ManagedExecutorServiceSupplier.setExecutorServiceProvider.

Parameters
provider:Supplier<? extends CloseableExecutorService>

Doc from org.apache.sshd.common.util.threads.ManagedExecutorServiceSupplier.setExecutorServiceProvider.

The Supplier of CloseableExecutorService-s to be used when asynchronous execution is required. If null then a single-threaded ad-hoc service is used.

Annotations
@Override
setFileSystemAccessorback to summary
public void setFileSystemAccessor(SftpFileSystemAccessor accessor)

Implements org.apache.sshd.sftp.server.SftpFileSystemAccessorManager.setFileSystemAccessor.

Annotations
@Override
setUnsupportedAttributePolicyback to summary
public void setUnsupportedAttributePolicy(UnsupportedAttributePolicy p)
Parameters
p:UnsupportedAttributePolicy

The UnsupportedAttributePolicy to use if failed to access some local file attributes - never null

org.apache.sshd.sftp.server back to summary

public Class SftpSubsystemFactory.Builder

extends AbstractSftpEventListenerManager
implements ObjectBuilder<SftpSubsystemFactory>
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.util.ObjectBuilder, java.util.function.Supplier

Field Summary

Modifier and TypeField and Description
private ChannelDataReceiver
private SftpErrorStatusDataHandler
private Supplier<? extends CloseableExecutorService>
private SftpFileSystemAccessor
private UnsupportedAttributePolicy

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SftpSubsystemFactory
public SftpSubsystemFactory.Builder
public SftpSubsystemFactory.Builder
public SftpSubsystemFactory.Builder
public SftpSubsystemFactory.Builder
public SftpSubsystemFactory.Builder
Inherited from org.apache.sshd.sftp.server.AbstractSftpEventListenerManager:
addSftpEventListenergetRegisteredListenersgetSftpEventListenerProxyremoveSftpEventListener

Field Detail

errorChannelDataReceiverback to summary
private ChannelDataReceiver errorChannelDataReceiver
errorStatusDataHandlerback to summary
private SftpErrorStatusDataHandler errorStatusDataHandler
executorsProviderback to summary
private Supplier<? extends CloseableExecutorService> executorsProvider
fileSystemAccessorback to summary
private SftpFileSystemAccessor fileSystemAccessor
policyback to summary
private UnsupportedAttributePolicy policy

Constructor Detail

Builderback to summary
public Builder()

Method Detail

buildback to summary
public SftpSubsystemFactory build()

Implements org.apache.sshd.common.util.ObjectBuilder.build.

Annotations
@Override
withErrorChannelDataReceiverback to summary
public SftpSubsystemFactory.Builder withErrorChannelDataReceiver(ChannelDataReceiver receiver)
withExecutorServiceProviderback to summary
public SftpSubsystemFactory.Builder withExecutorServiceProvider(Supplier<? extends CloseableExecutorService> provider)
withFileSystemAccessorback to summary
public SftpSubsystemFactory.Builder withFileSystemAccessor(SftpFileSystemAccessor accessor)
withSftpErrorStatusDataHandlerback to summary
public SftpSubsystemFactory.Builder withSftpErrorStatusDataHandler(SftpErrorStatusDataHandler handler)
withUnsupportedAttributePolicyback to summary
public SftpSubsystemFactory.Builder withUnsupportedAttributePolicy(UnsupportedAttributePolicy p)