本文整理汇总了Java中org.grain.msg.MsgPacket.getData方法的典型用法代码示例。如果您正苦于以下问题:Java MsgPacket.getData方法的具体用法?Java MsgPacket.getData怎么用?Java MsgPacket.getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.grain.msg.MsgPacket
的用法示例。
在下文中一共展示了MsgPacket.getData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addNotifyHandle
import org.grain.msg.MsgPacket; //导入方法依赖的package包/类
public void addNotifyHandle(MsgPacket msgPacket) {
AddNotify message = (AddNotify) msgPacket.getData();
HttpConfig.log.info("接到推送请求orderRecordId:" + message.getOrderRecordId());
int[] threadId = AsyncThreadManager.getRandomThread();
NotifyClient notifyClient = notifyClientMap.get(threadId[0]);
notifyClient.addNotifyOrder(message.getOrderRecordId());
HttpConfig.log.info("推送请求orderRecordId:" + message.getOrderRecordId() + "到线程" + threadId[0]);
}
示例2: minaServerConnected
import org.grain.msg.MsgPacket; //导入方法依赖的package包/类
/**
* 通知叫name的锁服务器可以使用了
*
* @param msgPacket
*/
public void minaServerConnected(MsgPacket msgPacket) {
IoSession ioSession = (IoSession) msgPacket.getOtherData();
String name = (String) msgPacket.getData();
ioSessionServerMap.put(name, ioSession);
ThreadMsgManager.dispatchThreadMsg(DistributedlockMsg.DISTRIBUTEDLOCK_SERVER_CAN_USE, name, null);
}
示例3: minaServerDisConnect
import org.grain.msg.MsgPacket; //导入方法依赖的package包/类
public void minaServerDisConnect(MsgPacket msgPacket) {
String name = (String) msgPacket.getData();
ioSessionServerMap.remove(name);
}