Package com.adaptris.core.lms
Class LargeFsProducer
- java.lang.Object
-
- com.adaptris.core.AdaptrisMessageWorkerImp
-
- com.adaptris.core.AdaptrisMessageProducerImp
-
- com.adaptris.core.ProduceOnlyProducerImp
-
- com.adaptris.core.fs.FsProducer
-
- com.adaptris.core.lms.LargeFsProducer
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisMessageProducer
,AdaptrisMessageSender
,AdaptrisMessageWorker
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
@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- If a
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 qualified - If just a path is returned, then it is considered to be relative to the current working directory. e.g. if /opt/fred is used, and the adapter is installed to /opt/adapter, then the fully qualified name is /opt/adapter/opt/fred.
On windows based platforms, you should always use a file based url.
Additionally the behaviour of this consumer is subtly different from the standard
FsProducer
:- Encoding is only supported if you use a
FileBackedMimeEncoder
. - The default AdaptrisMessageFactory implementation is
FileBackedMessageFactory
- If, at runtime, the AdaptrisMessage implementation is not
FileBackedMessage
, then behaviour is delegated back to the parentFsProducer
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.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log
-
-
Constructor Summary
Constructors Constructor Description LargeFsProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
getUseRenameTo()
void
setUseRenameTo(java.lang.Boolean b)
Set to true to simply useFile.renameTo(File)
when producing anAdaptrisMessage
that is an instance ofFileBackedMessage
protected void
write(AdaptrisMessage msg, java.io.File destFile)
-
Methods inherited from class com.adaptris.core.fs.FsProducer
addProducerMetadata, createTempFile, doProduce, endpoint, getBaseDirectoryUrl, getCreateDirs, getFilenameCreator, getFsWorker, getTempDirectory, prepare, setBaseDirectoryUrl, setCreateDirs, setFilenameCreator, setFsWorker, setTempDirectory, shouldCreateDirs, validateDir, withBaseDirectoryUrl
-
Methods inherited from class com.adaptris.core.ProduceOnlyProducerImp
produce, request, request
-
Methods inherited from class com.adaptris.core.AdaptrisMessageProducerImp
createName
-
Methods inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueID
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.AdaptrisMessageWorker
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createQualifier, isTrackingEndpoint
-
-
-
-
Method Detail
-
write
protected void write(AdaptrisMessage msg, java.io.File destFile) throws java.lang.Exception
- Overrides:
write
in classFsProducer
- Throws:
java.lang.Exception
-
getUseRenameTo
public java.lang.Boolean getUseRenameTo()
- Returns:
- the useRenameTo value.
-
setUseRenameTo
public void setUseRenameTo(java.lang.Boolean b)
Set to true to simply useFile.renameTo(File)
when producing anAdaptrisMessage
that is an instance ofFileBackedMessage
- Parameters:
b
- true to useFile.renameTo(File)
-
-