Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
黄志磊
committed
Feb 14, 2016
1 parent
2a72c85
commit 4929e5a
Showing
24 changed files
with
139 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ | |
*.jar | ||
*.war | ||
*.ear | ||
*.iml | ||
*.iml | ||
./target/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
mpush-client/src/main/java/com/shinemo/mpush/push/Main.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.shinemo.mpush.push; | ||
|
||
import com.shinemo.mpush.api.PushSender; | ||
import com.shinemo.mpush.tools.Jsons; | ||
|
||
import java.util.Arrays; | ||
import java.util.concurrent.locks.LockSupport; | ||
|
||
/** | ||
* Created by ohun on 2016/1/7. | ||
*/ | ||
public class Main { | ||
public static void main(String[] args) throws Exception { | ||
PushClient client = new PushClient(); | ||
client.start(); | ||
Thread.sleep(1000); | ||
for (int i = 0; i < 100; i++) { | ||
PushContent content = new PushContent("msgId_" + (i % 2), "MPush", "this a first push." + i); | ||
|
||
client.send(Jsons.toJson(content), Arrays.asList("user-0", "8"), new PushSender.Callback() { | ||
@Override | ||
public void onSuccess(String userId) { | ||
System.err.println("push onSuccess userId=" + userId); | ||
} | ||
|
||
@Override | ||
public void onFailure(String userId) { | ||
System.err.println("push onFailure userId=" + userId); | ||
} | ||
|
||
@Override | ||
public void onOffline(String userId) { | ||
System.err.println("push onOffline userId=" + userId); | ||
} | ||
|
||
@Override | ||
public void onTimeout(String userId) { | ||
System.err.println("push onTimeout userId=" + userId); | ||
} | ||
}); | ||
Thread.sleep(10000); | ||
} | ||
LockSupport.park(); | ||
} | ||
|
||
} |
10 changes: 5 additions & 5 deletions
10
...mo/mpush/test/push/GatewayClientMain.java → ...va/com/shinemo/mpush/push/PushClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../shinemo/mpush/test/push/PushContent.java → ...a/com/shinemo/mpush/push/PushContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...inemo/mpush/test/push/PushRequestBus.java → ...om/shinemo/mpush/push/PushRequestBus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tener/impl/GatewayServerPathListener.java → ...tener/impl/GatewayServerPathListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
mpush-client/src/main/resources/mpush/services/com.shinemo.mpush.common.manage.ServerManage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gatewayServerManage=com.shinemo.mpush.push.manage.impl.GatewayServerManage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
mpush-core/src/main/java/com/shinemo/mpush/core/client/GatewayClient.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters