1 package com.atlassian.plugin.osgi.hostcomponents;
2
3 import com.atlassian.plugin.osgi.hostcomponents.impl.CallingBundleStore;
4 import org.osgi.framework.Bundle;
5
6 /**
7 * An accessor to the bundle currently invoking a host component
8 *
9 * @since 3.1.0
10 */
11 public class CallingBundleAccessor
12 {
13
14 /**
15 * @return the bundle currently invoking a host component, or {@code null} if the method call did not come from
16 * an OSGi bundle or tracking is not enabled.
17 */
18 public static Bundle getCallingBundle()
19 {
20 return CallingBundleStore.get();
21 }
22
23
24 }