public class SftpSubsystemFactory extends AbstractSftpEventListenerManager implements SubsystemFactory, ExecutorServiceConfigurer, SftpEventListenerManager, SftpFileSystemAccessorManager
Modifier and Type | Class and Description |
---|---|
static class |
SftpSubsystemFactory.Builder |
Modifier and Type | Field and Description |
---|---|
static UnsupportedAttributePolicy |
DEFAULT_POLICY |
private SftpErrorStatusDataHandler |
errorStatusDataHandler |
private java.util.concurrent.ExecutorService |
executors |
private SftpFileSystemAccessor |
fileSystemAccessor |
static java.lang.String |
NAME |
private UnsupportedAttributePolicy |
policy |
private boolean |
shutdownExecutor |
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Constructor and Description |
---|
SftpSubsystemFactory() |
Modifier and Type | Method and Description |
---|---|
Command |
create() |
SftpErrorStatusDataHandler |
getErrorStatusDataHandler() |
java.util.concurrent.ExecutorService |
getExecutorService() |
SftpFileSystemAccessor |
getFileSystemAccessor() |
java.lang.String |
getName() |
UnsupportedAttributePolicy |
getUnsupportedAttributePolicy() |
boolean |
isShutdownOnExit() |
void |
setErrorStatusDataHandler(SftpErrorStatusDataHandler handler) |
void |
setExecutorService(java.util.concurrent.ExecutorService service) |
void |
setFileSystemAccessor(SftpFileSystemAccessor accessor) |
void |
setShutdownOnExit(boolean shutdownOnExit) |
void |
setUnsupportedAttributePolicy(UnsupportedAttributePolicy p) |
addSftpEventListener, getRegisteredListeners, getSftpEventListenerProxy, removeSftpEventListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, setUpBuiltinFactories, setUpTransformedFactories
findByName, getNameList, getNames, removeByName
addSftpEventListener, getSftpEventListenerProxy, removeSftpEventListener
public static final java.lang.String NAME
public static final UnsupportedAttributePolicy DEFAULT_POLICY
private java.util.concurrent.ExecutorService executors
private boolean shutdownExecutor
private UnsupportedAttributePolicy policy
private SftpFileSystemAccessor fileSystemAccessor
private SftpErrorStatusDataHandler errorStatusDataHandler
public java.lang.String getName()
getName
in interface NamedResource
public java.util.concurrent.ExecutorService getExecutorService()
getExecutorService
in interface ExecutorServiceCarrier
ExecutorService
to usepublic void setExecutorService(java.util.concurrent.ExecutorService service)
setExecutorService
in interface ExecutorServiceConfigurer
service
- The ExecutorService
to be used by the SftpSubsystem
command when starting execution. If null
then a single-threaded ad-hoc service is used.public boolean isShutdownOnExit()
isShutdownOnExit
in interface ExecutorServiceCarrier
true
then the ExecutorService.shutdownNow()
will be called (unless it is an internally allocated service which is always
closed)public void setShutdownOnExit(boolean shutdownOnExit)
setShutdownOnExit
in interface ExecutorServiceConfigurer
shutdownOnExit
- If true
the ExecutorService.shutdownNow()
will be called when subsystem terminates - unless it is the ad-hoc service, which
will be shutdown regardlesspublic UnsupportedAttributePolicy getUnsupportedAttributePolicy()
public void setUnsupportedAttributePolicy(UnsupportedAttributePolicy p)
p
- The UnsupportedAttributePolicy
to use if failed to access
some local file attributes - never null
public SftpFileSystemAccessor getFileSystemAccessor()
getFileSystemAccessor
in interface SftpFileSystemAccessorManager
public void setFileSystemAccessor(SftpFileSystemAccessor accessor)
setFileSystemAccessor
in interface SftpFileSystemAccessorManager
public SftpErrorStatusDataHandler getErrorStatusDataHandler()
public void setErrorStatusDataHandler(SftpErrorStatusDataHandler handler)