summaryrefslogtreecommitdiffstats
path: root/vpp-japi/japi
AgeCommit message (Collapse)AuthorFilesLines
2016-02-01Refactor vpp-japiRobert Varga8-42/+180
vlib does not allow concurrent connections, hence make sure the Java API does not allow the user to instantiate them. Also hide native methods from direct user invocation behind defensive methods also detect if a particular connection has been terminated. Disconnect is hidden befind standard close() method, as specified by AutoCloseable. Change-Id: Ib5079200ae4216cad84358a2174a41e90271a30b Signed-off-by: Robert Varga <nite@hq.sk>
2016-02-01Make public fields final where possibleRobert Varga7-90/+92
Class fields initialized via the constructor should be final. Also mark leaking byte[] instances with a FIXME. API users consider them immutable, but they are vulnerable to System.arrayCopy(). Also fixes constructor arguments so they do not use underscores, which is prohibited by Java 9. Change-Id: I393d55ed7234149cb3604bc92b2cb1d1207c55dc Signed-off-by: Robert Varga <nite@hq.sk>
2016-02-01Add a copyright headerRobert Varga1-0/+15
Change-Id: Ib543249b8de2b26b64de82c35f74422d10a5ee66 Signed-off-by: Robert Varga <nite@hq.sk>
2016-01-30Cache jclass/jmethodID/jfieldID referencesRobert Varga4-245/+281
This patch introduces an initialization framework, which tracks required references to Java classes and methods. It works by declaring classes and their constructor signatures, which are linked into a singly-linked list when the .so initializers are run. Once JNI_OnLoad() is invoked, this list is walked and all classes and their initializers are resolved. These are then used while the library remains loaded. Once JNI_OnUnload() is called, global references are released, so we can cleanly unload. The class declaration results in static utility objects being emitted in the scope of the declaration, hence to allocate an object or an array of objects is done via simple calls. Change-Id: I41984c13756339364dbcbf0144b947627e8e4fe1 Signed-off-by: Robert Varga <nite@hq.sk>
2016-01-20Rename vpe binary name to avoid collision with latexDamjan Marion1-1/+1
Change-Id: I34a46b9ebbc0e36486fbef528b34ea1c3be2e8be Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-01-04Warning be gone.Dave Wallace1-1/+1
Change-Id: I683298c9f1dbff4c1067fb3004b5554fdc8b4ee1 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2015-12-17Add ODL honeycomb VPP agent extensions to vppjapi jni java library.Dave Wallace8-69/+604
Change-Id: I084ffcf36fbac55c2862035d10b028e35e1e648d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2015-12-15replacing all vec_sort() invocations to vec_sort_with_function()Matus Fabian1-2/+10
Change-Id: I05895827ed52be292112484cee7d0a2591b67335 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2015-12-13new version handlingDamjan Marion2-7/+7
Change-Id: I90983f3df94a3b28199908b29ffd8f827ab0c379 Signed-off-by: Damjan Marion <damarion@cisco.com>
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke12-0/+3048
Change-Id: Ib246f1fbfce93274020ee93ce461e3d8bd8b9f17 Signed-off-by: Ed Warnicke <eaw@cisco.com>