@ComponentProfile(summary="Default NO-OP producer implementation", tag="producer,base", recommended=NullConnection.class) public class NullMessageProducer extends AdaptrisMessageProducerImp
Null implementation of AdaptrisMessageProducer
.
In the adapter configuration file this class is aliased as null-message-producer which is the preferred alternative to the fully qualified classname when building your configuration.
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
NullMessageProducer() |
NullMessageProducer(ProduceDestination p) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
java.lang.String |
createName()
Create a name for any
MleMarker that is generated. |
void |
init()
Initialises the component.
|
void |
prepare()
Prepare for initialisation.
|
void |
produce(AdaptrisMessage msg)
Produces the
AdaptrisMessage to the default destination. |
void |
produce(AdaptrisMessage msg,
ProduceDestination overload)
Produce the
AdaptrisMessage to the supplied ProduceDestination , over-riding any configured destinations. |
AdaptrisMessage |
request(AdaptrisMessage msg)
Produce the
AdaptrisMessage to the configured destination and blocks indefinitely for a reply. |
AdaptrisMessage |
request(AdaptrisMessage msg,
long timeout)
Produces the
AdaptrisMessage to the configured ProduceDestination and blocks for the specified timeout for a
reply. |
AdaptrisMessage |
request(AdaptrisMessage msg,
ProduceDestination destination)
Produces the
AdaptrisMessage to the passed supplied ProduceDestination and blocks indefinitely for a reply. |
AdaptrisMessage |
request(AdaptrisMessage msg,
ProduceDestination destination,
long timeout)
Produces the
AdaptrisMessage to the passed supplied ProduceDestination and blocks for the specified timeout for
a reply. |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
getDestination, setDestination
createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
getUniqueId
createQualifier, isTrackingEndpoint
public NullMessageProducer()
public NullMessageProducer(ProduceDestination p)
public void produce(AdaptrisMessage msg) throws ProduceException
AdaptrisMessageSender
AdaptrisMessage
to the default destination.msg
- the @link AdaptrisMessage} to produceProduceException
- wrapping any underlying ExceptionsAdaptrisMessageProducer
public void produce(AdaptrisMessage msg, ProduceDestination overload) throws ProduceException
AdaptrisMessageSender
AdaptrisMessage
to the supplied ProduceDestination
, over-riding any configured destinations.msg
- the AdaptrisMessage
to produceoverload
- the ProduceDestination
to produce toProduceException
- wrapping any underlying ExceptionsAdaptrisMessageProducer
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
CoreException
- wrapping any underlying Exception
sAdaptrisMessageProducer
public void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer
, calling start
will begin message delivery.
CoreException
- wrapping any underlying Exception
sAdaptrisMessageProducer
public void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer
, calling stop
will pause message delivery. Throwing a RuntimeException
may cause unintended consequences
AdaptrisMessageProducer
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException
may
cause unintended consequences
AdaptrisMessageProducer
public AdaptrisMessage request(AdaptrisMessage msg) throws ProduceException
AdaptrisMessageProducer
AdaptrisMessage
to the configured destination and blocks indefinitely for a reply.msg
- the AdaptrisMessage
to produceAdaptrisMessage
which is generally the same as supplied parameterProduceException
- wrapping any underlying ExceptionsAdaptrisMessageProducer
public AdaptrisMessage request(AdaptrisMessage msg, long timeout) throws ProduceException
AdaptrisMessageProducer
AdaptrisMessage
to the configured ProduceDestination
and blocks for the specified timeout for a
reply.msg
- the AdaptrisMessage
to producetimeout
- the time to wait for a reply in millisecondsAdaptrisMessage
which is generally the same as supplied parameterProduceException
- wrapping any underlying ExceptionsAdaptrisMessageProducer
public AdaptrisMessage request(AdaptrisMessage msg, ProduceDestination destination) throws ProduceException
AdaptrisMessageProducer
AdaptrisMessage
to the passed supplied ProduceDestination
and blocks indefinitely for a reply.msg
- the AdaptrisMessage
to producedestination
- the ProduceDestination
to produce toAdaptrisMessage
which is generally the same as supplied parameterProduceException
- wrapping any underlying ExceptionsAdaptrisMessageProducer
public AdaptrisMessage request(AdaptrisMessage msg, ProduceDestination destination, long timeout) throws ProduceException
AdaptrisMessageProducer
AdaptrisMessage
to the passed supplied ProduceDestination
and blocks for the specified timeout for
a reply.msg
- the AdaptrisMessage
to producedestination
- the ProduceDestination
to produce totimeout
- the time to wait for a reply in millisecondsAdaptrisMessage
which is generally the same as supplied parameterProduceException
- wrapping any underlying ExceptionsAdaptrisMessageProducer
public java.lang.String createName()
MessageEventGenerator
MleMarker
that is generated.
The default implementation is to return the classname of the component in question.
* @return the name for anyMleMarker
that is generated.createName
in interface MessageEventGenerator
createName
in class AdaptrisMessageWorkerImp
MessageEventGenerator
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException