public abstract class LargeMessageConfig extends java.lang.Object implements MetadataHandlerContext
Config common to LargeMessageConsumer
and LargeMessageProducer
.
Modifier and Type | Field and Description |
---|---|
protected static int |
BYTES_IN_A_KILOBYTE |
static int |
DEFAULT_CHANNEL_TIMEOUT
the default channel timeout.
|
static long |
DEFAULT_MONITOR_TIMEOUT_MS
The default monitor timeout.
|
static int |
DEFAULT_RETRY_COUNT
The default retry count.
|
static long |
DEFAULT_RETRY_INTERVAL
The default retry interval.
|
protected org.slf4j.Logger |
log |
Constructor and Description |
---|
LargeMessageConfig()
Standard constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
applyConfiguration(progress.message.jclient.Channel channel) |
protected int |
channelTimeout() |
java.lang.Integer |
getChannelTimeout()
Returns the channel timeout.
|
protected java.io.File |
getLocalStoreDirectory() |
MetadataFilter |
getMetadataFilter() |
java.lang.Long |
getMonitorTimeoutMs() |
java.lang.Boolean |
getMoveJmsHeaders()
Returns true if JMS Headers (as well as JMS Properties) should be copied.
|
java.lang.Boolean |
getReportAllErrors() |
java.lang.Integer |
getRetryCount()
This method will retrieve the number of times this channel will retry sending a fragment of information.
|
java.lang.Long |
getRetryInterval()
This will set the amount of time to wait before attempting to retrying to send or receive a piece of information.
|
protected void |
logChannelInfo(java.lang.String hdr,
progress.message.jclient.Channel c) |
MetadataFilter |
metadataFilter() |
protected long |
monitorTimeoutMs() |
boolean |
moveJmsHeaders() |
boolean |
reportAllErrors() |
protected int |
retryCount() |
protected long |
retryInterval() |
void |
setChannelTimeout(java.lang.Integer i)
Sets the channel timeout.
|
void |
setMetadataFilter(MetadataFilter mf)
Set the
MetadataFilter to be used when converting between JMS messages and AdaptrisMessage objects |
void |
setMonitorTimeoutMs(java.lang.Long l)
The timeout to be used when monitoring completion of messages.
|
void |
setMoveJmsHeaders(java.lang.Boolean b)
Sets whether JMS Headers (as well as JMS Properties) should be copied.
|
void |
setReportAllErrors(java.lang.Boolean b)
Report all non-critical errors with a stacktrace.
|
void |
setRetryCount(java.lang.Integer i)
This method will set the number of times this channel will retry sending a fragment of information.
|
void |
setRetryInterval(java.lang.Long i)
Sets the interval between retry attempts in milliseconds.
|
protected void |
verify(VendorImplementation v) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
metadataConverters
public static final long DEFAULT_MONITOR_TIMEOUT_MS
public static final int DEFAULT_RETRY_COUNT
public static final long DEFAULT_RETRY_INTERVAL
public static final int DEFAULT_CHANNEL_TIMEOUT
protected static final int BYTES_IN_A_KILOBYTE
protected transient org.slf4j.Logger log
protected void verify(VendorImplementation v) throws CoreException
CoreException
protected abstract void applyConfiguration(progress.message.jclient.Channel channel) throws javax.jms.JMSException
javax.jms.JMSException
protected java.io.File getLocalStoreDirectory()
public java.lang.Long getMonitorTimeoutMs()
public void setMonitorTimeoutMs(java.lang.Long l)
l
- the monitorTimeoutMs to setprotected long monitorTimeoutMs()
public java.lang.Boolean getMoveJmsHeaders()
Returns true if JMS Headers (as well as JMS Properties) should be copied.
MetadataHandlerContext.moveJmsHeaders()
public void setMoveJmsHeaders(java.lang.Boolean b)
Sets whether JMS Headers (as well as JMS Properties) should be copied.
b
- true if JMS Headers (as well as JMS Properties) should be copied, otherwise falsepublic java.lang.Boolean getReportAllErrors()
public void setReportAllErrors(java.lang.Boolean b)
When moving JMS Headers, it is possible depending on the vendor that some exceptions are thrown when attempting to get standard JMS headers. By default, these errors are simply logged without a stack-trace. If the full strack trace is required, then set this to be true.
b
- the reportAllErrors to setMetadataHandlerContext.reportAllErrors()()
public java.lang.Integer getRetryCount()
This method will retrieve the number of times this channel will retry sending a fragment of information.
Channel.getRetryCount()
public void setRetryCount(java.lang.Integer i)
This method will set the number of times this channel will retry sending a fragment of information.
i
- The number of times to retry.Channel.setRetryCount(int)
protected int retryCount()
public java.lang.Long getRetryInterval()
This will set the amount of time to wait before attempting to retrying to send or receive a piece of information.
Channel.getRetryInterval()
public void setRetryInterval(java.lang.Long i)
Sets the interval between retry attempts in milliseconds. Producer only.
i
- the interval between retry attempts in millisecondsChannel.setRetryInterval(long)
protected long retryInterval()
public java.lang.Integer getChannelTimeout()
Returns the channel timeout. The channel timeout is the period for which this classes waits for the channel to be acknowledged by the consumer and thus transfer to start.
public void setChannelTimeout(java.lang.Integer i)
Sets the channel timeout. The channel timeout is the period for which this classes waits for the channel to be acknowledged by the consumer and thus transfer to start.
i
- the channel timeoutprotected int channelTimeout()
protected void logChannelInfo(java.lang.String hdr, progress.message.jclient.Channel c) throws javax.jms.JMSException
javax.jms.JMSException
public MetadataFilter getMetadataFilter()
public void setMetadataFilter(MetadataFilter mf)
MetadataFilter
to be used when converting between JMS messages and AdaptrisMessage objectsmf
- the metadata filter implementation, default is NoOpMetadataFilter
MetadataHandlerContext.metadataFilter()
public boolean moveJmsHeaders()
moveJmsHeaders
in interface MetadataHandlerContext
public boolean reportAllErrors()
reportAllErrors
in interface MetadataHandlerContext
public MetadataFilter metadataFilter()
metadataFilter
in interface MetadataHandlerContext
Copyright Adaptris