org.springframework.integration.sftp
Class SftpSendingMessageHandler
java.lang.Object
org.springframework.integration.sftp.SftpSendingMessageHandler
- All Implemented Interfaces:
- InitializingBean, MessageHandler
public class SftpSendingMessageHandler
- extends java.lang.Object
- 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 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)
setRemoteDirectory
public void setRemoteDirectory(java.lang.String remoteDirectory)
getRemoteDirectory
public java.lang.String getRemoteDirectory()
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