use of org.opendaylight.yangtools.concepts.AbstractObjectRegistration in project openflowplugin by opendaylight.
the class OpenflowpluginTableFeaturesTestServiceProvider method register.
public ObjectRegistration<OpenflowpluginTableFeaturesTestServiceProvider> register(final ProviderContext ctx) {
RoutedRpcRegistration<SalTableService> addRoutedRpcImplementation = ctx.<SalTableService>addRoutedRpcImplementation(SalTableService.class, this);
setTableRegistration(addRoutedRpcImplementation);
InstanceIdentifierBuilder<Nodes> builder1 = InstanceIdentifier.<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);
InstanceIdentifier<Node> instance = nodeIndentifier.build();
tableRegistration.registerPath(NodeContext.class, instance);
RoutedRpcRegistration<SalTableService> tableRegistration1 = this.getTableRegistration();
return new AbstractObjectRegistration<OpenflowpluginTableFeaturesTestServiceProvider>(this) {
@Override
protected void removeRegistration() {
tableRegistration1.close();
}
};
}
use of org.opendaylight.yangtools.concepts.AbstractObjectRegistration in project openflowplugin by opendaylight.
the class OpenflowpluginTestServiceProvider method register.
public ObjectRegistration<OpenflowpluginTestServiceProvider> register(final ProviderContext ctx) {
RoutedRpcRegistration<SalFlowService> addRoutedRpcImplementation = ctx.<SalFlowService>addRoutedRpcImplementation(SalFlowService.class, this);
setFlowRegistration(addRoutedRpcImplementation);
InstanceIdentifierBuilder<Nodes> builderII = InstanceIdentifier.<Nodes>builder(Nodes.class);
NodeId nodeId = new NodeId(OpenflowpluginTestActivator.NODE_ID);
NodeKey nodeKey = new NodeKey(nodeId);
InstanceIdentifierBuilder<Node> nodeIdentifier = builderII.<Node, NodeKey>child(Node.class, nodeKey);
InstanceIdentifier<Node> instance = nodeIdentifier.build();
flowRegistration.registerPath(NodeContext.class, instance);
RoutedRpcRegistration<SalFlowService> flowRegistration2 = getFlowRegistration();
return new AbstractObjectRegistration<OpenflowpluginTestServiceProvider>(this) {
@Override
protected void removeRegistration() {
flowRegistration2.close();
}
};
}
use of org.opendaylight.yangtools.concepts.AbstractObjectRegistration in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestServiceProvider method register.
public ObjectRegistration<OpenflowpluginGroupTestServiceProvider> register(final ProviderContext ctx) {
RoutedRpcRegistration<SalGroupService> addRoutedRpcImplementation = ctx.<SalGroupService>addRoutedRpcImplementation(SalGroupService.class, this);
setGroupRegistration(addRoutedRpcImplementation);
InstanceIdentifierBuilder<Nodes> builder1 = InstanceIdentifier.<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);
InstanceIdentifier<Node> instance = nodeIndentifier.build();
groupRegistration.registerPath(NodeContext.class, instance);
RoutedRpcRegistration<SalGroupService> groupRegistration1 = this.getGroupRegistration();
return new AbstractObjectRegistration<OpenflowpluginGroupTestServiceProvider>(this) {
@Override
protected void removeRegistration() {
groupRegistration1.close();
}
};
}
use of org.opendaylight.yangtools.concepts.AbstractObjectRegistration in project openflowplugin by opendaylight.
the class OpenflowpluginMeterTestServiceProvider method register.
public ObjectRegistration<OpenflowpluginMeterTestServiceProvider> register(final ProviderContext ctx) {
RoutedRpcRegistration<SalMeterService> addRoutedRpcImplementation = ctx.<SalMeterService>addRoutedRpcImplementation(SalMeterService.class, this);
setMeterRegistration(addRoutedRpcImplementation);
InstanceIdentifierBuilder<Nodes> builder1 = InstanceIdentifier.<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);
InstanceIdentifier<Node> instance = nodeIndentifier.build();
meterRegistration.registerPath(NodeContext.class, instance);
RoutedRpcRegistration<SalMeterService> meterRegistration1 = this.getMeterRegistration();
return new AbstractObjectRegistration<OpenflowpluginMeterTestServiceProvider>(this) {
@Override
protected void removeRegistration() {
meterRegistration1.close();
}
};
}
Aggregations