Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gateway server与 connection server 集成
- Loading branch information
黄志磊
committed
Jan 16, 2016
1 parent
bd28c09
commit c3b1bfe
Showing
7 changed files
with
75 additions
and
100 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
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
18 changes: 11 additions & 7 deletions
18
mpush-cs/src/main/java/com/shinemo/mpush/cs/GatewayServerApplication.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,16 +1,20 @@ | |||
package com.shinemo.mpush.cs; | package com.shinemo.mpush.cs; | ||
|
|
||
import com.shinemo.mpush.common.Application; | |||
import com.shinemo.mpush.tools.MPushUtil; | import com.shinemo.mpush.tools.MPushUtil; | ||
import com.shinemo.mpush.tools.config.ConfigCenter; | import com.shinemo.mpush.tools.config.ConfigCenter; | ||
import com.shinemo.mpush.tools.zk.ZKPath; | import com.shinemo.mpush.tools.zk.ZKPath; | ||
|
|
||
public class GatewayServerApplication extends Application{ |
|
||
|
public class GatewayServerApplication extends ConnectionServerApplication{ | ||
|
|||
public GatewayServerApplication() { | public GatewayServerApplication() { | ||
setPort(ConfigCenter.holder.gatewayServerPort()); | this(ConfigCenter.holder.gatewayServerPort(),ZKPath.GATEWAY_SERVER.getWatchPath(),MPushUtil.getLocalIp()); | ||
setServerRegisterZkPath(ZKPath.GATEWAY_SERVER.getWatchPath()); | |||
setIp(MPushUtil.getLocalIp()); | |||
} | } | ||
|
|
||
public GatewayServerApplication(int port,String path,String ip) { | |||
setPort(port); | |||
setServerRegisterZkPath(path); | |||
setIp(ip); | |||
} | |||
|
|||
} | } |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
package com.shinemo.mpush.cs; | |||
|
|||
public class Main { | |||
|
|||
public static void main(String[] args) { | |||
final ConnectionServerMain connectionServerMain = new ConnectionServerMain(); | |||
connectionServerMain.start(); | |||
Runtime.getRuntime().addShutdownHook(new Thread() { | |||
public void run() { | |||
connectionServerMain.stop(); | |||
} | |||
}); | |||
} | |||
|
|||
} |
28 changes: 0 additions & 28 deletions
28
mpush-cs/src/main/java/com/shinemo/mpush/cs/manage/impl/PushServerManage.java
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
mpush-cs/src/main/java/com/shinemo/mpush/cs/zk/listener/impl/PushServerPathListener.java
This file was deleted.
Oops, something went wrong.