This commit is contained in:
@@ -72,7 +72,7 @@ public class NodeHttpServer extends NodeServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void loadService(ClassFilter serviceFilter, ClassFilter otherFilter) throws Exception {
|
protected void loadService(ClassFilter<? extends Service> serviceFilter, ClassFilter otherFilter) throws Exception {
|
||||||
super.loadService(serviceFilter, otherFilter);
|
super.loadService(serviceFilter, otherFilter);
|
||||||
initWebSocketService();
|
initWebSocketService();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,13 +307,13 @@ public abstract class NodeServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected void loadService(ClassFilter serviceFilter, ClassFilter otherFilter) throws Exception {
|
protected void loadService(ClassFilter<? extends Service> serviceFilter, ClassFilter otherFilter) throws Exception {
|
||||||
if (serviceFilter == null) return;
|
if (serviceFilter == null) return;
|
||||||
final String threadName = "[" + Thread.currentThread().getName() + "] ";
|
final String threadName = "[" + Thread.currentThread().getName() + "] ";
|
||||||
final Set<FilterEntry<Service>> entrys = serviceFilter.getAllFilterEntrys();
|
final Set<FilterEntry<? extends Service>> entrys = (Set) serviceFilter.getAllFilterEntrys();
|
||||||
ResourceFactory regFactory = isSNCP() ? application.getResourceFactory() : resourceFactory;
|
ResourceFactory regFactory = isSNCP() ? application.getResourceFactory() : resourceFactory;
|
||||||
|
|
||||||
for (FilterEntry<Service> entry : entrys) { //service实现类
|
for (FilterEntry<? extends Service> entry : entrys) { //service实现类
|
||||||
final Class<? extends Service> serviceImplClass = entry.getType();
|
final Class<? extends Service> serviceImplClass = entry.getType();
|
||||||
if (Modifier.isFinal(serviceImplClass.getModifiers())) continue; //修饰final的类跳过
|
if (Modifier.isFinal(serviceImplClass.getModifiers())) continue; //修饰final的类跳过
|
||||||
if (!Modifier.isPublic(serviceImplClass.getModifiers())) continue;
|
if (!Modifier.isPublic(serviceImplClass.getModifiers())) continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user