2 * Copyright 2015 Open Networking Laboratory
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.onosproject.ovsdb.controller.driver;
18 import io.netty.channel.Channel;
20 import org.onosproject.ovsdb.rfc.jsonrpc.Callback;
22 import com.fasterxml.jackson.databind.JsonNode;
25 * Represents the driver side of an ovsdb node. This interface should never be
26 * exposed to consumers.
28 public interface OvsdbProviderService {
30 * Sets the ovsdb agent to be used. This method can only be called once.
32 * @param agent the agent to set.
34 void setAgent(OvsdbAgent agent);
37 * Sets the associated Netty channel for this node.
39 * @param channel the Netty channel
41 void setChannel(Channel channel);
44 * Announces to the ovsdb agent that this node has added.
49 * Announces to the ovsdb agent that this node has removed.
54 * Sets whether the node is connected.
56 * @param connected whether the node is connected
58 void setConnection(boolean connected);
61 * Processes result from ovsdb.
63 * @param response JsonNode response from ovsdb
65 void processResult(JsonNode response);
68 * processes request from ovsdb.
70 * @param request JsonNode request from ovsdb
72 void processRequest(JsonNode request);
77 * @param monitorCallback the callback to set
79 void setCallback(Callback monitorCallback);