public class TopicMapping extends ResourceMapping
TopicMapping captures configuration information for a pattern-match-based mapping from a proposed
NamedTopic name to a topic scheme.
In addition to the mapping between a topic name and a topic scheme, each TopicMapping retains a
ParameterResolver (representing user-provided parameters) to be used during the realization of the said
topic and scheme. (This allows individual mappings to be parameterized)
Lastly TopicMappings also provide a mechanism to associate specific strongly typed resources
with each mapping at runtime. This provides a flexible and dynamic mechanism to associate further configuration
information with topics.
Pattern Matching Semantics: The only wildcard permitted for pattern matching with topic names is the "*" and it may only be used at the end of a topic name.
For example, the following topic name patterns are valid:
"*" and something-*, but *-something is invalid.
| Constructor and Description |
|---|
TopicMapping(String sTopicNamePattern,
String sCachingSchemeName,
Class<? extends TopicScheme> clsScheme)
Construct a
TopicMapping for topics that will use raw types by default. |
| Modifier and Type | Method and Description |
|---|---|
String |
getConfigElementName()
Obtain the xml element name of this mapping.
|
Collection<SubscriberGroupBuilder> |
getSubscriberGroupBuilders()
Get the durable
SubscriberGroupBuilders for this TopicMapping. |
String |
getValueClassName()
Obtains the name of the value class for
NamedTopics using this TopicMapping. |
void |
setSubscriberGroupBuilders(Collection<SubscriberGroupBuilder> colBuilders)
Set the durable
SubscriberGroupBuilders for this TopicMapping. |
void |
setValueClassName(String sElementClassName)
Sets the name of the value class for
NamedTopics using this TopicMapping. |
boolean |
usesRawTypes()
Determines if the
TopicMapping is configured to use raw-types
(ie: no type checking or constraints) |
void |
validateScheme(Scheme scheme)
Determine whether the specified schem is valid
for this mapping type.
|
getEventInterceptorBuilders, getNamePattern, getNameUsing, getParameterResolver, getResourceRegistry, getSchemeName, getSubMappings, getValue, getValue, getWildcardMatch, isForName, isInternal, setEventInterceptorBuilders, setInternal, setParameterResolver, usesWildcardpublic TopicMapping(String sTopicNamePattern, String sCachingSchemeName, Class<? extends TopicScheme> clsScheme)
TopicMapping for topics that will use raw types by default.sTopicNamePattern - the pattern that maps topic names to caching schemessCachingSchemeName - the name of the caching scheme to which topics matching this
TopicMapping will be associatedpublic String getConfigElementName()
ResourceMappinggetConfigElementName in class ResourceMappingpublic void validateScheme(Scheme scheme)
ResourceMappingvalidateScheme in class ResourceMappingscheme - the scheme to validatepublic String getValueClassName()
NamedTopics using this TopicMapping.null if rawtypes are being used@Injectable(value="value-type") public void setValueClassName(String sElementClassName)
NamedTopics using this TopicMapping.sElementClassName - the name of the value class or null if rawtypes are being usedpublic boolean usesRawTypes()
TopicMapping is configured to use raw-types
(ie: no type checking or constraints)true if using raw types, false otherwise@Injectable(value="subscriber-groups") public void setSubscriberGroupBuilders(Collection<SubscriberGroupBuilder> colBuilders)
SubscriberGroupBuilders for this TopicMapping.colBuilders - collection of SubscriberGroupBuilders.public Collection<SubscriberGroupBuilder> getSubscriberGroupBuilders()
SubscriberGroupBuilders for this TopicMapping.