Package com.adaptris.core
Class ProduceOnlyProducerImp
- java.lang.Object
-
- com.adaptris.core.AdaptrisMessageWorkerImp
-
- com.adaptris.core.AdaptrisMessageProducerImp
-
- com.adaptris.core.ProduceOnlyProducerImp
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisMessageProducer
,AdaptrisMessageSender
,AdaptrisMessageWorker
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
- Direct Known Subclasses:
FsProducer
,FtpProducer
,RelaxedFtpProducer
,ResponseProducerImpl
public abstract class ProduceOnlyProducerImp extends AdaptrisMessageProducerImp
Convenience class that only supports produce rather than request.All the request methods throw an UnsupportedOperationException
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.AdaptrisMessageWorkerImp
log
-
-
Constructor Summary
Constructors Constructor Description ProduceOnlyProducerImp()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doProduce(AdaptrisMessage msg, java.lang.String endpoint)
void
produce(AdaptrisMessage msg)
Produces theAdaptrisMessage
to the default destination.AdaptrisMessage
request(AdaptrisMessage msg)
UnsupportedOperationException is thrownAdaptrisMessage
request(AdaptrisMessage msg, long timeout)
UnsupportedOperationException is thrown-
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
-
request
public final AdaptrisMessage request(AdaptrisMessage msg) throws ProduceException
UnsupportedOperationException is thrown- Parameters:
msg
- theAdaptrisMessage
to produce- Returns:
- a reply
AdaptrisMessage
which is generally the same as supplied parameter - Throws:
ProduceException
- wrapping any underlying Exceptions- See Also:
AdaptrisMessageProducer.request(AdaptrisMessage)
-
request
public final AdaptrisMessage request(AdaptrisMessage msg, long timeout) throws ProduceException
UnsupportedOperationException is thrown- Parameters:
msg
- theAdaptrisMessage
to producetimeout
- the time to wait for a reply in milliseconds- Returns:
- a reply
AdaptrisMessage
which is generally the same as supplied parameter - Throws:
ProduceException
- wrapping any underlying Exceptions- See Also:
AdaptrisMessageProducer.request(AdaptrisMessage, long)
-
produce
public final void produce(AdaptrisMessage msg) throws ProduceException
Description copied from interface:AdaptrisMessageSender
Produces theAdaptrisMessage
to the default destination.- Parameters:
msg
- the @link AdaptrisMessage} to produce- Throws:
ProduceException
- wrapping any underlying Exceptions
-
doProduce
protected abstract void doProduce(AdaptrisMessage msg, java.lang.String endpoint) throws ProduceException
- Throws:
ProduceException
-
-