From aebc85d89775a3e77146b57c79024627071c508b Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Tue, 26 Jun 2012 21:19:45 +0300 Subject: [PATCH] clarify passing of channel DATAREDIS-77 --- docs/src/reference/docbook/reference/redis-messaging.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/src/reference/docbook/reference/redis-messaging.xml b/docs/src/reference/docbook/reference/redis-messaging.xml index 35badadfa..e51901f2d 100644 --- a/docs/src/reference/docbook/reference/redis-messaging.xml +++ b/docs/src/reference/docbook/reference/redis-messaging.xml @@ -122,7 +122,8 @@ template.convertAndSend("hello!", "world");]]> various message handling methods are strongly typed according to the contents of the various Message types that they can receive and - handle. + handle. In addition, the channel or pattern to which a message is sent can be passed in + to the method as the second argument of type String: public interface MessageDelegate { @@ -133,6 +134,9 @@ template.convertAndSend("hello!", "world");]]> void handleMessage(byte[] message); void handleMessage(Serializable message); + + // pass the channel/pattern as well + void handleMessage(Serializable message, String channel); } public class DefaultMessageDelegate implements MessageDelegate {