public class WeChatJmsExternalConversationSystemAdapter extends Object implements WeChatExternalConversationSystemAdapter
Modifier and Type | Field and Description |
---|---|
protected JmsMessageOperations |
jmsMessagingOperations |
protected int |
maximumMessageSize |
protected String |
outboundMessageDestination |
protected WechatEmojiConverter |
wechatEmojiConverter |
Constructor and Description |
---|
WeChatJmsExternalConversationSystemAdapter(JmsMessageOperations jmsMessagingOperations,
String outboundMessageDestination,
int maximumMessageSize,
WechatEmojiConverter wechatEmojiConverter) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkMessageSize(String content) |
String |
convertAndCheckMessageSize(String message) |
ExternalMessageBuilder |
createMessageBuilder()
Creates the
ExternalMessageBuilder that is responsible for constructing the external message
for the give external user id. |
WeChatTemplateMessageBuilder |
createTemplateMessageBuilder()
Create a message builder for the WeChat template message.
|
String |
getExternalSystemId()
Returns the id of the external system implemented by this adapter.
|
void |
sendMessageDuringCommitting(OutboundMessageDto outboundMessage) |
void |
sendOutboundMessage(OutboundMessageDto outboundMessage) |
void |
validateMessageContent(String messageContent,
String messageCategory)
Validates the content of the message.
|
protected final JmsMessageOperations jmsMessagingOperations
protected final String outboundMessageDestination
protected final int maximumMessageSize
protected final WechatEmojiConverter wechatEmojiConverter
public WeChatJmsExternalConversationSystemAdapter(JmsMessageOperations jmsMessagingOperations, String outboundMessageDestination, int maximumMessageSize, WechatEmojiConverter wechatEmojiConverter)
public String getExternalSystemId()
ExternalConversationSystemAdapter
getExternalSystemId
in interface ExternalConversationSystemAdapter
public ExternalMessageBuilder createMessageBuilder()
ExternalConversationSystemAdapter
ExternalMessageBuilder
that is responsible for constructing the external message
for the give external user id.
This is invoked by the engage system when sending out outbound messages.createMessageBuilder
in interface ExternalConversationSystemAdapter
ExternalMessageBuilder
public WeChatTemplateMessageBuilder createTemplateMessageBuilder()
WeChatExternalConversationSystemAdapter
createTemplateMessageBuilder
in interface WeChatExternalConversationSystemAdapter
public void validateMessageContent(String messageContent, String messageCategory)
ExternalConversationSystemAdapter
validateMessageContent
in interface ExternalConversationSystemAdapter
messageContent
- the content of the message that should be validatedmessageCategory
- the message categoryprotected boolean checkMessageSize(String content)
public void sendOutboundMessage(OutboundMessageDto outboundMessage)
public void sendMessageDuringCommitting(OutboundMessageDto outboundMessage)