| 1 | /* |
| 2 | * SPDX-License-Identifier: LGPL-2.1-only |
| 3 | * |
| 4 | * Copyright (C) 2015 EfficiOS Inc. |
| 5 | * Copyright (C) 2015 Alexandre Montplaisir <alexmonthy@efficios.com> |
| 6 | */ |
| 7 | |
| 8 | package org.lttng.ust.agent.context; |
| 9 | |
| 10 | /** |
| 11 | * Context-retrieving object specified by the application to extract |
| 12 | * application-specific context information, which can then be passed on to the |
| 13 | * Java agents and saved to a trace. |
| 14 | * |
| 15 | * Retriever objects should be registered to the {@link ContextInfoManager} to |
| 16 | * make them available to the LTTng agents. |
| 17 | * |
| 18 | * @author Alexandre Montplaisir |
| 19 | */ |
| 20 | public interface IContextInfoRetriever { |
| 21 | |
| 22 | /** |
| 23 | * Retrieve a piece of context information from the application, identified |
| 24 | * by a key. |
| 25 | * |
| 26 | * @param key |
| 27 | * The key identifying the context information |
| 28 | * @return The context information. |
| 29 | */ |
| 30 | Object retrieveContextInfo(String key); |
| 31 | } |