ITeye博客

classloader threadpool中的设计模式谈起

youngphy · 2013-11-01 14:27 · 编程语言 · Markdown

  1. classloader为什么大多方法是protected, 除了loadClass、 classloader的findClass, threadpool的beforeExecute, threadpool 的exceptionHandler, callback都实现了客户端注入逻辑,比较
  2. 通过继承来实现逻辑注入的利弊点,不利服务化,继承一般默认本地调用。 但通过继承实现,如果没有远程调用的业务要求,api倒是很易用。
  3. 是撒设计模式来着?command?但command好你没有继承实现
  4. loadClass, findClass, defineClass, resolveClass

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。