发送者(消息)接口 @author github.kloping
| 11 | * @author github.kloping |
| 12 | */ |
| 13 | public interface Sender { |
| 14 | |
| 15 | /** |
| 16 | * 以JSON方式发送文本消息 |
| 17 | * |
| 18 | * @param text |
| 19 | * @return |
| 20 | */ |
| 21 | Result send(String text); |
| 22 | |
| 23 | /** |
| 24 | * 以JSON方式发送文本消息并引用指定消息 |
| 25 | * |
| 26 | * @param text |
| 27 | * @param message |
| 28 | * @return |
| 29 | */ |
| 30 | Result send(String text, RawMessage message); |
| 31 | |
| 32 | /** |
| 33 | * 以各种方式 达到想要发送的效果 |
| 34 | * |
| 35 | * @param msg |
| 36 | * @return |
| 37 | */ |
| 38 | Result send(SendAble msg); |
| 39 | |
| 40 | /** |
| 41 | * 以自定义方式发送消息 |
| 42 | * |
| 43 | * @param packet |
| 44 | * @return |
| 45 | */ |
| 46 | default Result send(MessagePacket packet) { |
| 47 | return null; |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * 自定义消息 |
| 52 | * |
| 53 | * @param msg |
| 54 | * @return |
| 55 | */ |
| 56 | default Result send(RawPreMessage msg) { |
| 57 | return null; |
| 58 | } |
| 59 | } |
no outgoing calls
no test coverage detected