public class RedisMessageSubscriber extends Object implements org.springframework.data.redis.connection.MessageListener
| 构造器和说明 |
|---|
RedisMessageSubscriber() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onMessage(org.springframework.data.redis.connection.Message message,
byte[] pattern)
Callback for processing received objects through Redis.
|
static void |
registryMessageService(MessageService messageService)
注册消息处理器
|
void |
setRedisTemplate(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate) |
public void onMessage(org.springframework.data.redis.connection.Message message,
@Nullable
byte[] pattern)
onMessage 在接口中 org.springframework.data.redis.connection.MessageListenermessage - message must not be null.pattern - pattern matching the channel (if specified) - can be null.public void setRedisTemplate(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate)
public static void registryMessageService(MessageService messageService)
messageService - 消息处理器Copyright © 2020. All rights reserved.