blob: f7ec8b675a5436334ee310d1bf655a9050c5c23e [file] [log] [blame]
lishuai2ddc4692015-07-31 15:15:16 +08001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16package org.onosproject.ovsdb.rfc.jsonrpc;
17
18import java.util.List;
19
20import org.onosproject.ovsdb.rfc.message.UpdateNotification;
21
22/**
23 * The callback function interface will be used when the server send to the
24 * client report changes.
25 */
26public interface Callback {
27 /**
28 * The "update" notification is sent by the server to the client to report
29 * changes in tables that are being monitored following a "*monitor"
30 * request.
31 * @param updateNotification the information of the update
32 */
33 void update(UpdateNotification updateNotification);
34
35 /**
36 * The "locked" notification is provided to notify a client that it has been
37 * granted a lock that it had previously requested with the "lock" method.
38 * @param ids the locked ids
39 */
40 void locked(List<String> ids);
41
42 /**
43 * The "stolen" notification is provided to notify a client, which had
44 * previously obtained a lock, that another client has stolen ownership of
45 * that lock.
46 * @param ids the stolen ids
47 */
48 void stolen(List<String> ids);
49
50}