V - the type of the topic valuespublic interface ValueTypeAssertion<V> extends NamedCollection.Option
NamedTopic.Option for asserting the type
of values used with a NamedTopic.| Modifier and Type | Interface | Description |
|---|---|---|
static class |
ValueTypeAssertion.WithValueTypeAssertion<V> |
Defines a
NamedTopic.Option for asserting the type
of values used with a NamedTopic. |
| Modifier and Type | Field | Description |
|---|---|---|
static ValueTypeAssertion |
WITH_RAW_TYPES |
When used warnings will be issued where types are configured but not used.
|
static ValueTypeAssertion |
WITHOUT_TYPE_CHECKING |
When used no type checking will occur and no warnings will be generated.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
assertTypeSafety(String sName,
TopicMapping mapping) |
Asserts the type compatibility of a topic given the
TopicMapping that defines the
topic. |
static <V> ValueTypeAssertion<V> |
withoutTypeChecking() |
Obtains a
ValueTypeAssertion that allows topic to be acquired without
type-checking, warnings or log messages. |
static <V> ValueTypeAssertion<V> |
withRawTypes() |
Obtains a
ValueTypeAssertion that allows topic to be acquired and assigned to a raw
NamedTopic reference. |
static <V> ValueTypeAssertion<V> |
withType(Class<V> clsElement) |
Obtains a
ValueTypeAssertion that asserts the specified types are configured for a topioc. |
static final ValueTypeAssertion WITHOUT_TYPE_CHECKING
static final ValueTypeAssertion WITH_RAW_TYPES
void assertTypeSafety(String sName, TopicMapping mapping) throws IllegalArgumentException
TopicMapping that defines the
topic.sName - the name of the topicmapping - the ResourceMappingIllegalArgumentException - when type used with the ValueTypeAssertion are illegal according to the
configurationstatic <V> ValueTypeAssertion<V> withType(Class<V> clsElement)
ValueTypeAssertion that asserts the specified types are configured for a topioc.clsElement - the desired type of the elements within the topicValueTypeAssertion@Options.Default static <V> ValueTypeAssertion<V> withRawTypes()
ValueTypeAssertion that allows topic to be acquired and assigned to a raw
NamedTopic reference. A debug log message will be raised for topics that have been configured with
specific types.ValueTypeAssertionstatic <V> ValueTypeAssertion<V> withoutTypeChecking()
ValueTypeAssertion that allows topic to be acquired without
type-checking, warnings or log messages.ValueTypeAssertion