Package com.adaptris.hpcc
Class SprayToThor
- java.lang.Object
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisMessageProducer
,AdaptrisMessageSender
,AdaptrisMessageWorker
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
@ComponentProfile(summary="Spray the current message into HPCC via dfuplus", tag="producer,hpcc,dfuplus", recommended=DfuplusConnection.class) public class SprayToThor extends SprayToThorImpl
Spray the contents of the current message into Thor.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-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
executor
-
Fields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log
-
-
Constructor Summary
Constructors Constructor Description SprayToThor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doProduce(AdaptrisMessage msg, java.lang.String endpoint)
@NotNull SprayFormat
getSprayFormat()
The format of the file to spray into Thor.java.lang.String
getTempDirectory()
void
prepare()
void
setSprayFormat(@NotNull SprayFormat sprayFormat)
The format of the file to spray into Thor.void
setTempDirectory(java.lang.String tempDir)
If specified then messages that are notFileBackedMessage
will be stored in this location prior to spray.-
Methods inherited from class com.adaptris.hpcc.SprayToThorImpl
createSprayCommand, doRequest, endpoint, getCluster, getLogicalFilename, getOverwrite, overwrite, setCluster, setLogicalFilename, setOverwrite
-
Methods inherited from class com.adaptris.hpcc.DfuPlusWrapper
calculateWait, close, execute, executeInternal, generateExceptionMessage, getMaxWait, getMonitorInterval, init, maxWaitMs, monitorIntervalMs, produce, request, request, setMaxWait, setMonitorInterval, start, stop
-
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.MessageEventGenerator
createQualifier, isTrackingEndpoint
-
-
-
-
Method Detail
-
doProduce
protected void doProduce(AdaptrisMessage msg, java.lang.String endpoint) throws ProduceException
- Specified by:
doProduce
in classDfuPlusWrapper
- Throws:
ProduceException
-
prepare
public void prepare() throws CoreException
- Specified by:
prepare
in interfaceComponentLifecycleExtension
- Overrides:
prepare
in classSprayToThorImpl
- Throws:
CoreException
-
getTempDirectory
public java.lang.String getTempDirectory()
- Returns:
- the tempDir
-
setTempDirectory
public void setTempDirectory(java.lang.String tempDir)
If specified then messages that are notFileBackedMessage
will be stored in this location prior to spray.- Parameters:
tempDir
- the tempDir to set; default is null which defaults tojava.io.tmpdir
-
getSprayFormat
@NotNull public @NotNull SprayFormat getSprayFormat()
The format of the file to spray into Thor.
-
setSprayFormat
public void setSprayFormat(@NotNull @NotNull SprayFormat sprayFormat)
The format of the file to spray into Thor.
-
-