Search in sources :

Example 1 with AbstractObjectRegistration

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();
        }
    };
}
Also used : AbstractObjectRegistration(org.opendaylight.yangtools.concepts.AbstractObjectRegistration) SalTableService(org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)

Example 2 with AbstractObjectRegistration

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();
        }
    };
}
Also used : AbstractObjectRegistration(org.opendaylight.yangtools.concepts.AbstractObjectRegistration) SalFlowService(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)

Example 3 with AbstractObjectRegistration

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();
        }
    };
}
Also used : AbstractObjectRegistration(org.opendaylight.yangtools.concepts.AbstractObjectRegistration) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) SalGroupService(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)

Example 4 with AbstractObjectRegistration

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();
        }
    };
}
Also used : AbstractObjectRegistration(org.opendaylight.yangtools.concepts.AbstractObjectRegistration) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) NodeId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId) SalMeterService(org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)

Aggregations

NodeId (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId)4 Nodes (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes)4 Node (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node)4 NodeKey (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey)4 AbstractObjectRegistration (org.opendaylight.yangtools.concepts.AbstractObjectRegistration)4 SalFlowService (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService)1 SalGroupService (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService)1 SalMeterService (org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService)1 SalTableService (org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService)1