001package org.dcm4che3.conf.api.extensions; 002 003import org.dcm4che3.net.ConnectionExtension; 004 005/** 006 * This class shall be extended by vendors/contributors to store extra configuration for a Connection 007 * @author Roman K 008 */ 009public class CommonConnectionExtension extends ConnectionExtension { 010 /** 011 * Iterates over all configurable fields and transfers the values using getter/setters from 'from' to this 012 * @param from The extension with new configuration 013 * @param clazz Class of the extension 014 */ 015 public void reconfigureReflectively(ConnectionExtension from, Class<? extends ConnectionExtension> clazz) { 016 ReconfiguringIterator.reconfigure(from, this, clazz); 017 } 018 019 public void reconfigure(ConnectionExtension from) { 020 // fallback to default reflective if the extension did not override the method 021 reconfigureReflectively(from,from.getClass()); 022 } 023}