Eliminate the use of CompositeObjectRegistration
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / md / ModelDrivenSwitch.java
1 /**
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.openflowplugin.api.openflow.md;
9
10 import com.google.common.base.Optional;
11 import java.math.BigInteger;
12 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
13 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.OpendaylightFlowTableStatisticsService;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.OpendaylightGroupStatisticsService;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.SalPortService;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
29 import org.opendaylight.yangtools.concepts.Identifiable;
30 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
31
32 /**
33  * interface concatenating all md-sal services provided by OF-switch
34  */
35 public interface ModelDrivenSwitch
36         extends
37         SalGroupService,
38         SalFlowService,
39         SalMeterService, SalTableService, SalPortService, PacketProcessingService, NodeConfigService,
40         OpendaylightGroupStatisticsService, OpendaylightMeterStatisticsService, OpendaylightFlowStatisticsService,
41         OpendaylightPortStatisticsService, OpendaylightFlowTableStatisticsService, OpendaylightQueueStatisticsService,
42         Identifiable<InstanceIdentifier<Node>> {
43
44     /**
45      * @param rpcProviderRegistry
46      * @return wrapped list of {service provider + path} registration couples
47      */
48     ModelDrivenSwitchRegistration register(RpcProviderRegistry rpcProviderRegistry);
49
50     /**
51      * @return id of encapsulated node (served by this impl)
52      */
53     NodeId getNodeId();
54
55     /**
56      * returnes the session context associated with this model-driven switch
57      *
58      * @return session context object
59      */
60     SessionContext getSessionContext();
61
62     /**
63      * Returns whether this *instance* is entity owner or not
64      * @return true if it's entity owner, else false.
65      */
66     boolean isEntityOwner();
67
68     /**
69      * Set entity ownership satus of this switch in *this* instance
70      * @param isOwner
71      */
72     void setEntityOwnership(boolean isOwner);
73
74     /**
75      * Send table feature to the switch to get tables features for all the tables.
76      * @return Transaction id
77      */
78     Optional<BigInteger> sendEmptyTableFeatureRequest();
79
80     /**
81      * Method send port/desc multipart request to the switch to fetch the initial details.
82      */
83
84     public abstract void requestSwitchDetails();
85
86 }