Merge changes from topic 'BUG-4117'
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / OpenFlowPluginProvider.java
1 /*
2  * Copyright (c) 2015 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
9 package org.opendaylight.openflowplugin.api.openflow;
10
11 import java.util.Collection;
12 import org.opendaylight.controller.md.sal.binding.api.BindingService;
13 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
14 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
15 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
16 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
17 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
18 import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
19
20 /**
21  * Created by Martin Bobak <mbobak@cisco.com> on 27.3.2015.
22  */
23 public interface OpenFlowPluginProvider extends AutoCloseable, BindingService {
24
25     /**
26      * Method sets openflow java's connection providers.
27      */
28     void setSwitchConnectionProviders(Collection<SwitchConnectionProvider> switchConnectionProvider);
29
30     /**
31      * setter
32      *
33      * @param dataBroker
34      */
35     void setDataBroker(DataBroker dataBroker);
36
37     void setRpcProviderRegistry(RpcProviderRegistry rpcProviderRegistry);
38
39     void setNotificationProviderService(NotificationService notificationProviderService);
40
41     void setNotificationPublishService(NotificationPublishService notificationPublishService);
42
43     /**
44      * Method initializes all DeviceManager, RpcManager and related contexts.
45      */
46     void initialize();
47
48     /**
49      * This parameter indicates whether it is mandatory for switch to support OF1.3 features : table, flow, meter,group.
50      * If this is set to true and switch doesn't support these features its connection will be denied.
51      * @param switchFeaturesMandatory
52      */
53     void setSwitchFeaturesMandatory(final boolean switchFeaturesMandatory);
54
55     boolean isSwitchFeaturesMandatory();
56
57     boolean isStatisticsPollingOff();
58
59     void setIsStatisticsPollingOff(final boolean isStatisticsPollingOff);
60
61     void setEntityOwnershipService(EntityOwnershipService entityOwnershipService);
62
63
64     /**
65      * Backward compatibility feature - exposing rpc for statistics polling (result is provided in form of async notification)
66      *
67      * @param isStatisticsRpcEnabled
68      */
69     void setIsStatisticsRpcEnabled(boolean isStatisticsRpcEnabled);
70
71     void setBarrierCountLimit(int barrierCountLimit);
72
73     void setBarrierInterval(long barrierTimeoutLimit);
74
75     void setEchoReplyTimeout(long echoReplyTimeout);
76 }