public abstract class AbstractBusPropertiesAccessor extends java.lang.Object implements BusProperties
BACK_OFF_INITIAL_INTERVAL, BACK_OFF_MAX_INTERVAL, BACK_OFF_MULTIPLIER, CONCURRENCY, DIRECT_BINDING_ALLOWED, MAX_ATTEMPTS, MAX_CONCURRENCY, NEXT_MODULE_COUNT, PARTITION_COUNT, PARTITION_INDEX, PARTITION_KEY_EXPRESSION, PARTITION_KEY_EXTRACTOR_CLASS, PARTITION_SELECTOR_CLASS, PARTITION_SELECTOR_EXPRESSION
Constructor and Description |
---|
AbstractBusPropertiesAccessor(java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
asStringArray(java.lang.String value,
java.lang.String[] defaultValue)
Convert a comma-delimited String property to a String[] if
present, or return the default value.
|
long |
getBackOffInitialInterval(long defaultValue)
Return the 'backOffInitialInterval' property or the default value.
|
long |
getBackOffMaxInterval(long defaultValue)
Return the 'backOffMaxInterval' property or the default value.
|
double |
getBackOffMultiplier(double defaultValue)
Return the 'backOffMultiplier' property or the default value.
|
int |
getConcurrency(int defaultValue)
Return the 'concurrency' property or the default value.
|
int |
getMaxAttempts(int defaultValue)
Return the 'maxAttempts' property or the default value.
|
int |
getMaxConcurrency(int defaultValue)
Return the 'maxConcurrency' property or the default value.
|
int |
getPartitionCount()
The number of partitions for this module.
|
int |
getPartitionIndex()
The partition index that this consumer supports.
|
org.springframework.expression.Expression |
getPartitionKeyExpression()
The expression to determine the partition key, evaluated against the
message as the root object.
|
java.lang.String |
getPartitionKeyExtractorClass()
A class name for extracting partition keys from messages.
|
java.lang.String |
getPartitionSelectorClass()
A class name for calculating a partition from a key.
|
org.springframework.expression.Expression |
getPartitionSelectorExpression()
The expression evaluated against the partition key to determine
the partition to which the message will be sent.
|
java.util.Properties |
getProperties()
Return the underlying properties object.
|
java.lang.String |
getProperty(java.lang.String key)
Return the property for the key, or null if it doesn't exist.
|
boolean |
getProperty(java.lang.String key,
boolean defaultValue)
Return the property for the key, or the default value if the
property doesn't exist.
|
double |
getProperty(java.lang.String key,
double defaultValue)
Return the property for the key, or the default value if the
property doesn't exist.
|
int |
getProperty(java.lang.String key,
int defaultValue)
Return the property for the key, or the default value if the
property doesn't exist.
|
long |
getProperty(java.lang.String key,
long defaultValue)
Return the property for the key, or the default value if the
property doesn't exist.
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Return the property for the key, or the default value if the
property doesn't exist.
|
boolean |
isDirectBindingAllowed()
If true, the bus can attempt a direct binding.
|
java.lang.String |
toString() |
public AbstractBusPropertiesAccessor(java.util.Properties properties)
public java.util.Properties getProperties()
public java.lang.String getProperty(java.lang.String key)
key
- The property.public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- The key.defaultValue
- The default value.public boolean getProperty(java.lang.String key, boolean defaultValue)
key
- The key.defaultValue
- The default value.public int getProperty(java.lang.String key, int defaultValue)
key
- The key.defaultValue
- The default value.public long getProperty(java.lang.String key, long defaultValue)
key
- The key.defaultValue
- The default value.public double getProperty(java.lang.String key, double defaultValue)
key
- The key.defaultValue
- The default value.public int getConcurrency(int defaultValue)
defaultValue
- The default value.public int getMaxConcurrency(int defaultValue)
defaultValue
- The default value.public int getMaxAttempts(int defaultValue)
defaultValue
- The default value.public long getBackOffInitialInterval(long defaultValue)
defaultValue
- The default value.public double getBackOffMultiplier(double defaultValue)
defaultValue
- The default value.public long getBackOffMaxInterval(long defaultValue)
defaultValue
- The default value.public java.lang.String getPartitionKeyExtractorClass()
public org.springframework.expression.Expression getPartitionKeyExpression()
public java.lang.String getPartitionSelectorClass()
public org.springframework.expression.Expression getPartitionSelectorExpression()
public int getPartitionCount()
public int getPartitionIndex()
public boolean isDirectBindingAllowed()
protected java.lang.String[] asStringArray(java.lang.String value, java.lang.String[] defaultValue)
value
- The property value.defaultValue
- The default value.public java.lang.String toString()
toString
in class java.lang.Object