MsgEngine class

消息引擎

Constructors

MsgEngine()
factory

Properties

isDestroying ↔ bool
是否正在释放
read / write
isEmpty → bool
消息队列是否为空
read-only
isPause ↔ bool
是否暂停
read / write
msgHandler MsgHandlerEvent
引擎自带的消息处理器
read / write
msgQueueLength → int
消息队列长度
read-only
onLog MsgEngineLogEvent
日志输出事件
read / write
speedRatio ↔ int
消息分发速率。此值越大,消息分发速度越快,越容易卡界面
read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clearRegister() → void
解除所有已经注册的消息处理器
existHandler(List<MsgProcHandler> handlers, MsgProcHandler value) → bool
getHandlerList(int msgId) → List<MsgProcHandler>
获取指定MsgID的消息处理器链表
pause([bool value = true]) → void
暂停消息引擎
register(MsgProcHandler msgHandler, int msgId) → void
消息处理器注册
registers(MsgProcHandler msgHandler, List<int> msgIds) → void
消息处理器注册
regMsg(int msgId, MsgProcHandlerCallBack msgProcess) → void
注册消息
sendMsg(MsgPack msg) → void
发送消息
sendMsgSync(MsgPack msg) → void
同步发送消息
sendMsgToHandler(List<MsgProcHandler> handler, MsgPack msg) → void
start() → void
开始消息引擎
stop() → void
停止消息引擎
unRegister(int msgId) → void
反注册消息ID
unRegisterHandler(MsgProcHandler msgHandler) → void
反注册消息处理器
unRegMsg(int msgId) → void
取消注册的消息ID
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

instance MsgEngine
单例的消息引擎
read-only

Static Methods

currentTimeMillis() → int