This commit is contained in:
@@ -31,6 +31,11 @@ public class HttpMessageClient extends MessageClient {
|
|||||||
return messageAgent.generateHttpReqTopic(module);
|
return messageAgent.generateHttpReqTopic(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//格式: http.req.user-n10
|
||||||
|
public String generateHttpReqTopic(String module, String resname) {
|
||||||
|
return messageAgent.generateHttpReqTopic(module, resname);
|
||||||
|
}
|
||||||
|
|
||||||
public String generateHttpReqTopic(HttpSimpleRequest request, String path) {
|
public String generateHttpReqTopic(HttpSimpleRequest request, String path) {
|
||||||
String module = request.getRequestURI();
|
String module = request.getRequestURI();
|
||||||
if (path != null && !path.isEmpty() && module.startsWith(path)) module = module.substring(path.length());
|
if (path != null && !path.isEmpty() && module.startsWith(path)) module = module.substring(path.length());
|
||||||
|
|||||||
@@ -213,6 +213,11 @@ public abstract class MessageAgent {
|
|||||||
return "http.req." + module.toLowerCase();
|
return "http.req." + module.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//格式: http.req.user
|
||||||
|
public String generateHttpReqTopic(String module, String resname) {
|
||||||
|
return "http.req." + module.toLowerCase() + (resname == null || resname.isEmpty() ? "" : ("-" + resname));
|
||||||
|
}
|
||||||
|
|
||||||
//格式: sncp.resp.node10
|
//格式: sncp.resp.node10
|
||||||
protected String generateSncpRespTopic() {
|
protected String generateSncpRespTopic() {
|
||||||
return "sncp.resp.node" + nodeid;
|
return "sncp.resp.node" + nodeid;
|
||||||
|
|||||||
Reference in New Issue
Block a user