- private static final List<ILogConverter> converters = Collections.synchronizedList(new LinkedList<ILogConverter>());
- private static final ILogConverter converting = (ILogConverter) Proxy.newProxyInstance(ILogConverter.class.getClassLoader(),
- new Class[] {ILogConverter.class},
- new InvocationHandler() {
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- for (ILogConverter sender : converters) {
- method.invoke(sender, args);
- }
- return null;
- }
- }
- );