X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Flttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2Fcontext%2FIContextInfoRetriever.java;fp=src%2Flib%2Flttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2Fcontext%2FIContextInfoRetriever.java;h=235a30a553966c4e3fab96af982cc45f26068483;hb=3081c83f06d9a65cae1507a5db358df84ed7c192;hp=0000000000000000000000000000000000000000;hpb=4871194b8eadb66e3a9f00cee0372dd7573567ca;p=lttng-ust.git diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/context/IContextInfoRetriever.java b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/context/IContextInfoRetriever.java new file mode 100644 index 00000000..235a30a5 --- /dev/null +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/context/IContextInfoRetriever.java @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (C) 2015 EfficiOS Inc. + * Copyright (C) 2015 Alexandre Montplaisir + */ + +package org.lttng.ust.agent.context; + +/** + * Context-retrieving object specified by the application to extract + * application-specific context information, which can then be passed on to the + * Java agents and saved to a trace. + * + * Retriever objects should be registered to the {@link ContextInfoManager} to + * make them available to the LTTng agents. + * + * @author Alexandre Montplaisir + */ +public interface IContextInfoRetriever { + + /** + * Retrieve a piece of context information from the application, identified + * by a key. + * + * @param key + * The key identifying the context information + * @return The context information. + */ + Object retrieveContextInfo(String key); +}