public interface TopicResolver<T extends MessageView>
TopicResolver resolves a channel key for a message being sent
on a given channel.
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(ToaServiceChannel serviceChannel)
Will be called by
TopicOrientedApplication at startup to initialize
the channel key. |
XString |
resolveTopic(T message,
MessageChannel.RawKeyResolutionTable krt)
Resolves the topic for the given
MessageView. |
XString |
resolveTopic(T message,
Properties krt)
Resolves the topic for the given
MessageView. |
void initialize(ToaServiceChannel serviceChannel)
TopicOrientedApplication at startup to initialize
the channel key.
Note that at the time this method is called, TopicOrientedApplication will
have set the initial key resolution table via ToaServiceChannel.getInitialKRT().
Variable components of the channel key provided by an ChannelInitialKeyResolutionTableProvider
will already have been substituted in the key set in the serviceChannel.
XString resolveTopic(T message, MessageChannel.RawKeyResolutionTable krt) throws Exception
MessageView.
This key resolution method is intended for low latency applications. As such implementors of this method should not produce garbage.
This variant of key resolution can be faster since than
resolveTopic(MessageView, Properties) because the values
in a MessageChannel.RawKeyResolutionTable can be preserialized and thus
don't require character encoding.
message - The message for which to resolve the topic.krt - The MessageChannel.RawKeyResolutionTable.Exception - If the key can't be resolved completely this method must thrown an Exception.XString resolveTopic(T message, Properties krt) throws Exception
MessageView.message - The message for which to resolve the topic.Exception - If the key can't be resolved completely this method must thrown an Exception.Copyright © 2016 Neeve Research, LLC. All Rights Reserved.