This commit is contained in:
地平线
2015-08-10 16:44:33 +08:00
parent e6224a4638
commit 3e4d8ba02b
2 changed files with 5 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ public final class Application {
//application.xml 文件中resources节点的内容 类型: AnyValue
public static final String RESNAME_GRES = "APP_GRES";
//当前SNCP Server所属的组 类型: String
public static final String RESNAME_SNCP_GROUP = "SNCP_GROUP";
//当前SNCP Server的IP地址+端口 类型: SocketAddress、InetSocketAddress
public static final String RESNAME_SNCP_ADDRESS = "SNCP_ADDRESS";

View File

@@ -5,7 +5,7 @@
*/
package com.wentch.redkale.boot;
import static com.wentch.redkale.boot.Application.RESNAME_SNCP_ADDRESS;
import static com.wentch.redkale.boot.Application.*;
import com.wentch.redkale.net.sncp.*;
import com.wentch.redkale.util.AnyValue;
import com.wentch.redkale.service.Service;
@@ -33,6 +33,7 @@ public final class NodeSncpServer extends NodeServer {
this.consumer = server == null ? null : x -> server.addService(x);
this.factory.register(RESNAME_SNCP_ADDRESS, SocketAddress.class, this.servaddr);
this.factory.register(RESNAME_SNCP_ADDRESS, InetSocketAddress.class, this.servaddr);
this.factory.register(RESNAME_SNCP_GROUP, this.nodeGroup);
}
@Override