This commit is contained in:
Redkale
2020-06-03 14:03:46 +08:00
parent 14808cb01c
commit 6cdbe957a7
2 changed files with 7 additions and 3 deletions

View File

@@ -346,6 +346,7 @@ public class NodeHttpServer extends NodeServer {
}
}
}
if (agent != null) this.messageAgents.put(agent.getName(), agent);
//输出信息
if (ss != null && !ss.isEmpty() && sb != null) {
ss.sort((AbstractMap.SimpleEntry<String, String[]> o1, AbstractMap.SimpleEntry<String, String[]> o2) -> o1.getKey().compareTo(o2.getKey()));

View File

@@ -85,6 +85,9 @@ public abstract class NodeServer {
//远程模式的Service对象集合
protected final Set<Service> remoteServices = new LinkedHashSet<>();
//MessageAgent对象集合
protected final Map<String, MessageAgent> messageAgents = new HashMap<>();
private volatile int maxClassNameLength = 0;
private volatile int maxNameLength = 0;
@@ -540,15 +543,15 @@ public abstract class NodeServer {
agent.deregister(this, protocol, localServices, remoteServices);
}
}
if (application.messageAgents != null) { //MQ
if (!this.messageAgents.isEmpty()) { //MQ
}
}
//Server.start执行之后调用
protected void postStartServer(Set<Service> localServices, Set<Service> remoteServices) {
if (application.messageAgents != null) { //MQ
final MessageAgent agent = application.messageAgents[0];
if (!this.messageAgents.isEmpty()) { //MQ
this.messageAgents.values().forEach(agent -> agent.start());
}
}