提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.framework.mq.redis.core.message; |
H |
2 |
|
|
3 |
import lombok.Data; |
|
4 |
|
|
5 |
import java.util.HashMap; |
|
6 |
import java.util.Map; |
|
7 |
|
|
8 |
/** |
|
9 |
* Redis 消息抽象基类 |
|
10 |
* |
|
11 |
* @author iailab |
|
12 |
*/ |
|
13 |
@Data |
|
14 |
public abstract class AbstractRedisMessage { |
|
15 |
|
|
16 |
/** |
|
17 |
* 头 |
|
18 |
*/ |
|
19 |
private Map<String, String> headers = new HashMap<>(); |
|
20 |
|
|
21 |
public String getHeader(String key) { |
|
22 |
return headers.get(key); |
|
23 |
} |
|
24 |
|
|
25 |
public void addHeader(String key, String value) { |
|
26 |
headers.put(key, value); |
|
27 |
} |
|
28 |
|
|
29 |
} |