X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fapi%2FRuntimeBeanRegistratorAwareModule.java;fp=opendaylight%2Fconfig%2Fconfig-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fapi%2FRuntimeBeanRegistratorAwareModule.java;h=a23d47b8622544cd9088d8e135b4446929f7c330;hb=9fb64948564e252018f9b1e13e7cea2c92f991aa;hp=0000000000000000000000000000000000000000;hpb=1742b3894614be478c333a1043ced8ef1bc5dc84;p=controller.git diff --git a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/RuntimeBeanRegistratorAwareModule.java b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/RuntimeBeanRegistratorAwareModule.java new file mode 100644 index 0000000000..a23d47b862 --- /dev/null +++ b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/RuntimeBeanRegistratorAwareModule.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.config.api; + +import java.io.Closeable; + +import org.opendaylight.controller.config.api.runtime.RootRuntimeBeanRegistrator; +import org.opendaylight.controller.config.spi.Module; + +/** + * Module implementing this interface will receive + * {@link RootRuntimeBeanRegistrator} before getInstance() is invoked. + */ +public interface RuntimeBeanRegistratorAwareModule extends Module { + /** + * Configuration framework will call this setter on all modules implementing + * this interface. It is responsibility of modules or rather their instances + * to close registrator in their {@link Closeable#close()} method. Same + * module will get the same registrator during reconfiguration. + * + * @param rootRuntimeBeanRegistrator + */ + public void setRuntimeBeanRegistrator( + RootRuntimeBeanRegistrator rootRuntimeBeanRegistrator); + +}