Class DesprayFromThor
- java.lang.Object
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisMessageProducer
,AdaptrisMessageSender
,AdaptrisMessageWorker
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
@ComponentProfile(summary="Despray a logical file from HPCC into the current message via dfuplus", tag="producer,hpcc,dfuplus,thor", recommended=DfuplusConnection.class) public class DesprayFromThor extends SingleFileRequest
Despray a file from Thor.Note that although this is an implementation of
AdaptrisMessageProducerImp
theAdaptrisMessageProducer#produce()
methods will throw aUnsupportedOperationException
. It should be used as part of aStandaloneRequestor
where theSingleFileRequest.getLogicalFilename()
returns the logical filename of the file that you wish to retrieve.The adapter also needs a running
dfuplus action=dafilesrv
instance on the machine where the adapter is hosted. Thor will connect to this instance to deliver the files.In the adapter configuration file this class is aliased as despray-from-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 DesprayFromThor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AdaptrisMessage
doRequest(AdaptrisMessage msg, java.lang.String endpoint, long timeoutMs)
java.lang.String
getDestIpAddress()
Set the destination IP address to despray to.java.lang.String
getTempDirectory()
A temporary directory that we will use when despraying.void
setDestIpAddress(java.lang.String destIpAddress)
Set the destination IP address to despray to.void
setTempDirectory(java.lang.String tempDirectory)
A temporary directory that we will use when despraying.-
Methods inherited from class com.adaptris.hpcc.SingleFileRequest
endpoint, getLogicalFilename, prepare, setLogicalFilename
-
Methods inherited from class com.adaptris.hpcc.RequestOnlyImpl
doProduce
-
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
-
doRequest
protected AdaptrisMessage doRequest(AdaptrisMessage msg, java.lang.String endpoint, long timeoutMs) throws ProduceException
- Specified by:
doRequest
in classDfuPlusWrapper
- Throws:
ProduceException
-
getTempDirectory
public java.lang.String getTempDirectory()
A temporary directory that we will use when despraying.default is null which defaults to
java.io.tmpdir
-
setTempDirectory
public void setTempDirectory(java.lang.String tempDirectory)
A temporary directory that we will use when despraying.default is null which defaults to
java.io.tmpdir
-
getDestIpAddress
public java.lang.String getDestIpAddress()
Set the destination IP address to despray to.If the destination IP address is not specified, then the default dfuplus action is to despray into the configured landing zone (which may not be where the adapter is hosted); ultimately we want the desprayed file to be accessible to the adapter, so if no ip address is configured then
InetAddress.getLocalHost()
is used; which may be incorrect in multi-homed systems. The adapter will need a runningdfuplus action=dafilesrv
instance on the machine where the adapter is hosted. Thor will connect to this instance to deliver the files.
-
setDestIpAddress
public void setDestIpAddress(java.lang.String destIpAddress)
Set the destination IP address to despray to.If the destination IP address is not specified, then the default dfuplus action is to despray into the configured landing zone (which may not be where the adapter is hosted); ultimately we want the desprayed file to be accessible to the adapter, so if no ip address is configured then
InetAddress.getLocalHost()
is used; which may be incorrect in multi-homed systems. The adapter will need a runningdfuplus action=dafilesrv
instance on the machine where the adapter is hosted. Thor will connect to this instance to deliver the files.
-
-