Blame liblttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/context/IContextInfoRetriever.java

Packit c04fcb
/*
Packit c04fcb
 * Copyright (C) 2015 - EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
Packit c04fcb
 *
Packit c04fcb
 * This library is free software; you can redistribute it and/or modify it
Packit c04fcb
 * under the terms of the GNU Lesser General Public License, version 2.1 only,
Packit c04fcb
 * as published by the Free Software Foundation.
Packit c04fcb
 *
Packit c04fcb
 * This library is distributed in the hope that it will be useful, but WITHOUT
Packit c04fcb
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Packit c04fcb
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
Packit c04fcb
 * for more details.
Packit c04fcb
 *
Packit c04fcb
 * You should have received a copy of the GNU Lesser General Public License
Packit c04fcb
 * along with this library; if not, write to the Free Software Foundation,
Packit c04fcb
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Packit c04fcb
 */
Packit c04fcb
Packit c04fcb
package org.lttng.ust.agent.context;
Packit c04fcb
Packit c04fcb
/**
Packit c04fcb
 * Context-retrieving object specified by the application to extract
Packit c04fcb
 * application-specific context information, which can then be passed on to the
Packit c04fcb
 * Java agents and saved to a trace.
Packit c04fcb
 *
Packit c04fcb
 * Retriever objects should be registered to the {@link ContextInfoManager} to
Packit c04fcb
 * make them available to the LTTng agents.
Packit c04fcb
 *
Packit c04fcb
 * @author Alexandre Montplaisir
Packit c04fcb
 */
Packit c04fcb
public interface IContextInfoRetriever {
Packit c04fcb
Packit c04fcb
	/**
Packit c04fcb
	 * Retrieve a piece of context information from the application, identified
Packit c04fcb
	 * by a key.
Packit c04fcb
	 *
Packit c04fcb
	 * @param key
Packit c04fcb
	 *            The key identifying the context information
Packit c04fcb
	 * @return The context information.
Packit c04fcb
	 */
Packit c04fcb
	Object retrieveContextInfo(String key);
Packit c04fcb
}