org.springframework.integration.sftp.outbound
Class SftpSendingMessageHandler
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.sftp.outbound.SftpSendingMessageHandler
- All Implemented Interfaces:
- BeanFactoryAware, InitializingBean, MessageHandler
public class SftpSendingMessageHandler
- extends AbstractExpressionEvaluator
- implements MessageHandler, InitializingBean
Sends message payloads to a remote SFTP endpoint.
Assumes that the payload of the inbound message is of type File
.
- Since:
- 2.0
Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator |
evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getEvaluationContext, setBeanFactory, setBeanResolver, setConversionService |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SftpSendingMessageHandler
public SftpSendingMessageHandler(SftpSessionPool pool)
setTemporaryBufferFolder
public void setTemporaryBufferFolder(Resource temporaryBufferFolder)
setFileNameGenerator
public void setFileNameGenerator(FileNameGenerator fileNameGenerator)
setRemoteDirectoryExpression
public void setRemoteDirectoryExpression(Expression remoteDirectoryExpression)
setCharset
public void setCharset(java.lang.String charset)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface InitializingBean
- Throws:
java.lang.Exception
handleMessage
public void handleMessage(Message<?> message)
- Description copied from interface:
MessageHandler
- Handles the message if possible. If the handler cannot deal with the
message this will result in a
MessageRejectedException
e.g.
in case of a Selective Consumer. When a consumer tries to handle a
message, but fails to do so, a MessageHandlingException
is
thrown. In the last case it is recommended to treat the message as tainted
and go into an error scenario.
When the handling results in a failure of another message being sent
(e.g. a "reply" message), that failure will trigger a
MessageDeliveryException
.
- Specified by:
handleMessage
in interface MessageHandler
- Parameters:
message
- the message to be handled