|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TopicResolver<T extends MessageView>
A TopicResolver
resolves a channel key for a message being sent
on a given channel.
Method Summary | |
---|---|
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 . |
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |