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<Message<?>>,- Aware,- BeanClassLoaderAware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- ApplicationContextAware,- Ordered,- ExpressionCapable,- Orderable,- MessageProducer,- HeaderPropagationAware,- IntegrationPattern,- NamedComponent,- IntegrationManagement,- TrackableComponent,- MessageHandler,- reactor.core.CoreSubscriber<Message<?>>
Outbound Gateway for performing remote file operations via SMB.
- Since:
- 6.0
- Author:
- Gregory Bragg
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.integration.file.remote.gateway.AbstractRemoteFileOutboundGatewayAbstractRemoteFileOutboundGateway.Command, AbstractRemoteFileOutboundGateway.OptionNested classes/interfaces inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandlerAbstractReplyProducingMessageHandler.RequestHandlerNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.handler.AbstractMessageProducingHandlermessagingTemplateFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSERFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionSmbOutboundGateway(RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, String command) Construct an instance with the supplied remote file template and command ('ls', 'nlst', 'put' or 'mput').SmbOutboundGateway(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(RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, MessageSessionCallback<jcifs.smb.SmbFile, ?> messageSessionCallback) Construct an instance with the supplied remote file template and callback for performing operations on the session.SmbOutboundGateway(SessionFactory<jcifs.smb.SmbFile> sessionFactory, String command) Construct an instance with the supplied session factory and command ('ls', 'nlst', 'put' or 'mput').SmbOutboundGateway(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(SessionFactory<jcifs.smb.SmbFile> sessionFactory, MessageSessionCallback<jcifs.smb.SmbFile, ?> messageSessionCallback) Construct an instance using the provided session factory and callback for performing operations on the session.
- 
Method SummaryModifier and TypeMethodDescriptionprotected List<AbstractFileInfo<jcifs.smb.SmbFile>>asFileInfoList(Collection<jcifs.smb.SmbFile> files) protected jcifs.smb.SmbFileenhanceNameWithSubDirectory(jcifs.smb.SmbFile file, String directory) Subclasses may implement this method to provide component type information.protected StringgetFilename(jcifs.smb.SmbFile file) protected StringgetFilename(AbstractFileInfo<jcifs.smb.SmbFile> file) protected StringgetFullFileName(String remoteDirectory, jcifs.smb.SmbFile smbFile) By default, this method contacts the remote directory with the remote file name to build a full remote file path.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.AbstractRemoteFileOutboundGatewayassertRemoteFileTemplateMutability, 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.AbstractReplyProducingMessageHandlerdoInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyMethods inherited from class org.springframework.integration.handler.AbstractMessageProducingHandleraddNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, setupMessageProcessor, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeadersMethods inherited from class org.springframework.integration.handler.AbstractMessageHandlerhandleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionMethods inherited from class org.springframework.integration.handler.MessageHandlerSupportbuildSendTimer, destroy, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface reactor.core.CoreSubscribercurrentContextMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName
- 
Constructor Details- 
SmbOutboundGatewaypublic SmbOutboundGateway(SessionFactory<jcifs.smb.SmbFile> sessionFactory, 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.
 
- 
SmbOutboundGatewaypublic SmbOutboundGateway(RemoteFileTemplate<jcifs.smb.SmbFile> remoteFileTemplate, 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.
 
- 
SmbOutboundGatewaypublic SmbOutboundGateway(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.
 
- 
SmbOutboundGatewaypublic SmbOutboundGateway(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.
 
- 
SmbOutboundGatewayConstruct 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.
 
- 
SmbOutboundGatewayConstruct 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- 
getComponentTypeDescription copied from class:IntegrationObjectSupportSubclasses may implement this method to provide component type information.- Specified by:
- getComponentTypein interface- NamedComponent
- Overrides:
- getComponentTypein class- MessageHandlerSupport
 
- 
isDirectoryprotected boolean isDirectory(jcifs.smb.SmbFile file) - Specified by:
- isDirectoryin class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
 
- 
isLinkprotected 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 class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
- Returns:
- false
 
- 
getFilename- Specified by:
- getFilenamein class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
 
- 
getFilename- Specified by:
- getFilenamein class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
 
- 
getModifiedprotected long getModified(jcifs.smb.SmbFile file) - Specified by:
- getModifiedin class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
 
- 
asFileInfoListprotected List<AbstractFileInfo<jcifs.smb.SmbFile>> asFileInfoList(Collection<jcifs.smb.SmbFile> files) - Specified by:
- asFileInfoListin class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
 
- 
enhanceNameWithSubDirectory- Specified by:
- enhanceNameWithSubDirectoryin class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
 
- 
getFullFileNameDescription copied from class:AbstractRemoteFileOutboundGatewayBy default, this method contacts the remote directory with the remote file name to build a full remote file path. The remote file protocol-specific implementation may override this method for other approach.- Overrides:
- getFullFileNamein class- AbstractRemoteFileOutboundGateway<jcifs.smb.SmbFile>
- Parameters:
- remoteDirectory- the directory remote file belongs.
- smbFile- the remote file to take a name and adjust its path according provided remote directory.
- Returns:
- the full path for the remote file
 
 
-