X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Farchetypes%2Fopendaylight-startup%2Fsrc%2Fmain%2Fresources%2Farchetype-resources%2Fimpl%2Fsrc%2Fmain%2Fjava%2F__packageInPathFormat__%2Fimpl%2F__classPrefix__Provider.java;h=4d0a82041867a2c49c4e61997f4e60a9b4bde80f;hp=b913f58ed44d77ca6d7ed4434273d81f145e9e03;hb=3988eb2044c1e30371b2a8e02f15a90649d31a84;hpb=412db94945c5db5d2da918f5e23bd3abcecc4d10 diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/impl/src/main/java/__packageInPathFormat__/impl/__classPrefix__Provider.java b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/impl/src/main/java/__packageInPathFormat__/impl/__classPrefix__Provider.java index b913f58ed4..4d0a820418 100644 --- a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/impl/src/main/java/__packageInPathFormat__/impl/__classPrefix__Provider.java +++ b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/impl/src/main/java/__packageInPathFormat__/impl/__classPrefix__Provider.java @@ -2,7 +2,7 @@ #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) /* - * ${copyright} and others. All rights reserved. + * Copyright © ${copyrightYear} ${copyright} 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, @@ -10,23 +10,31 @@ */ package ${package}.impl; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; -import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ${classPrefix}Provider implements BindingAwareProvider, AutoCloseable { +public class ${classPrefix}Provider { private static final Logger LOG = LoggerFactory.getLogger(${classPrefix}Provider.class); - @Override - public void onSessionInitiated(ProviderContext session) { + private final DataBroker dataBroker; + + public ${classPrefix}Provider(final DataBroker dataBroker) { + this.dataBroker = dataBroker; + } + + /** + * Method called when the blueprint container is created. + */ + public void init() { LOG.info("${classPrefix}Provider Session Initiated"); } - @Override - public void close() throws Exception { + /** + * Method called when the blueprint container is destroyed. + */ + public void close() { LOG.info("${classPrefix}Provider Closed"); } - -} +} \ No newline at end of file