All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mingbo.mcs.client.message.MessageDeliver Maven / Gradle / Ivy

/**
 * Copyright (c) 2019, Hangzhou Mingbo Technology Co., Ltd. ([email protected]).
 * 

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *

* http://www.apache.org/licenses/LICENSE-2.0 *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.mingbo.mcs.client.message; import com.alibaba.fastjson.JSONObject; import io.mingbo.mcs.client.constant.DeliverActionType; /** * @author Sinlmao * @program MingBo-Message-Center-System-Client * @description MCS递送/透传消息,deliver格式:{ option:"deliver", sid:"xxx", action:"item", channel:"test", item:"test", sequence:0, content:"xxx", time:"2018-09-28 17:22:00" } * @create 2019-12-09 10:43 */ public class MessageDeliver extends MessageBase { //消息通道 private String channel; //消息组别 private String item; //消息组别 private String sid; //消息内容 private JSONObject content; public MessageDeliver() { this.setOption("deliver"); } public MessageDeliver(DeliverActionType type) { this.setOption("deliver"); switch (type) { case Channel: this.setAction("channel"); break; case Item: this.setAction("item"); break; case SID: this.setAction("sid"); break; } } public String getChannel() { return channel; } public void setChannel(String channel) { this.channel = channel; } public String getItem() { return item; } public void setItem(String item) { this.item = item; } public JSONObject getContent() { return content; } public void setContent(JSONObject content) { this.content = content; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy