ucgameseversdk java說明用于參考實現(xiàn)支付回調(diào)接口_第1頁
ucgameseversdk java說明用于參考實現(xiàn)支付回調(diào)接口_第2頁
ucgameseversdk java說明用于參考實現(xiàn)支付回調(diào)接口_第3頁
ucgameseversdk java說明用于參考實現(xiàn)支付回調(diào)接口_第4頁
ucgameseversdk java說明用于參考實現(xiàn)支付回調(diào)接口_第5頁
已閱讀5頁,還剩6頁未讀 繼續(xù)免費閱讀

付費下載

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

JDK├─bin││perties││UCGameServerSDK-1.0.0.jarjar│ servlet-api-5.5.15.jar調(diào)試時用于WEB端的jar└─src│build.xmlant│readme.txt ├─samples各調(diào)用示例類,已在 │perties│pertieslog4jServerService.java InputStreamin=newBufferedInputStream(newFileInputStream(filePath));Configuration.loadProperties(InputStreamin)Configuration.setProperty("sdkserver.baseUrl","http://s Configuration.setProperty("sdkserver.baseUrl.port","80");Configuration.setProperty("sdkgamedata.baseUrl"," Configuration.setProperty("sdkgamedata.baseUrl.port","8080");Configuration.setProperty("sdkserver.game.gameId","");Configuration.setProperty("sdkserver.game.apikey", -1,項目內(nèi)添加包路徑importcn.uc.g.sdk.cp.model.SDKException;//自定義異常importimportcn.uc.g.sdk.cp.model.SDKException;//自定義異常importcn.uc.g.sdk.cp.model.SessionInfo;//統(tǒng)一賬號會話信息importcn.uc.g.sdk.cp.model.SidInfo;//會話信息importcn.uc.g.sdk.cp.model.UserGameData;//玩家游戲數(shù)據(jù)importcn.uc.g.sdk.cp.model.UserInfo;//玩家綁定 publicstaticpublicstaticvoidmain(String[]args)Stringsid="sst1gamede822428c7f84d9e94c70403c9ae9etry{SidInfosidInfo=SDKServerService.verifySid(sid);}catch(SDKExceptione)System.err.println(e.getErrorCode()+"--"+}} publicstaticSessionInfoSDKServerService.verifySession(StringsidExceptionJava內(nèi)部的其它異常SessionInfopublicStringaccountId32publicintcreatorJY:九游,PP:PPpublicstringnickNameimportimportimportcn.uc.g.sdk.cp.model.SessionInfo;publicclassVerifySessionTestpublicstaticvoidmain(String[]args)Stringsid=trySessionInfosessionInfo=SDKServerService.verifySession(sid);}catch(SDKExceptione)System.err.println(e.getErrorCode()+"--"+}}}publicstaticboolSDKServerService.gameData(Stringsid,UserGameData

sidpublicStringcategorypublicDictionarycontent補充:若category="loginGameRole",則content內(nèi)必須含有下述值:"roleLevelroleName"zoneNameExceptionJava內(nèi)部的其它異常packagecn.uc.g.sdk.cp;packagecn.uc.g.sdk.cp;importjava.util.List;importcn.uc.g.sdk.cp.constant.GameD importcn.uc.g.sdk.cp.constant.OsName;importcn.uc.g.sdk.cp.model.SDKException;importcn.uc.g.sdk.cp.model.gamedata.GuildTopList;importcn.uc.g.sdk.cp.model.gamedata.LoginGameRole;importcn.uc.g.sdk.cp.model.gamedata.RoleLevelTopList;importcn.uc.g.sdk.cp.model.gamedata.RolePowerTopList;importcn.uc.g.sdk.cp.model.gamedata.UserInfo;importpublicclassGameDataServiceTestpublicstaticvoidmain(String[]args)StringaccountId= List<GameData>gameDataList=new必接功能*LoginGameRoleloginGameRole=newLoginGameRole(); GameDataroleData=newGameData(GameDategory.LOGIN_GAME_ROLE,loginGameRole);*userInfoList<UserInfo>userInfoList=newArrayList<UserInfo>();UserInfouserInfo1=newUserInfo();UserInfouserInfo2=newUserInfo(); GameDatauserInfoData=newGameData(GameDategory.USER_INFO,userInfoList);List<RoleLevelTopList>roleLevelTopList=newArrayList<RoleLevelTopList>();RoleLevelTopListroleLevelTopList1=newRoleLevelTopList();RoleLevelTopListroleLevelTopList2=newRoleLevelTopList();

GameDataroleLevelTopData=newGameData(GameDategory.ROLELEVEL_TOPLIST,roleLevelTopList);List<RolePowerTopList>rolePowerTopList=newArrayList<RolePowerTopList>();RolePowerTopListrolePowerTopList1=newRolePowerTopList();RolePowerTopListrolePowerTopList2=new

GameDatarolePowerTopData=newGameData(GameDategory.ROLEPOWER_TOPLIST,rolePowerTopList);*guildTopList為游戲中公會榜,選List<GuildTopList>guildTopList=newArrayList<GuildTopList>();GuildTopListguildTopList1=newGuildTopList();GuildTopListguildTopList2=newGameDataguildTopData=newGameData(GameDategory.GUILD_TOP_LIST,guildTopList);*,*trybooleanresult=SDKServerService.gameData(accountId,gameDataList);}catch(SDKExceptione)System.err.println(e.getErrorCode()+"--"+}}}publicstaticRealNameInfogetRealNameStatus(Stringsid)throws sidExceptionJava內(nèi)部的其它異常RealNameInfo-當(dāng)前用戶實名制信publicbooleanrealNameStatus-true-已完成實名;false-未實packagepackageimportcn.uc.g.sdk.cp.model.RealNameInfo;importcn.uc.g.sdk.cp.model.SDKException; publicclassGetRealNameTestpublicstaticvoidmain(String[]args)Stringsid=tryRealNameInforealNameInfo=SDKServerService.getRealNameStatus(sid);}catch(SDKExceptione)System.err.println(e.getErrorCode()+"--"+}}}verifySid[已接入九游SDK的游戲CP為兼容舊接口時使用publicstaticSidInfoSDKServerService.verifySid(String用戶會話驗證接口,CPserver可以拿到該sid到SDKserver

sid SidInfo

publicstringnickNamepublicintucid-ucimportimportimportimportpublic

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論