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 org.opendaylight.ovsdb.lib.operations.OperationResult;
16 import com.fasterxml.jackson.databind.JsonNode;
17 import com.google.common.util.concurrent.ListenableFuture;
19 public interface OvsdbRPC {
20 public static final String REGISTER_CALLBACK_METHOD = "registerCallback";
22 //public ListenableFuture<DatabaseSchema> get_schema(List<String> db_names);
23 public ListenableFuture<JsonNode> get_schema(List<String> db_names);
25 public ListenableFuture<List<String>> echo();
27 public ListenableFuture<TableUpdates> monitor(MonitorRequestBuilder request);
29 public ListenableFuture<List<String>> list_dbs();
31 public ListenableFuture<List<OperationResult>> transact(TransactBuilder transact);
33 public ListenableFuture<Response> cancel(String id);
35 public ListenableFuture<Object> monitor_cancel(Object json_value);
37 public ListenableFuture<Object> lock(List<String> id);
39 public ListenableFuture<Object> steal(List<String> id);
41 public ListenableFuture<Object> unlock(List<String> id);
43 public boolean registerCallback(Callback callback);
46 public static interface Callback {
47 public void update(Object context, UpdateNotification upadateNotification);
48 public void locked(Object context, List<String> ids);
49 public void stolen(Object context, List<String> ids);
50 // ECHO is handled by JsonRPCEndpoint directly.
51 // We can add Echo request here if there is a need for clients to handle it.