Package com.github.ambry.commons
Interface TopicListener<T>
-
- Type Parameters:
T
- The type of message the listener will receive.
public interface TopicListener<T>
ATopicListener
can subscribe topics for messages through aNotifier
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onMessage(java.lang.String topic, T message)
After theTopicListener
has subscribed the topic, this method will be called when there is a new message for the topic.
-
-
-
Method Detail
-
onMessage
void onMessage(java.lang.String topic, T message)
After theTopicListener
has subscribed the topic, this method will be called when there is a new message for the topic.- Parameters:
topic
- The topic thisTopicListener
subscribes.message
- The message for the topic.
-
-