2 * Copyright (C) 2016 - EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
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.
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
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
18 package org.lttng.ust.agent.context;
21 * Virtual class containing the Java side of the LTTng-UST context provider
22 * registering/unregistering methods.
24 * @author Alexandre Montplaisir
26 final class LttngContextApi {
28 private LttngContextApi() {}
31 * Register a context provider to UST.
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.
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)}.
43 static native long registerProvider(String provider_name);
46 * Unregister a previously-registered context provider from UST.
49 * The pointer to the provider object, obtained from
50 * {@link #registerProvider}
52 static native void unregisterProvider(long provider_ref);