| Class info |
| public final class Channel extends GenericJson |
| 资源变更通知通道数据模型类。 |
| Constructor name |
Channel() Channel类构造方法。 |
| Return type | Method name |
| String | getUrl() 获取接收通道通知的业务服务器地址。 |
| Channel | setUrl(String url) 设置接收通道通知的业务服务器地址。 |
| String | getId() 获取一个唯一的ID,标识这个订阅通道。 |
| Channel | setId(String id) 设置一个唯一的ID,标识这个订阅通道。 |
| String | getCategory() 获取资源类型,固定值为api#channel。 |
| Channel | setCategory(String category) 设置资源类型,固定值为api#channel。 |
| String | getResourceId() 资源ID,标识通道上正在监视的资源。 |
| Channel | setResourceId(String resourceId) 设置资源ID,标识通道上正在监视的资源。 |
| String | getResourceUri() 资源版本标识符。 |
| Channel | setResourceUri(String resourceUri) 资源版本标识符。 |
| String | getUserToken() 任意字符串,携带回传给url。 |
| Channel | setUserToken(String userToken) 任意字符串,携带回传给url。 |
| String | getType() 发送机制类型,当前固定值web_hook。 |
| Channel | setType(String type) 设置发送机制类型,当前固定值web_hook。 |
| Long | getExpirationTime() 通知通道到期的日期和时间。 |
| Channel | setExpirationTime(Long expirationTime) 通知通道到期的日期和时间。 |
| Map<String,String> | getParams() 获取控制下发信道行为的附加参数。 |
| Channel | setParams(Map<String,String> params) 设置控制下发信道行为的附加参数。 |
| Boolean | getPayload() 获取是否需要信道的有效载荷。 |
| Channel | setPayload(Boolean payload) 设置是否需要信道的有效载荷。 |
| Channel | set(String fieldName, Object value) 设置自定义属性及属性值。 |
| Channel | clone() 克隆一个Channel类对象。 |
| constructor |
| Channel() |
| 构造一个Channel类对象。 |
| Method |
| public String getUrl() |
| 获取接收通道通知的业务服务器地址。 |
Return
| type | desc |
| String | 返回接收通道通知的业务服务器地址。 |
| Method |
public Channel setUrl(String url) |
| 设置接收通道通知的业务服务器地址 |
Parameters
| Parameter name | Parameter desc |
| url | 接收通道通知的业务服务器地址,必须为HTTPS地址,格式为https://…… 。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public String getId() |
| 获取一个唯一的ID,标识这个订阅通道。 |
Return
| type | desc |
| String | 唯一的ID,标识这个订阅通道。 |
| Method |
public Channel setId(String id) |
| 设置一个唯一的ID,标识这个订阅通道。 |
Parameters
| Parameter name | Parameter desc |
| id | 唯一的ID,标识这个订阅通道。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public String getCategory() |
| 获取资源类型,固定值为api#channel。 |
Return
| type | desc |
| String | 资源类型,固定值为api#channel。 |
| Method |
public Channel setCategory(String category) |
| 设置资源类型,固定值为api#channel。 |
Parameters
| Parameter name | Parameter desc |
| category | 资源类型,固定值为api#channel。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public String getResourceId() |
| 资源ID,标识通道上正在监视的资源。 |
Return
| type | desc |
| String | 资源ID,标识通道上正在监视的资源。 |
| Method |
public Channel setResourceId (String resourceId) |
| 资源ID,标识通道上正在监视的资源。 |
Parameters
| Parameter name | Parameter desc |
| resourceId | 资源ID,标识通道上正在监视的资源(响应结果必选)。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public String getResourceUri() |
| 资源版本标识符。 |
Return
| type | desc |
| String | 资源版本标识符。 |
| Method |
public Channel setResourceUri (String resourceUri) |
| 资源版本标识符。 |
Parameters
| Parameter name | Parameter desc |
| resourceUri | 资源版本标识符(响应结果必选)。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public String getUserToken() |
| 任意字符串,携带回传给url。 |
Return
| type | desc |
| String | 任意字符串,携带回传给url。 |
| Method |
public Channel setUserToken (String userToken) |
| 任意字符串,携带回传给url。 |
Parameters
| Parameter name | Parameter desc |
| userToken | 任意字符串。发送消息回调通知时,回传给业务,可选参数,如业务方接收的回调通知中需要携带userToken信息,可设置该参数,格式要求:使用数字或字母(大小写均可),长度<=64。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public String getType() |
| 发送机制类型,当前固定值web_hook,表示通过web类型进行回调通知。 |
Return
| type | desc |
| String | 发送机制类型,当前固定值web_hook,表示通过web类型进行回调通知。 |
| Method |
public Channel setType(String type) |
| 设置发送机制类型,当前固定值web_hook,表示通过web类型进行回调通知。 |
Parameters
| Parameter name | Parameter desc |
| type | 发送机制类型,当前固定值web_hook,表示通过web类型进行回调通知。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public Long getExpirationTime() |
| 通知通道到期的日期和时间,以Unix时间戳表示,以毫秒为单位,File资源最长1天,Change资源最长一周。 |
Return
| type | desc |
| Long | 通知通道到期的日期和时间。 |
| Method |
public Channel setExpirationTime (Long expirationTime) |
| 设置通知通道到期的日期和时间。 |
Parameters
| Parameter name | Parameter desc |
| expirationTime | 通知通道到期的日期和时间,以Unix时间戳表示,以毫秒为单位,File资源最长1天,Change资源最长一周。不传的话,Change资源默认有效期1周。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public Map<String,String> getParams() |
| 获取控制下发信道行为的附加参数。 |
Return
| type | desc |
| Map<String, String> | 控制下发信道行为的附加参数。 |
| Method |
public Channel setParams(Map<String,String> params) |
| 设置控制下发信道行为的附加参数。 |
Parameters
| Parameter name | Parameter desc |
| params | 控制下发信道行为的附加参数。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public Boolean getPayload() |
| 获取是否需要信道的有效载荷。 |
Return
| type | desc |
| Boolean | 是否需要信道的有效载荷。 |
| Method |
public Channel setPayload(Boolean payload) |
| 设置是否需要信道的有效载荷。 |
Parameters
| Parameter name | Parameter desc |
| payload | 是否需要信道的有效载荷。true:需要,false:无需。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public Channel clone() |
| 克隆一个Channel类对象。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |
| Method |
public Channel set(String fieldName,Object value) |
| 设置自定义属性及属性值。 |
Parameters
| Parameter name | Parameter desc |
| fieldName | 属性名称。 |
| value | 属性值。 |
Return
| type | desc |
| Channel | 返回一个Channel对象。 |