Package com.adaptris.hpcc
Class SprayDirectoryToThor
java.lang.Object
com.adaptris.core.AdaptrisMessageWorkerImp
com.adaptris.core.AdaptrisMessageProducerImp
com.adaptris.hpcc.DfuPlusWrapper
com.adaptris.hpcc.SprayToThorImpl
com.adaptris.hpcc.SprayDirectoryToThor
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisMessageProducer,AdaptrisMessageSender,AdaptrisMessageWorker,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator
@ComponentProfile(summary="Spray a directory into HPCC via dfuplus",
tag="producer,hpcc,dfuplus",
recommended=DfuplusConnection.class)
public class SprayDirectoryToThor
extends SprayToThorImpl
Spray the contents of a directory to Thor.
Note that this producer ignores the current message contents and just sprays the contents of the directory specified by
getSourceDirectory() using the configured dfuplus command.
Effectively, the program executed is going to similar to
dfuplus action=spray srcfile=/path/to/dir/*
dstcluster=mythor dstname=~zzlc:json:data overwrite=1 PREFIX=FILENAME,FILESIZE
server= nosplit=1 username= password=
Be aware that nosplit=1 is always added, as well as the "/*".
The adapter also needs a running dfuplus action=dafilesrv instance on the machine where the adapter is hosted. Thor will connect
to this instance for file delivery.
In the adapter configuration file this class is aliased as spray-directory-to-thor which is the preferred alternative to the fully qualified classname when building your configuration.
-
Field Summary
Fields inherited from class com.adaptris.hpcc.DfuPlusWrapper
executorFields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoProduce(AdaptrisMessage msg, String endpoint) Specify true to delete the source directory after successfully spray into HPCC.Optional prefix.The source directory to spray into Thor.voidprepare()voidsetDeleteSourceDirectory(Boolean deleteSourceDirectory) Specify true to delete the source directory after successfully spray into HPCC.voidOptional prefix.voidsetSourceDirectory(String sourceDirectory) The source directory to spray into Thor.Methods inherited from class com.adaptris.hpcc.SprayToThorImpl
createSprayCommand, doRequest, endpoint, getCluster, getLogicalFilename, getOverwrite, overwrite, setCluster, setLogicalFilename, setOverwriteMethods inherited from class com.adaptris.hpcc.DfuPlusWrapper
calculateWait, close, execute, executeInternal, generateExceptionMessage, getMaxWait, getMonitorInterval, init, maxWaitMs, monitorIntervalMs, produce, request, request, setMaxWait, setMonitorInterval, start, stopMethods inherited from class com.adaptris.core.AdaptrisMessageProducerImp
createNameMethods inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueIDMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueIdMethods inherited from interface com.adaptris.core.AdaptrisMessageWorker
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactoryMethods inherited from interface com.adaptris.core.MessageEventGenerator
createQualifier, isTrackingEndpoint
-
Constructor Details
-
SprayDirectoryToThor
public SprayDirectoryToThor()
-
-
Method Details
-
doProduce
- Specified by:
doProducein classDfuPlusWrapper- Throws:
ProduceException
-
prepare
- Specified by:
preparein interfaceComponentLifecycleExtension- Overrides:
preparein classSprayToThorImpl- Throws:
CoreException
-
getPrefix
Optional prefix. -
setPrefix
Optional prefix. -
getSourceDirectory
The source directory to spray into Thor. -
setSourceDirectory
The source directory to spray into Thor. -
getDeleteSourceDirectory
Specify true to delete the source directory after successfully spray into HPCC.The default is false if not explicitly specified
-
setDeleteSourceDirectory
Specify true to delete the source directory after successfully spray into HPCC.The default is false if not explicitly specified
-