This commit is contained in:
@@ -353,7 +353,7 @@ public abstract class NodeServer {
|
|||||||
final Class sourceType = sourceType0;
|
final Class sourceType = sourceType0;
|
||||||
Object source = null;
|
Object source = null;
|
||||||
if (CacheSource.class.isAssignableFrom(sourceType)) { // CacheSource
|
if (CacheSource.class.isAssignableFrom(sourceType)) { // CacheSource
|
||||||
source = (CacheSource) Sncp.createLocalService(serverClassLoader, resourceName, sourceType, client == null ? null : client.getMessageAgent(), appResFactory, appSncpTranFactory, sncpAddr, null, Sncp.getConf(srcService));
|
source = Modifier.isFinal(sourceType.getModifiers()) ? sourceType.getConstructor().newInstance() : (CacheSource) Sncp.createLocalService(serverClassLoader, resourceName, sourceType, client == null ? null : client.getMessageAgent(), appResFactory, appSncpTranFactory, sncpAddr, null, Sncp.getConf(srcService));
|
||||||
Type genericType = field.getGenericType();
|
Type genericType = field.getGenericType();
|
||||||
ParameterizedType pt = (genericType instanceof ParameterizedType) ? (ParameterizedType) genericType : null;
|
ParameterizedType pt = (genericType instanceof ParameterizedType) ? (ParameterizedType) genericType : null;
|
||||||
Type valType = pt == null ? null : pt.getActualTypeArguments()[0];
|
Type valType = pt == null ? null : pt.getActualTypeArguments()[0];
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public class SncpServer extends Server<DLong, SncpContext, SncpRequest, SncpResp
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SncpDynServlet addSncpServlet(Service sncpService) {
|
public SncpDynServlet addSncpServlet(Service sncpService) {
|
||||||
|
if (!Sncp.isSncpDyn(sncpService)) return null;
|
||||||
SncpDynServlet sds = new SncpDynServlet(BsonFactory.root().getConvert(), Sncp.getResourceName(sncpService),
|
SncpDynServlet sds = new SncpDynServlet(BsonFactory.root().getConvert(), Sncp.getResourceName(sncpService),
|
||||||
Sncp.getResourceType(sncpService), sncpService, maxClassNameLength, maxNameLength);
|
Sncp.getResourceType(sncpService), sncpService, maxClassNameLength, maxNameLength);
|
||||||
this.prepare.addServlet(sds, null, Sncp.getConf(sncpService));
|
this.prepare.addServlet(sds, null, Sncp.getConf(sncpService));
|
||||||
|
|||||||
Reference in New Issue
Block a user