org.springframework.integration.adapter.file
Class AbstractFileMapper<T>
java.lang.Object
org.springframework.integration.message.AbstractMessageMapper<T,java.io.File>
org.springframework.integration.adapter.file.AbstractFileMapper<T>
- All Implemented Interfaces:
- MessageMapper<T,java.io.File>
- Direct Known Subclasses:
- ByteArrayFileMapper, TextFileMapper
public abstract class AbstractFileMapper<T>
- extends AbstractMessageMapper<T,java.io.File>
Base class providing common behavior for file-based message mappers.
- Author:
- Mark Fisher
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.apache.commons.logging.Log logger
AbstractFileMapper
public AbstractFileMapper(java.io.File parentDirectory)
setBackupDirectory
public void setBackupDirectory(java.io.File backupDirectory)
setFileNameGenerator
public void setFileNameGenerator(FileNameGenerator fileNameGenerator)
fromMessage
public java.io.File fromMessage(Message<T> message)
- Description copied from interface:
MessageMapper
- Map from the given
Message
to an object.
toMessage
public Message<T> toMessage(java.io.File file)
- Description copied from interface:
MessageMapper
- Map to a
Message
from the given object.
readMessagePayload
protected abstract T readMessagePayload(java.io.File file)
throws java.lang.Exception
- Throws:
java.lang.Exception
writeToFile
protected abstract void writeToFile(java.io.File file,
T payload)
throws java.lang.Exception
- Throws:
java.lang.Exception