Merge "Bug 2753 - 4 managers api proposal."
[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.openflowplugin.api.openflow.device.handlers.DeviceConnectedHandler;
12 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceContextReadyHandler;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
14
15 /**
16  * This interface is responsible for instantiating DeviceContext and
17  * registering transaction chain for each DeviceContext. Each device
18  * has its own device context managed by this manager.
19  * <p/>
20  * <p/>
21  * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
22  */
23 public interface DeviceManager extends DeviceConnectedHandler {
24
25
26     /**
27      * Method allows to send message that will be using RequestContext
28      * wrapped by this context.
29      *
30      * @param dataObject
31      */
32     void sendMessage(DataObject dataObject, RequestContext requestContext);
33
34     /**
35      * Method allows to send rpc request that will be using RequestContext
36      * wrapped by this context.
37      *
38      * @param dataObject
39      */
40     Xid sendRequest(DataObject dataObject, RequestContext requestContext);
41
42     /**
43      * Method registers handler responsible for handling operations related to connected device after
44      * request context is created.
45      *
46      * @param deviceContextReadyHandler
47      */
48     public void addRequestContextReadyHandler(DeviceContextReadyHandler deviceContextReadyHandler);
49
50 }