首页>代码>java实现即时消息提醒方法>/java推送/service/RtcService.java
/**
 * 文件名: RtcService.java    2012-7-17
 */
package com.gxzy.framework.comm.rtc.service;

import java.util.List;

import javax.servlet.AsyncContext;

import com.gxzy.framework.comm.rtc.entity.RtcMessage;
import com.gxzy.framework.util.bean.Pagination;

/**
 * 即时通讯服务接口
 * @作者 AMY
 * @版本 1.0
 */
public interface RtcService
{
	
	public List<RtcMessage> list(String username,Integer limit);
	
	
	Pagination<RtcMessage> list(Pagination<RtcMessage> page,String username);
	
    /**
     * 发送一条消息到指定用户
     * @param msg 消息(消息中必须指定好接收用户)
     */
    public void sendToOne(RtcMessage msg);
    
    /**
     * 发送消息到所有在线用户
     * @param msg 消息(消息体中指定的接收用户名不会被使用)
     */
    public void sendToAllOnline(RtcMessage msg);
    
    /**
     * 发送消息到除了发送者之外的所有在线用户
     * @param msg 消息(必须指定发送者)
     */
    public void sendToAllOthersOnline(RtcMessage msg);
    
    /**
     * 唤醒一个已存在的连接
     * @param key 关键字段
     */
    public void wakeupConnection(String key);
    
    /**
     * 初始化一个新连接
     * @param key 关键字段
     */
    public void setupConnection(String username, AsyncContext context);
    
    public void deleteMessages(String username);
    
    void readMessage(String msgId);
    
    void deleteMessage(List<String> msgId);
}
最近下载更多
zgf099  LV1 2022年9月19日
hanweinan6  LV12 2022年9月16日
Jack261108  LV2 2022年5月6日
hnn0909  LV1 2022年4月2日
lyxtmy  LV1 2022年1月27日
msssg123  LV1 2022年1月25日
ruiqiujuice  LV1 2021年12月21日
密码烟雨城  LV1 2021年12月13日
cyx1314cmx 2021年11月13日
暂无贡献等级
duntmund  LV5 2021年11月2日
最近浏览更多
西瓜哥哥  LV4 2023年12月17日
诚壹lllyz 2023年11月17日
暂无贡献等级
溪若白  LV1 2023年7月13日
Dominick  LV14 2023年6月19日
zzhua195  LV6 2023年5月29日
wuziayng1232  LV10 2023年2月21日
long123_356  LV5 2022年12月10日
BestClever  LV32 2022年12月5日
1358849392  LV21 2022年11月11日
alonely23  LV1 2022年10月20日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友