本文整理匯總了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);
}