diff options
author | Goblin911 <goblinliu@gmail.com> | 2013-08-26 15:17:52 +0800 |
---|---|---|
committer | Goblin911 <goblinliu@gmail.com> | 2013-08-26 15:17:52 +0800 |
commit | 772e758cf0b992517dd7435d6ba7a32a9901cf0b (patch) | |
tree | 362a13588735285a4f972f4fc0ad341a17d2bacf /client/Piztor/src/com/macaroon/piztor/Main.java | |
parent | 70dda8318c79e8c92659ab6be8750efd31b6c6b1 (diff) |
add error token jump!
Diffstat (limited to 'client/Piztor/src/com/macaroon/piztor/Main.java')
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/Main.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/client/Piztor/src/com/macaroon/piztor/Main.java b/client/Piztor/src/com/macaroon/piztor/Main.java index 17a8b1e..573c753 100644 --- a/client/Piztor/src/com/macaroon/piztor/Main.java +++ b/client/Piztor/src/com/macaroon/piztor/Main.java @@ -49,8 +49,10 @@ public class Main extends PiztorAct { ResUpdate update = (ResUpdate) m.obj; if (update.t == 0) System.out.println("update success"); - else + else { System.out.println("update failed"); + actMgr.trigger(AppMgr.errorToken); + } break; case 2: ResLocation location = (ResLocation) m.obj; @@ -64,14 +66,17 @@ public class Main extends PiztorAct { } else { System.out .println("resquest for location must be wrong!!!"); + actMgr.trigger(AppMgr.errorToken); } break; case 3: ResUserinfo r = (ResUserinfo) m.obj; if (r.s == 0) { - System.out.println(r.id + " " + r.sex + " " + r.groupId); + System.out.println("id : " + r.uid + " sex : " + r.sex + + " group : " + r.gid); } else { System.out.println("reqest for userInfo must be wrong!!!"); + actMgr.trigger(AppMgr.errorToken); } break; default: @@ -110,6 +115,12 @@ public class Main extends PiztorAct { @Override void enter(int e) { System.out.println("enter start status!!!!"); + if (e == ActMgr.Create) { + AppMgr.transam.send(new ReqUserinfo(UserInfo.token, + UserInfo.username, UserInfo.id, System + .currentTimeMillis(), 5000)); + } + if (e == TimerFlush) { ReqLocation r = new ReqLocation(UserInfo.token, UserInfo.username, 1, System.currentTimeMillis(), 1000); |