X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnector%2Fremoterpc%2FRoutingTableProvider.java;h=d960303fcf4b45c5ec5ac7d35ccff04f2fee4a3b;hp=f62c26e0fdaad757112f4e80e860dcd97a464552;hb=14f3e1124c15c173bb1d2e7e16043ad4438be81c;hpb=2af7af1c16a44873ff474ad8429e41f762c54e73 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/RoutingTableProvider.java b/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/RoutingTableProvider.java index f62c26e0fd..d960303fcf 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/RoutingTableProvider.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/implementation/src/main/java/org/opendaylight/controller/sal/connector/remoterpc/RoutingTableProvider.java @@ -8,40 +8,41 @@ package org.opendaylight.controller.sal.connector.remoterpc; -import com.google.common.base.Optional; -import org.opendaylight.controller.sal.connector.remoterpc.api.RouteChangeListener; +import org.opendaylight.controller.sal.connector.api.RpcRouter; import org.opendaylight.controller.sal.connector.remoterpc.api.RoutingTable; import org.opendaylight.controller.sal.connector.remoterpc.impl.RoutingTableImpl; import org.osgi.framework.BundleContext; import org.osgi.util.tracker.ServiceTracker; +import com.google.common.base.Optional; + public class RoutingTableProvider implements AutoCloseable { @SuppressWarnings("rawtypes") final ServiceTracker tracker; - private RoutingTableImpl routingTableImpl = null; + private RoutingTableImpl routingTableImpl = null; - final private RouteChangeListener routeChangeListener; - - - public RoutingTableProvider(BundleContext ctx,RouteChangeListener rcl) { + //final private RouteChangeListener routeChangeListener; + + + public RoutingTableProvider(BundleContext ctx){//,RouteChangeListener rcl) { @SuppressWarnings("rawtypes") ServiceTracker rawTracker = new ServiceTracker<>(ctx, RoutingTable.class, null); tracker = rawTracker; tracker.open(); - routeChangeListener = rcl; + //routeChangeListener = rcl; } - - public Optional> getRoutingTable() { + + public Optional, String>> getRoutingTable() { @SuppressWarnings("unchecked") - RoutingTable tracked = tracker.getService(); + RoutingTable, String> tracked = tracker.getService(); if(tracked instanceof RoutingTableImpl){ if(routingTableImpl != tracked){ - routingTableImpl= (RoutingTableImpl)tracked; - routingTableImpl.setRouteChangeListener(routeChangeListener); + routingTableImpl= (RoutingTableImpl)tracked; + //routingTableImpl.setRouteChangeListener(routeChangeListener); } }