tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 1 | package org.onlab.onos.store.cluster.messaging; |
| 2 | |
tom | 8158314 | 2014-09-30 01:40:29 -0700 | [diff] [blame] | 3 | import org.onlab.onos.cluster.NodeId; |
| 4 | |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 5 | /** |
| 6 | * Represents a message consumer. |
| 7 | */ |
| 8 | public interface MessageSubscriber { |
| 9 | |
| 10 | /** |
| 11 | * Receives the specified cluster message. |
| 12 | * |
tom | 8158314 | 2014-09-30 01:40:29 -0700 | [diff] [blame] | 13 | * @param message message to be received |
| 14 | * @param fromNodeId node from which the message was received |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 15 | */ |
Madan Jampani | 890bc35 | 2014-10-01 22:35:29 -0700 | [diff] [blame] | 16 | void receive(Object messagePayload, NodeId fromNodeId); |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 17 | |
| 18 | } |