Package com.adaptris.hpcc
Class DfuPlusWrapper
java.lang.Object
com.adaptris.core.AdaptrisMessageWorkerImp
com.adaptris.core.AdaptrisMessageProducerImp
com.adaptris.hpcc.DfuPlusWrapper
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisMessageProducer,AdaptrisMessageSender,AdaptrisMessageWorker,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator
- Direct Known Subclasses:
RequestOnlyImpl,SprayToThorImpl
Base class for
dfuplus based activities.-
Field Summary
FieldsFields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longcalculateWait(long current) voidclose()protected abstract voiddoProduce(AdaptrisMessage msg, String endpoint) protected abstract AdaptrisMessagedoRequest(AdaptrisMessage msg, String endpoint, long timeout) protected voidexecute(org.apache.commons.exec.CommandLine cmdLine) protected voidexecuteInternal(org.apache.commons.exec.CommandLine cmdLine, OutputStream stdout) protected static StringSet the max wait for a workunit to complete.Set the monitor interval between attempts to query job status.voidinit()protected longprotected longvoidprepare()final voidproduce(AdaptrisMessage msg) final AdaptrisMessagerequest(AdaptrisMessage msg) final AdaptrisMessagerequest(AdaptrisMessage msg, long timeout) voidsetMaxWait(TimeInterval maxWait) Set the max wait for a workunit to complete.voidsetMonitorInterval(TimeInterval monitorInterval) Set the monitor interval between attempts to query job status.voidstart()voidstop()Methods inherited from class com.adaptris.core.AdaptrisMessageProducerImp
createName, doRequest, endpoint, maybeHandleProduceExceptionMethods 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
-
Field Details
-
executor
-
-
Constructor Details
-
DfuPlusWrapper
public DfuPlusWrapper()
-
-
Method Details
-
close
public void close() -
init
- Throws:
CoreException
-
start
- Throws:
CoreException
-
stop
public void stop() -
prepare
- Throws:
CoreException
-
produce
- Specified by:
producein interfaceAdaptrisMessageSender- Overrides:
producein classAdaptrisMessageProducerImp- Throws:
ProduceException
-
doProduce
- Specified by:
doProducein classAdaptrisMessageProducerImp- Throws:
ProduceException
-
request
- Specified by:
requestin interfaceAdaptrisMessageProducer- Overrides:
requestin classAdaptrisMessageProducerImp- Throws:
ProduceException
-
request
- Specified by:
requestin interfaceAdaptrisMessageProducer- Overrides:
requestin classAdaptrisMessageProducerImp- Throws:
ProduceException
-
doRequest
protected abstract AdaptrisMessage doRequest(AdaptrisMessage msg, String endpoint, long timeout) throws ProduceException - Specified by:
doRequestin classAdaptrisMessageProducerImp- Throws:
ProduceException
-
monitorIntervalMs
protected long monitorIntervalMs() -
maxWaitMs
protected long maxWaitMs() -
execute
- Throws:
ProduceException
-
executeInternal
protected void executeInternal(org.apache.commons.exec.CommandLine cmdLine, OutputStream stdout) throws ProduceException, com.adaptris.hpcc.AbortJobException - Throws:
ProduceExceptioncom.adaptris.hpcc.AbortJobException
-
generateExceptionMessage
-
calculateWait
protected long calculateWait(long current) -
getMonitorInterval
Set the monitor interval between attempts to query job status.If not specified, then it defaults to 30 seconds
-
setMonitorInterval
Set the monitor interval between attempts to query job status.If not specified, then it defaults to 30 seconds
-
getMaxWait
Set the max wait for a workunit to complete.if not specified, defaults to 1 hour.
-
setMaxWait
Set the max wait for a workunit to complete.if not specified, defaults to 1 hour.
-