Class LargeMessageConfig
- java.lang.Object
-
- com.adaptris.core.jms.sonic.LargeMessageConfig
-
- All Implemented Interfaces:
MetadataHandlerContext
- Direct Known Subclasses:
ReceiveChannelConfig
,SendChannelConfig
public abstract class LargeMessageConfig extends java.lang.Object implements MetadataHandlerContext
Config common to
LargeMessageConsumer
andLargeMessageProducer
.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description LargeMessageConfig()
Standard constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
applyBaseConfiguration(progress.message.jclient.Channel channel)
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 theMetadataFilter
to be used when converting between JMS messages and AdaptrisMessage objectsvoid
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)
-
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.jms.MetadataHandlerContext
metadataConverters
-
-
-
-
Field Detail
-
DEFAULT_MONITOR_TIMEOUT_MS
public static final long DEFAULT_MONITOR_TIMEOUT_MS
The default monitor timeout.- See Also:
- Constant Field Values
-
DEFAULT_RETRY_COUNT
public static final int DEFAULT_RETRY_COUNT
The default retry count.- See Also:
- Constant Field Values
-
DEFAULT_RETRY_INTERVAL
public static final long DEFAULT_RETRY_INTERVAL
The default retry interval.- See Also:
- Constant Field Values
-
DEFAULT_CHANNEL_TIMEOUT
public static final int DEFAULT_CHANNEL_TIMEOUT
the default channel timeout.- See Also:
- Constant Field Values
-
BYTES_IN_A_KILOBYTE
protected static final int BYTES_IN_A_KILOBYTE
- See Also:
- Constant Field Values
-
log
protected transient org.slf4j.Logger log
-
-
Method Detail
-
verify
protected void verify(VendorImplementation v) throws CoreException
- Throws:
CoreException
-
applyConfiguration
protected abstract void applyConfiguration(progress.message.jclient.Channel channel) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
applyBaseConfiguration
protected void applyBaseConfiguration(progress.message.jclient.Channel channel) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
getLocalStoreDirectory
protected java.io.File getLocalStoreDirectory()
-
getMonitorTimeoutMs
public java.lang.Long getMonitorTimeoutMs()
- Returns:
- the monitorTimeoutMs
-
setMonitorTimeoutMs
public void setMonitorTimeoutMs(java.lang.Long l)
The timeout to be used when monitoring completion of messages.- Parameters:
l
- the monitorTimeoutMs to set
-
monitorTimeoutMs
protected long monitorTimeoutMs()
-
getMoveJmsHeaders
public java.lang.Boolean getMoveJmsHeaders()
Returns true if JMS Headers (as well as JMS Properties) should be copied.
- Returns:
- true if JMS Headers (as well as JMS Properties) should be copied, otherwise false
- See Also:
MetadataHandlerContext.moveJmsHeaders()
-
setMoveJmsHeaders
public void setMoveJmsHeaders(java.lang.Boolean b)
Sets whether JMS Headers (as well as JMS Properties) should be copied.
- Parameters:
b
- true if JMS Headers (as well as JMS Properties) should be copied, otherwise false
-
getReportAllErrors
public java.lang.Boolean getReportAllErrors()
- Returns:
- the reportAllErrors
-
setReportAllErrors
public void setReportAllErrors(java.lang.Boolean b)
Report all non-critical errors with a stacktrace.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.
- Parameters:
b
- the reportAllErrors to set
-
getRetryCount
public java.lang.Integer getRetryCount()
This method will retrieve the number of times this channel will retry sending a fragment of information.
- Returns:
- the number of times to retry.
- See Also:
Channel.getRetryCount()
-
setRetryCount
public void setRetryCount(java.lang.Integer i)
This method will set the number of times this channel will retry sending a fragment of information.
- Parameters:
i
- The number of times to retry.- See Also:
Channel.setRetryCount(int)
-
retryCount
protected int retryCount()
-
getRetryInterval
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.
- Returns:
- the interval between retry attempts in milliseconds
- See Also:
Channel.getRetryInterval()
-
setRetryInterval
public void setRetryInterval(java.lang.Long i)
Sets the interval between retry attempts in milliseconds. Producer only.
- Parameters:
i
- the interval between retry attempts in milliseconds- See Also:
Channel.setRetryInterval(long)
-
retryInterval
protected long retryInterval()
-
getChannelTimeout
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.
- Returns:
- the channel timeout
-
setChannelTimeout
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.
- Parameters:
i
- the channel timeout
-
channelTimeout
protected int channelTimeout()
-
logChannelInfo
protected void logChannelInfo(java.lang.String hdr, progress.message.jclient.Channel c) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
getMetadataFilter
public MetadataFilter getMetadataFilter()
-
setMetadataFilter
public void setMetadataFilter(MetadataFilter mf)
Set theMetadataFilter
to be used when converting between JMS messages and AdaptrisMessage objects- Parameters:
mf
- the metadata filter implementation, default isNoOpMetadataFilter
- See Also:
MetadataHandlerContext.metadataFilter()
-
moveJmsHeaders
public boolean moveJmsHeaders()
- Specified by:
moveJmsHeaders
in interfaceMetadataHandlerContext
-
reportAllErrors
public boolean reportAllErrors()
- Specified by:
reportAllErrors
in interfaceMetadataHandlerContext
-
metadataFilter
public MetadataFilter metadataFilter()
- Specified by:
metadataFilter
in interfaceMetadataHandlerContext
-
-