Fix unused import warnings
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / DeviceManager.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.device;
10
11 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
12 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceConnectedHandler;
13 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceDisconnectedHandler;
14 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializationPhaseHandler;
15 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceLifecycleSupervisor;
16 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceTerminationPhaseHandler;
17 import org.opendaylight.openflowplugin.api.openflow.translator.TranslatorLibrarian;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
19
20 /**
21  * This interface is responsible for instantiating DeviceContext and
22  * registering transaction chain for each DeviceContext. Each device
23  * has its own device context managed by this manager.
24  * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
25  */
26 public interface DeviceManager extends DeviceConnectedHandler, DeviceDisconnectedHandler, DeviceLifecycleSupervisor,
27         DeviceInitializationPhaseHandler, DeviceTerminationPhaseHandler, TranslatorLibrarian, AutoCloseable {
28
29     /**
30      * Sets notification publish service
31      *
32      * @param notificationPublishService
33      */
34     void setNotificationPublishService(NotificationPublishService notificationPublishService);
35
36     /**
37      * invoked after all services injected
38      */
39     void initialize();
40
41     /**
42      * Returning device context from map maintained in device manager
43      * This prevent to send whole device context to another context
44      * If device context not exists for nodeId it will return null
45      * @param nodeId
46      * @return device context or null
47      */
48     DeviceContext getDeviceContextFromNodeId(NodeId nodeId);
49
50     void setStatisticsRpcEnabled(boolean isStatisticsRpcEnabled);
51 }
52