This commit is contained in:
@@ -92,7 +92,7 @@ public abstract class MessageAgent {
|
||||
public abstract MessageConsumer createConsumer(String topic, Consumer<MessageRecord> processor);
|
||||
|
||||
//格式: sncp:req:user
|
||||
protected static String generateSncpReqTopic(NodeServer ns, Service service) {
|
||||
protected static String generateSncpReqTopic(Service service) {
|
||||
String resname = Sncp.getResourceName(service);
|
||||
return "sncp:req:" + Sncp.getResourceType(service).getSimpleName().replaceAll("Service.*$", "").toLowerCase() + (resname.isEmpty() ? "" : ("-" + resname));
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public abstract class MessageAgent {
|
||||
}
|
||||
|
||||
//格式: http:req:user
|
||||
protected static String generateHttpReqTopic(NodeServer ns, Service service) {
|
||||
protected static String generateHttpReqTopic(Service service) {
|
||||
String resname = Sncp.getResourceName(service);
|
||||
return "http:req:" + Rest.getWebModuleName(service.getClass()).toLowerCase() + (resname.isEmpty() ? "" : ("-" + resname));
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ public abstract class MessageConsumer extends Thread {
|
||||
|
||||
public abstract void waitFor();
|
||||
|
||||
public boolean isClosed() {
|
||||
protected boolean isClosed() {
|
||||
return closed;
|
||||
}
|
||||
|
||||
public abstract void close();
|
||||
protected abstract void close();
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ public abstract class MessageProducer extends Thread {
|
||||
|
||||
public abstract CompletableFuture apply(MessageRecord message);
|
||||
|
||||
public abstract void waitFor();
|
||||
protected abstract void waitFor();
|
||||
|
||||
public boolean isClosed() {
|
||||
protected boolean isClosed() {
|
||||
return closed;
|
||||
}
|
||||
|
||||
public abstract void close();
|
||||
protected abstract void close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user