private void addDynamicHandlers(ChannelPipeline pipeline) {
if (Context.getConfig().hasKey("extra.handlers")) {
String[] handlers = Context.getConfig().getString("extra.handlers").split(",");
for (int i = 0; i < handlers.length; i++) {
try {
pipeline.addLast("extraHandler." + i, (ChannelHandler) Class.forName(handlers[i]).newInstance());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException error) {
Log.warning(error);
}
}
}
}
BasePipelineFactory.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:traccar-service
作者:
评论列表
文章目录