mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-11 03:13:51 +00:00
chore[generate]: update generate protocol filter
This commit is contained in:
1 parent
3e9968f69f
commit
ebbd36eadf
2 files changed
+6
-2
No files matched your search
@@ -69,9 +69,13 @@ public class PacketService implements IPacketService {
|
||||
|
||||
public static final String NET_COMMON_MODULE = "common";
|
||||
|
||||
private final Predicate<IProtocolRegistration> netGenerateProtocolFilter = it -> {
|
||||
public final Predicate<IProtocolRegistration> netGenerateProtocolFilter = it -> {
|
||||
var clazz = it.protocolConstructor().getDeclaringClass();
|
||||
var className = clazz.getSimpleName();
|
||||
if (className.endsWith(NET_ASK_SUFFIX) || className.endsWith(NET_ANSWER_SUFFIX)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var module = ProtocolManager.moduleByModuleId(it.module());
|
||||
return clazz == SignalAttachment.class
|
||||
|| className.endsWith(NET_REQUEST_SUFFIX)
|
||||
|
||||
@@ -415,7 +415,7 @@ public class Router implements IRouter {
|
||||
for (var method : methods) {
|
||||
var paramClazzs = method.getParameterTypes();
|
||||
|
||||
AssertionUtils.isTrue(paramClazzs.length == 2 || paramClazzs.length == 3, "[class:{}] [method:{}] must have two or three parameter!", bean.getClass().getName(), method.getName());
|
||||
AssertionUtils.isTrue(paramClazzs.length == 2 || paramClazzs.length == 3, "[class:{}] [method:{}] must have two or three parameter! such as atMethod(session, packet) or atMethod(session, packet, attachment)", bean.getClass().getName(), method.getName());
|
||||
|
||||
AssertionUtils.isTrue(Session.class.isAssignableFrom(paramClazzs[0]), "[class:{}] [method:{}],the first parameter must be Session type parameter Exception.", bean.getClass().getName(), method.getName());
|
||||
|
||||
|
||||
Reference in new issue
Block a user