package org.opendaylight.openflowplugin.test;
-import java.util.concurrent.Future;
+import com.google.common.util.concurrent.ListenableFuture;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeContext;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
private NotificationProviderService notificationService;
/**
- * get data service
+ * Gets the data service.
*
* @return {@link #dataService}
*/
}
/**
- * set {@link #dataService}
- *
- * @param dataService
+ * Sets the {@link #dataService}.
*/
public void setDataService(final DataBroker dataService) {
this.dataService = dataService;
}
/**
- * get meter registration
+ * Gets the meter registration.
*
* @return {@link #meterRegistration}
*/
}
/**
- * set {@link #meterRegistration}
- *
- * @param meterRegistration
+ * Sets the {@link #meterRegistration}.
*/
public void setMeterRegistration(
final RoutedRpcRegistration<SalMeterService> meterRegistration) {
}
/**
- * get notification service
+ * Gets the notification service.
*
* @return {@link #notificationService}
*/
}
/**
- * set {@link #notificationService}
- *
- * @param notificationService
+ * Sets the {@link #notificationService}.
*/
public void setNotificationService(
final NotificationProviderService notificationService) {
*
* @see java.lang.AutoCloseable#close()
*/
+ @Override
public void close() {
OpenflowpluginMeterTestServiceProvider.LOG
.info("SalMeterServiceProvide stopped.");
* #addMeter(org.opendaylight.yang.gen.v1.urn.opendaylight.meter
* .service.rev130918.AddMeterInput)
*/
- public Future<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
- String plus = ("addMeter - " + input);
- OpenflowpluginMeterTestServiceProvider.LOG.info(plus);
+ @Override
+ public ListenableFuture<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
+ OpenflowpluginMeterTestServiceProvider.LOG.info("addMeter - {}", input);
return null;
}
* #removeMeter(org.opendaylight.yang.gen.v1.urn.opendaylight
* .meter.service.rev130918.RemoveMeterInput)
*/
- public Future<RpcResult<RemoveMeterOutput>> removeMeter(
+ @Override
+ public ListenableFuture<RpcResult<RemoveMeterOutput>> removeMeter(
final RemoveMeterInput input) {
- String plus = ("removeMeter - " + input);
- OpenflowpluginMeterTestServiceProvider.LOG.info(plus);
+ OpenflowpluginMeterTestServiceProvider.LOG.info("removeMeter - {}", input);
return null;
}
* #updateMeter(org.opendaylight.yang.gen.v1.urn.opendaylight
* .meter.service.rev130918.UpdateMeterInput)
*/
- public Future<RpcResult<UpdateMeterOutput>> updateMeter(
+ @Override
+ public ListenableFuture<RpcResult<UpdateMeterOutput>> updateMeter(
final UpdateMeterInput input) {
- String plus = ("updateMeter - " + input);
- OpenflowpluginMeterTestServiceProvider.LOG.info(plus);
+ OpenflowpluginMeterTestServiceProvider.LOG.info("updateMeter - {}", input);
return null;
}
- /**
- * @param ctx
- * @return {@link ObjectRegistration}
- */
public ObjectRegistration<OpenflowpluginMeterTestServiceProvider> register(
- final ProviderContext ctx) {
+ final RpcProviderRegistry rpcRegistry) {
- RoutedRpcRegistration<SalMeterService> addRoutedRpcImplementation = ctx
- .<SalMeterService> addRoutedRpcImplementation(
+ RoutedRpcRegistration<SalMeterService> addRoutedRpcImplementation = rpcRegistry.addRoutedRpcImplementation(
SalMeterService.class, this);
setMeterRegistration(addRoutedRpcImplementation);
InstanceIdentifierBuilder<Nodes> builder1 = InstanceIdentifier
- .<Nodes> builder(Nodes.class);
+ .<Nodes>builder(Nodes.class);
NodeId nodeId = new NodeId(OpenflowpluginTestActivator.NODE_ID);
NodeKey nodeKey = new NodeKey(nodeId);
InstanceIdentifierBuilder<Node> nodeIndentifier = builder1
- .<Node, NodeKey> child(Node.class, nodeKey);
+ .<Node, NodeKey>child(Node.class, nodeKey);
InstanceIdentifier<Node> instance = nodeIndentifier.build();
}
};
}
-
}