Commit | Line | Data |
---|---|---|
43e5396b | 1 | /* |
501f6777 | 2 | * Copyright (C) 2014 - Christian Babeux <christian.babeux@efficios.com> |
43e5396b DG |
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.jul; | |
19 | ||
501f6777 | 20 | import java.io.IOException; |
43e5396b | 21 | |
501f6777 | 22 | public class LTTngAgent { |
43e5396b | 23 | |
501f6777 CB |
24 | /* |
25 | * !!! WARNING !!! | |
26 | * Please use the LTTngAgent found in the org.lttng.ust.agent package. | |
27 | * This class is DEPRECATED. | |
28 | */ | |
29 | ||
30 | private static LTTngAgent curAgent = null; | |
31 | private static org.lttng.ust.agent.LTTngAgent realAgent = null; | |
32 | ||
33 | ||
34 | private LTTngAgent() throws IOException { | |
35 | realAgent = org.lttng.ust.agent.LTTngAgent.getLTTngAgent(); | |
43e5396b DG |
36 | } |
37 | ||
501f6777 CB |
38 | public static synchronized LTTngAgent getLTTngAgent() throws IOException { |
39 | if (curAgent == null) { | |
40 | curAgent = new LTTngAgent(); | |
43e5396b | 41 | } |
501f6777 CB |
42 | |
43 | return curAgent; | |
43e5396b DG |
44 | } |
45 | ||
501f6777 CB |
46 | public void dispose() throws IOException { |
47 | realAgent.dispose(); | |
43e5396b DG |
48 | } |
49 | } |