Repair Doxygen build infrastructure
[vpp.git] / vpp-api / java / jvpp-registry / io / fd / vpp / jvpp / JVpp.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;
18
19 import io.fd.vpp.jvpp.callback.JVppCallback;
20 import io.fd.vpp.jvpp.dto.ControlPing;
21 import io.fd.vpp.jvpp.dto.JVppRequest;
22
23 /**
24  * Base interface for plugin's Java API.
25  */
26 public interface JVpp extends AutoCloseable {
27
28     /**
29      * Sends request to vpp.
30      *
31      * @param request request to be sent
32      * @return unique identifer of message in message queue
33      * @throws VppInvocationException when message could not be sent
34      */
35     int send(final JVppRequest request) throws VppInvocationException;
36
37     /**
38      * Initializes plugin's Java API.
39      *
40      * @param registry     plugin registry
41      * @param callback     called by vpe.api message handlers
42      * @param queueAddress address of vpp shared memory queue
43      * @param clientIndex  vpp client identifier
44      */
45     void init(final JVppRegistry registry, final JVppCallback callback, final long queueAddress,
46               final int clientIndex);
47
48     /**
49      * Sends control_ping message.
50      *
51      * @param controlPing request DTO
52      * @return unique identifer of message in message queue
53      * @throws VppInvocationException when message could not be sent
54      */
55     int controlPing(final ControlPing controlPing) throws VppInvocationException;
56 }