public class LargeMessageProducer extends ProduceOnlyProducerImp implements progress.message.jclient.ChannelListener, com.adaptris.core.licensing.LicensedComponent
Implementation of AdaptrisMessageProducer
which uses Sonic MQ Recoverable File Channels for Large Messages.
See Sonic MQ Application Programming Guide Chapter 11 for a full description of this functionality.
This should be configured with a JmsConnection
with the appropriate Sonic based VendorImplementation, otherwise results
are undefined.
In the adapter configuration file this class is aliased as sonic-large-message-producer which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: STANDARD
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
LargeMessageProducer()
Creates a new instance.
|
LargeMessageProducer(ProduceDestination d) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
SendChannelConfig |
getConfig()
Returns the
SendChannelConfig to use. |
void |
init() |
boolean |
isEnabled(com.adaptris.core.licensing.License license) |
void |
onChannelStatus(progress.message.jclient.Channel channel,
java.lang.Exception e)
Notification of Exceptions and / or transfer completion by Sonic-managed
thread.
|
void |
prepare() |
void |
produce(AdaptrisMessage msg,
ProduceDestination dest) |
void |
setConfig(SendChannelConfig cfg)
Sets the
LargeMessageConfig to use. |
void |
start() |
void |
stop() |
produce, request, request, request, request
getDestination, setDestination
createName, createQualifier, decode, encode, getEncoder, getIsConfirmation, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isConfirmation, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsConfirmation, 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
createName, createQualifier, isConfirmation, isTrackingEndpoint
public LargeMessageProducer()
Creates a new instance. Defaults are localhost, port 2506, user name Administrator and channel timeout 60s.
public LargeMessageProducer(ProduceDestination d)
public void prepare() throws CoreException
prepare
in interface ComponentLifecycleExtension
CoreException
public boolean isEnabled(com.adaptris.core.licensing.License license)
isEnabled
in interface com.adaptris.core.licensing.LicensedComponent
public void init() throws CoreException
init
in interface ComponentLifecycle
CoreException
ComponentLifecycle.init()
public void start() throws CoreException
start
in interface ComponentLifecycle
CoreException
ComponentLifecycle.start()
public void stop()
stop
in interface ComponentLifecycle
ComponentLifecycle.stop()
public void close()
close
in interface ComponentLifecycle
ComponentLifecycle.close()
public void onChannelStatus(progress.message.jclient.Channel channel, java.lang.Exception e)
Notification of Exceptions and / or transfer completion by Sonic-managed thread.
onChannelStatus
in interface progress.message.jclient.ChannelListener
public void produce(AdaptrisMessage msg, ProduceDestination dest) throws ProduceException
produce
in interface AdaptrisMessageSender
ProduceException
(com.adaptris.core.AdaptrisMessage,
com.adaptris.core.ProduceDestination)
public SendChannelConfig getConfig()
Returns the SendChannelConfig
to use.
SendChannelConfig
to usepublic void setConfig(SendChannelConfig cfg)
Sets the LargeMessageConfig
to use. May not be null.
cfg
- the LargeMessageConfig
to useCopyright Adaptris