麻将类图
2017-11-27 11:33:45 0 举报
麻将类图
作者其他创作
大纲/内容
EnterTableMessageServiceImpl
+ execute(NetMsg)
MjClubTableServiceImpl
+ create(CreateTableMsg msg)
ZhaJinHuaLogicServiceImpl
OwnerPayServiceImpl
+ pay()
DefaultPokerLogicServiceImpl
+ operate()
房间模块
PlayerOperationMessageServiceImpl
JinTiaoServiceImpl
+ query()+ update()
ILogicService
IPokerTableService
+ c()
第三方模块
IDataBaseService
+ e()
ICacheService
+ g()
PokerJinTiaoTableServiceImpl
IDataCenterService
+ f()
1. 消息从客户端传到MsgLoop;2. MsgLoop根据不同的类型传到相应的IMessageService实例;3. 如果是不需要走异步的消息,则子类直接实现IMessageService接口并在process方法中处理消息即可;4. 如果是需要走异步的消息,则子类直接继承DefaultMessageExecutorService即可,并在execute方法中处理消息;5. DefaultMessageExecutorService类实现了IMessageService的process方法,这里只用作把消息添加到不同的线程中,具体的消息处理在其子类的execute方法中处理;6. MessageThead的run方法会调用IMessageExecutorService的execute方法;
AaPayServiceImpl
DefaultLogicServiceImpl
IPayService
消息模块
MsgLoop
- msgQueue
+ run()
DefaultPokerTableServiceImpl
+ b()+ c()
HongZhongMjJinTiaoTableServiceImpl
+ b()
NiuNiuLogicServiceImpl
DefaultTableServiceImpl
+ a()
子游戏
DefaultMjTableServiceImpl
IMjLogicService
+ chi()+ peng()+ gang()+ hu()
DefaultMjLogicServiceImpl
+ operate()+ chi()+ peng()+ gang()+ hu()
WinnerPayServiceImpl
DiamondServiceImpl
MessageThread
+ run()+ pop()+ push()
DefaultJinTiaoTableServiceImpl
+ create(CreateTableMsg msg)+ enter()+ b()
GoldServiceImpl
MjVipTableServiceImpl
XinYangMjLogicServiceImpl
+ peng()
DefaultClubTableServiceImpl
PokerVipTableServiceImpl
支付模块
IMessageExecutorService
CreateTableMessageServiceImpl
IMessageService
+ process(NetMsg)
DefaultGoldTableServiceImpl
HeartMessageServiceImpl
DefaultMessageExecutorService
MjJinTiaoTableServiceImpl
ICurrencyService
HongZhongMjLogicServiceImpl
+ chi()
ITableService
+ create(CreateTableMsg msg)+ enter()+ a()+ b()
DefaultPayServiceImpl
牌局模块
0 条评论
下一页