You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
843 B
31 lines
843 B
|
3 years ago
|
package com.bx.imclient;
|
||
|
|
|
||
|
|
import com.bx.common.model.im.GroupMessageInfo;
|
||
|
|
import com.bx.common.model.im.PrivateMessageInfo;
|
||
|
|
import com.bx.imclient.listener.MessageListenerMulticaster;
|
||
|
|
import com.bx.imclient.sender.IMSender;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.context.annotation.Configuration;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
@Configuration
|
||
|
|
public class IMClient {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private MessageListenerMulticaster listenerMulticaster;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private IMSender imSender;
|
||
|
|
|
||
|
|
public void sendPrivateMessage(Long userId, PrivateMessageInfo... messageInfo){
|
||
|
|
imSender.sendPrivateMessage(userId,messageInfo);
|
||
|
|
}
|
||
|
|
|
||
|
|
public void sendGroupMessage(List<Long> userTokens, GroupMessageInfo... messageInfo){
|
||
|
|
imSender.sendGroupMessage(userTokens,messageInfo);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|