SmsPipeline.java
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.diligrp.cashier.assistant.pipeline;
import com.diligrp.cashier.assistant.domain.SmsMessage;
import com.diligrp.cashier.assistant.type.SmsPipelineType;
public abstract class SmsPipeline {
// 通道编码
protected final int code;
// 通道名称
protected final String name;
// 通道类型
protected final SmsPipelineType type;
public SmsPipeline(int code, String name, SmsPipelineType type) {
this.code = code;
this.name = name;
this.type = type;
}
/**
* 根据短信模版发送短信
*
* @param message - 短信
* @return 短信唯一标识
*/
public abstract String sendSmsMessage(SmsMessage message);
public void destroy() {
}
/**
* 获取通道code
*/
public int getCode() {
return this.code;
}
/**
* 获取通道编码
*/
public String getName() {
return this.name;
}
/**
* 获取通道类型
*/
public SmsPipelineType getType() {
return this.type;
}
}