2 * Copyright (C) 2013 EBay Software Foundation
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
8 * Authors : Ashwin Raveendran, Madhu Venugopal
10 package org.opendaylight.ovsdb.lib.message;
12 import java.util.List;
14 import com.fasterxml.jackson.databind.JsonNode;
15 import com.google.common.util.concurrent.ListenableFuture;
17 import org.opendaylight.controller.sal.core.Node;
18 import org.opendaylight.ovsdb.lib.operations.OperationResult;
20 public interface OvsdbRPC {
21 public static final String REGISTER_CALLBACK_METHOD = "registerCallback";
23 //public ListenableFuture<DatabaseSchema> get_schema(List<String> db_names);
24 public ListenableFuture<JsonNode> get_schema(List<String> db_names);
26 public ListenableFuture<List<String>> echo();
28 public ListenableFuture<TableUpdates> monitor(MonitorRequestBuilder request);
30 public ListenableFuture<List<String>> list_dbs();
32 public ListenableFuture<List<OperationResult>> transact(TransactBuilder transact);
34 public ListenableFuture<Response> cancel(String id);
36 public ListenableFuture<Object> monitor_cancel(Object json_value);
38 public ListenableFuture<Object> lock(List<String> id);
40 public ListenableFuture<Object> steal(List<String> id);
42 public ListenableFuture<Object> unlock(List<String> id);
44 public boolean registerCallback(Callback callback);
47 public static interface Callback {
48 public void update(Node node, UpdateNotification upadateNotification);
49 public void locked(Node node, List<String> ids);
50 public void stolen(Node node, List<String> ids);
51 // ECHO is handled by JsonRPCEndpoint directly.
52 // We can add Echo request here if there is a need for clients to handle it.