@ComponentProfile(summary="Write the current message to the filesystem with large message support", tag="producer,fs,filesystem", recommended=NullConnection.class, metadata={"producedname","fsProduceDir"}) public class LargeFsProducer extends FsProducer
File system implementation of AdaptrisMessageProducer
with large message support.
The configured Destination
may return a string in one of two formats
file
based url is used. e.g. file:///c:/path/to/my/directory or file:////path/to/my/directory then the
patch is considered to be fully qualifiedOn windows based platforms, you should always use a file based url.
Additionally the behaviour of this consumer is subtly different from the standard FsProducer
:
FileBackedMimeEncoder
.FileBackedMessageFactory
FileBackedMessage
, then behaviour is delegated back to the
parent FsProducer
In the adapter configuration file this class is aliased as large-fs-producer which is the preferred alternative to the fully qualified classname when building your configuration.
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
LargeFsProducer() |
LargeFsProducer(ProduceDestination d) |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
getUseRenameTo() |
void |
setUseRenameTo(java.lang.Boolean b)
Set to true to simply use
File.renameTo(File) when producing an
AdaptrisMessage that is an instance of FileBackedMessage |
protected void |
write(AdaptrisMessage msg,
java.io.File destFile) |
addProducerMetadata, close, createTempFile, doProduce, getCreateDirs, getFilenameCreator, getFsWorker, getTempDirectory, init, prepare, produce, setCreateDirs, setFilenameCreator, setFsWorker, setTempDirectory, shouldCreateDirs, start, stop, validateDir
produce, request, request, request, request
getDestination, setDestination
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
getUniqueId
createName, createQualifier, isTrackingEndpoint
public LargeFsProducer()
public LargeFsProducer(ProduceDestination d)
protected void write(AdaptrisMessage msg, java.io.File destFile) throws java.lang.Exception
write
in class FsProducer
java.lang.Exception
public java.lang.Boolean getUseRenameTo()
public void setUseRenameTo(java.lang.Boolean b)
File.renameTo(File)
when producing an
AdaptrisMessage
that is an instance of FileBackedMessage
b
- true to use File.renameTo(File)