15062c9de565c68c0508051640e530ee357452fe
[lttng-ust.git] / liblttng-ust-java-agent / java / lttng-ust-agent-common / org / lttng / ust / agent / context / LttngContextApi.java
1 /*
2 * Copyright (C) 2016 - EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18 package org.lttng.ust.agent.context;
19
20 /**
21 * Virtual class containing the Java side of the LTTng-UST context provider
22 * registering/unregistering methods.
23 *
24 * @author Alexandre Montplaisir
25 */
26 final class LttngContextApi {
27
28 private LttngContextApi() {}
29
30 /**
31 * Register a context provider to UST.
32 *
33 * The callbacks are the same for all providers, and are defined in the .c
34 * file. The only needed information is the retriever (which is called
35 * "provider" from UST'S point of view) name.
36 *
37 * @param provider_name
38 * The name of the provider
39 * @return The pointer to the created provider object. It's useless in the
40 * Java space, but will be needed for
41 * {@link #unregisterProvider(long)}.
42 */
43 static native long registerProvider(String provider_name);
44
45 /**
46 * Unregister a previously-registered context provider from UST.
47 *
48 * @param provider_ref
49 * The pointer to the provider object, obtained from
50 * {@link #registerProvider}
51 */
52 static native void unregisterProvider(long provider_ref);
53 }
54
This page took 0.029265 seconds and 3 git commands to generate.