1. private static final List<ILogConverter> converters = Collections.synchronizedList(new LinkedList<ILogConverter>());
  2. private static final ILogConverter converting = (ILogConverter) Proxy.newProxyInstance(ILogConverter.class.getClassLoader(),
  3. new Class[] {ILogConverter.class},
  4. new InvocationHandler() {
  5. public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
  6. for (ILogConverter sender : converters) {
  7. method.invoke(sender, args);
  8. }
  9. return null;
  10. }
  11. }
  12. );
Comments powered by Disqus