This commit is contained in:
@@ -54,6 +54,9 @@ public final class Application {
|
|||||||
//application.xml 文件中resources节点的内容, 类型: AnyValue
|
//application.xml 文件中resources节点的内容, 类型: AnyValue
|
||||||
public static final String RESNAME_GRES = "APP_GRES";
|
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
|
//当前SNCP Server的IP地址+端口 类型: SocketAddress、InetSocketAddress
|
||||||
public static final String RESNAME_SNCP_ADDRESS = "SNCP_ADDRESS";
|
public static final String RESNAME_SNCP_ADDRESS = "SNCP_ADDRESS";
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.wentch.redkale.boot;
|
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.net.sncp.*;
|
||||||
import com.wentch.redkale.util.AnyValue;
|
import com.wentch.redkale.util.AnyValue;
|
||||||
import com.wentch.redkale.service.Service;
|
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.consumer = server == null ? null : x -> server.addService(x);
|
||||||
this.factory.register(RESNAME_SNCP_ADDRESS, SocketAddress.class, this.servaddr);
|
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_ADDRESS, InetSocketAddress.class, this.servaddr);
|
||||||
|
this.factory.register(RESNAME_SNCP_GROUP, this.nodeGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user