package org.bench4q.agent.helper;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
public class ApplicationContextHelper implements ApplicationContextAware {

	private static ApplicationContext context;

	public static ApplicationContext getContext() {
		return context;
	}

	private void setContext(ApplicationContext context) {
		ApplicationContextHelper.context = context;
	}

	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		this.setContext(applicationContext);
	}

}
