+/*
+ * Copyright (c) 2014 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.sal.compatibility.topology
import org.opendaylight.controller.sal.binding.api.data.DataProviderService
DataProviderService dataService;
Registration<DataCommitHandler<InstanceIdentifier<? extends DataObject>,DataObject>> commitHandlerRegistration;
-
+
def void start() {
+
+ }
+ def void startAdapter() {
+ if(dataService == null){
+ LOG.error("dataService not set");
+ return;
+ }
commitHandler = new TopologyCommitHandler(dataService)
commitHandler.setTopologyPublisher(topologyPublisher)
val InstanceIdentifier<? extends DataObject> path = InstanceIdentifier.builder(NetworkTopology)
def setTopologyPublisher(IPluginOutTopologyService topologyPublisher) {
_topologyPublisher = topologyPublisher;
- commitHandler.setTopologyPublisher(topologyPublisher);
+ if(commitHandler != null){
+ commitHandler.setTopologyPublisher(topologyPublisher);
+ }
}
-}
\ No newline at end of file
+}