Package com.adaptris.core
Class RequestReplyProducerImp
- java.lang.Object
-
- com.adaptris.core.AdaptrisMessageWorkerImp
-
- com.adaptris.core.AdaptrisMessageProducerImp
-
- com.adaptris.core.RequestReplyProducerBase
-
- com.adaptris.core.RequestReplyProducerImp
-
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisMessageProducer,AdaptrisMessageSender,AdaptrisMessageWorker,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator
- Direct Known Subclasses:
HttpProducer,JdbcStoredProcedureProducer
public abstract class RequestReplyProducerImp extends RequestReplyProducerBase
Abstract Request Reply enabled producer that may be extended by concrete sub-classes.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log
-
-
Constructor Summary
Constructors Constructor Description RequestReplyProducerImp()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoProduce(AdaptrisMessage msg, java.lang.String endpoint)Actually do the produce.protected abstract AdaptrisMessagedoRequest(AdaptrisMessage msg, java.lang.String endpoint, long timeout)Actually do the request.voidproduce(AdaptrisMessage msg)Produces theAdaptrisMessageto the default destination.AdaptrisMessagerequest(AdaptrisMessage msg)Produce theAdaptrisMessageto the configured destination and blocks indefinitely for a reply.AdaptrisMessagerequest(AdaptrisMessage msg, long timeout)Produces theAdaptrisMessageand blocks for the specified timeout for a reply.-
Methods inherited from class com.adaptris.core.RequestReplyProducerBase
copyReplyContents, defaultTimeout, getIgnoreReplyMetadata, mergeReply, setIgnoreReplyMetadata
-
Methods inherited from class com.adaptris.core.AdaptrisMessageProducerImp
createName, endpoint
-
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.ComponentLifecycleExtension
prepare
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createQualifier, isTrackingEndpoint
-
-
-
-
Method Detail
-
produce
public final void produce(AdaptrisMessage msg) throws ProduceException
Description copied from interface:AdaptrisMessageSenderProduces theAdaptrisMessageto the default destination.- Parameters:
msg- the @link AdaptrisMessage} to produce- Throws:
ProduceException- wrapping any underlying Exceptions
-
request
public final AdaptrisMessage request(AdaptrisMessage msg) throws ProduceException
Description copied from interface:AdaptrisMessageProducerProduce theAdaptrisMessageto the configured destination and blocks indefinitely for a reply.- Parameters:
msg- theAdaptrisMessageto produce- Returns:
- a reply
AdaptrisMessagewhich is generally the same as supplied parameter - Throws:
ProduceException- wrapping any underlying Exceptions
-
request
public final AdaptrisMessage request(AdaptrisMessage msg, long timeout) throws ProduceException
Description copied from interface:AdaptrisMessageProducerProduces theAdaptrisMessageand blocks for the specified timeout for a reply.- Parameters:
msg- theAdaptrisMessageto producetimeout- the time to wait for a reply in milliseconds- Returns:
- a reply
AdaptrisMessagewhich is generally the same as supplied parameter - Throws:
ProduceException- wrapping any underlying Exceptions
-
doRequest
protected abstract AdaptrisMessage doRequest(AdaptrisMessage msg, java.lang.String endpoint, long timeout) throws ProduceException
Actually do the request.- Throws:
ProduceException
-
doProduce
protected abstract void doProduce(AdaptrisMessage msg, java.lang.String endpoint) throws ProduceException
Actually do the produce.- Throws:
ProduceException
-
-