public class WxCpTpMessageRouterRule extends Object
限定符 | 构造器和说明 |
---|---|
protected |
WxCpTpMessageRouterRule(WxCpTpMessageRouter routerBuilder)
Instantiates a new Wx cp message router rule.
|
protected WxCpTpMessageRouterRule(WxCpTpMessageRouter routerBuilder)
routerBuilder
- the router builderpublic WxCpTpMessageRouterRule async(boolean async)
async
- the asyncpublic WxCpTpMessageRouterRule agentId(Integer agentId)
agentId
- the agent idpublic WxCpTpMessageRouterRule msgType(String msgType)
msgType
- the msg typepublic WxCpTpMessageRouterRule event(String event)
event
- the eventpublic WxCpTpMessageRouterRule eventKey(String eventKey)
eventKey
- the event keypublic WxCpTpMessageRouterRule eventKeyRegex(String regex)
regex
- the regexpublic WxCpTpMessageRouterRule content(String content)
content
- the contentpublic WxCpTpMessageRouterRule rContent(String regex)
regex
- the regexpublic WxCpTpMessageRouterRule fromUser(String fromUser)
fromUser
- the from userpublic WxCpTpMessageRouterRule matcher(WxCpMessageMatcher matcher)
matcher
- the matcherpublic WxCpTpMessageRouterRule interceptor(WxCpTpMessageInterceptor interceptor)
interceptor
- the interceptorpublic WxCpTpMessageRouterRule interceptor(WxCpTpMessageInterceptor interceptor, WxCpTpMessageInterceptor... otherInterceptors)
interceptor
- the interceptorotherInterceptors
- the other interceptorspublic WxCpTpMessageRouterRule handler(WxCpTpMessageHandler handler)
handler
- the handlerpublic WxCpTpMessageRouterRule handler(WxCpTpMessageHandler handler, WxCpTpMessageHandler... otherHandlers)
handler
- the handlerotherHandlers
- the other handlerspublic WxCpTpMessageRouter end()
public WxCpTpMessageRouter next()
protected boolean test(WxCpXmlMessage wxMessage)
wxMessage
- the wx messageprotected WxCpXmlOutMessage service(WxCpXmlMessage wxMessage, Map<String,Object> context, WxCpTpService wxCpService, WxSessionManager sessionManager, WxErrorExceptionHandler exceptionHandler)
wxMessage
- the wx messagecontext
- the contextwxCpService
- the wx cp servicesessionManager
- the session managerexceptionHandler
- the exception handlerCopyright © 2020. All rights reserved.