Move java,lua api and remaining plugins to src/
[vpp.git] / src / vpp-api / java / jvpp-registry / io / fd / vpp / jvpp / future / FutureJVppInvoker.java
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
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  */
16
17 package io.fd.vpp.jvpp.future;
18
19
20 import io.fd.vpp.jvpp.dto.JVppReply;
21 import io.fd.vpp.jvpp.dto.JVppReplyDump;
22 import io.fd.vpp.jvpp.dto.JVppRequest;
23
24 import java.util.concurrent.CompletionStage;
25 import io.fd.vpp.jvpp.notification.NotificationRegistryProvider;
26
27 /**
28 * Future facade on top of JVpp
29 */
30 public interface FutureJVppInvoker extends NotificationRegistryProvider, AutoCloseable {
31
32     /**
33      * Invoke asynchronous operation on VPP
34      *
35      * @return CompletionStage with future result of an async VPP call
36      * @throws io.fd.vpp.jvpp.VppInvocationException when send request failed with details
37      */
38     <REQ extends JVppRequest, REPLY extends JVppReply<REQ>> CompletionStage<REPLY> send(REQ req);
39
40
41     /**
42      * Invoke asynchronous dump operation on VPP
43      *
44      * @return CompletionStage with aggregated future result of an async VPP dump call
45      * @throws io.fd.vpp.jvpp.VppInvocationException when send request failed with details
46      */
47     <REQ extends JVppRequest, REPLY extends JVppReply<REQ>, DUMP extends JVppReplyDump<REQ, REPLY>> CompletionStage<DUMP> send(
48             REQ req, DUMP emptyReplyDump);
49 }