Class SmbOutboundGateway
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractMessageProducingHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
org.springframework.integration.smb.outbound.SmbOutboundGateway
- All Implemented Interfaces:
org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.core.Ordered,org.springframework.integration.context.ExpressionCapable,org.springframework.integration.context.Orderable,org.springframework.integration.core.MessageProducer,org.springframework.integration.handler.HeaderPropagationAware,org.springframework.integration.IntegrationPattern,org.springframework.integration.support.context.NamedComponent,org.springframework.integration.support.management.IntegrationManagement,org.springframework.integration.support.management.TrackableComponent,org.springframework.messaging.MessageHandler,reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>
public class SmbOutboundGateway
extends org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
Outbound Gateway for performing remote file operations via SMB.
- Since:
- 6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway
org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.Command, org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway.OptionNested classes/interfaces inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler.RequestHandlerNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.handler.AbstractMessageProducingHandler
messagingTemplateFields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSERFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionSmbOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, String command) Construct an instance with the supplied remote file template and command ('ls', 'nlst', 'put' or 'mput').SmbOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, String command, String expression) Construct an instance with the supplied remote file template, a command ('ls', 'get' etc), and an expression to determine the filename.SmbOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, org.springframework.integration.file.remote.MessageSessionCallback<jcifs.smb.SmbFile, ?> messageSessionCallback) Construct an instance with the supplied remote file template and callback for performing operations on the session.SmbOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<jcifs.smb.SmbFile> sessionFactory, String command) Construct an instance with the supplied session factory and command ('ls', 'nlst', 'put' or 'mput').SmbOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<jcifs.smb.SmbFile> sessionFactory, String command, String expression) Construct an instance with the supplied session factory, a command ('ls', 'get' etc), and an expression to determine the filename.SmbOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<jcifs.smb.SmbFile> sessionFactory, org.springframework.integration.file.remote.MessageSessionCallback<jcifs.smb.SmbFile, ?> messageSessionCallback) Construct an instance using the provided session factory and callback for performing operations on the session. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.springframework.integration.file.remote.AbstractFileInfo<jcifs.smb.SmbFile>>asFileInfoList(Collection<jcifs.smb.SmbFile> files) protected jcifs.smb.SmbFileenhanceNameWithSubDirectory(jcifs.smb.SmbFile file, String directory) protected StringgetFilename(jcifs.smb.SmbFile file) protected StringgetFilename(org.springframework.integration.file.remote.AbstractFileInfo<jcifs.smb.SmbFile> file) protected longgetModified(jcifs.smb.SmbFile file) protected booleanisDirectory(jcifs.smb.SmbFile file) protected booleanisLink(jcifs.smb.SmbFile file) Symbolic links are currently not supported in the JCIFS v2.x.x dependent library, so this method will always return false.Methods inherited from class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway
assertRemoteFileTemplateMutability, doChmod, doInit, filterFile, filterFiles, filterMputFiles, get, getRemoteFilename, getRemoteFileTemplate, handleRequestMessage, isChmodCapable, ls, mGet, mPut, mv, nlst, purgeDots, purgeLinks, put, remoteFileTemplateExplicitlySet, rm, setAutoCreateDirectory, setAutoCreateLocalDirectory, setCharset, setChmod, setChmodOctal, setFileExistsMode, setFileNameExpression, setFileNameGenerator, setFilter, setLocalDirectory, setLocalDirectoryExpression, setLocalDirectoryExpressionString, setLocalFilenameGeneratorExpression, setLocalFilenameGeneratorExpressionString, setMputFilter, setOption, setOptions, setRemoteDirectoryExpression, setRemoteFileSeparator, setRenameExpression, setRenameExpressionString, setTemporaryFileSuffix, setTemporaryRemoteDirectoryExpression, setUseTemporaryFileNameMethods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
doInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyMethods inherited from class org.springframework.integration.handler.AbstractMessageProducingHandler
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeadersMethods inherited from class org.springframework.integration.handler.AbstractMessageHandler
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionMethods inherited from class org.springframework.integration.handler.MessageHandlerSupport
buildSendTimer, destroy, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface reactor.core.CoreSubscriber
currentContextMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
SmbOutboundGateway
public SmbOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<jcifs.smb.SmbFile> sessionFactory, org.springframework.integration.file.remote.MessageSessionCallback<jcifs.smb.SmbFile, ?> messageSessionCallback) Construct an instance using the provided session factory and callback for performing operations on the session.- Parameters:
sessionFactory- the session factory.messageSessionCallback- the callback.
-
SmbOutboundGateway
public SmbOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, org.springframework.integration.file.remote.MessageSessionCallback<jcifs.smb.SmbFile, ?> messageSessionCallback) Construct an instance with the supplied remote file template and callback for performing operations on the session.- Parameters:
remoteFileTemplate- the remote file template.messageSessionCallback- the callback.
-
SmbOutboundGateway
public SmbOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<jcifs.smb.SmbFile> sessionFactory, String command, String expression) Construct an instance with the supplied session factory, a command ('ls', 'get' etc), and an expression to determine the filename.- Parameters:
sessionFactory- the session factory.command- the command.expression- the filename expression.
-
SmbOutboundGateway
public SmbOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, String command, String expression) Construct an instance with the supplied remote file template, a command ('ls', 'get' etc), and an expression to determine the filename.- Parameters:
remoteFileTemplate- the remote file template.command- the command.expression- the filename expression.
-
SmbOutboundGateway
public SmbOutboundGateway(org.springframework.integration.file.remote.session.SessionFactory<jcifs.smb.SmbFile> sessionFactory, String command) Construct an instance with the supplied session factory and command ('ls', 'nlst', 'put' or 'mput').The
remoteDirectoryexpression isnullassuming to use theworkingDirectoryfrom the SMB Client.- Parameters:
sessionFactory- the session factory.command- the command.
-
SmbOutboundGateway
public SmbOutboundGateway(org.springframework.integration.file.remote.RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, String command) Construct an instance with the supplied remote file template and command ('ls', 'nlst', 'put' or 'mput').The
remoteDirectoryexpression isnullassuming to use theworkingDirectoryfrom the SMB Client.- Parameters:
remoteFileTemplate- the remote file template.command- the command.
-
-
Method Details
-
getComponentType
- Specified by:
getComponentTypein interfaceorg.springframework.integration.support.context.NamedComponent- Overrides:
getComponentTypein classorg.springframework.integration.handler.MessageHandlerSupport
-
isDirectory
protected boolean isDirectory(jcifs.smb.SmbFile file) - Specified by:
isDirectoryin classorg.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
-
isLink
protected boolean isLink(jcifs.smb.SmbFile file) Symbolic links are currently not supported in the JCIFS v2.x.x dependent library, so this method will always return false.- Specified by:
isLinkin classorg.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>- Returns:
- false
-
getFilename
- Specified by:
getFilenamein classorg.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
-
getFilename
protected String getFilename(org.springframework.integration.file.remote.AbstractFileInfo<jcifs.smb.SmbFile> file) - Specified by:
getFilenamein classorg.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
-
getModified
protected long getModified(jcifs.smb.SmbFile file) - Specified by:
getModifiedin classorg.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
-
asFileInfoList
protected List<org.springframework.integration.file.remote.AbstractFileInfo<jcifs.smb.SmbFile>> asFileInfoList(Collection<jcifs.smb.SmbFile> files) - Specified by:
asFileInfoListin classorg.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
-
enhanceNameWithSubDirectory
- Specified by:
enhanceNameWithSubDirectoryin classorg.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
-