本文整理了Java中org.apache.felix.ipojo.Factory.getBundleContext()
方法的一些代码示例,展示了Factory.getBundleContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Factory.getBundleContext()
方法的具体详情如下:
包路径:org.apache.felix.ipojo.Factory
类名称:Factory
方法名:getBundleContext
[英]Gets the bundle context of the factory.
[中]获取工厂的捆绑包上下文。
代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo.composite
public BundleContext getBundleContext() {
return m_delegate.getBundleContext();
}
代码示例来源:origin: apache/felix
public BundleContext getBundleContext() {
return m_delegate.getBundleContext();
}
代码示例来源:origin: info.kwarc.sally4.mhw/mhw-mmt
@Unbind(filter = "(factory.name=" + MMTImpl.factory_id + ")")
void unbind(Factory mmtFactory) {
MMTFactories.remove(mmtFactory.getBundleContext().getBundle().getVersion().toString());
}
// ---------------------------------------------------------------------------------
代码示例来源:origin: info.kwarc.sally4.mhw/mhw-mmt
@Bind(filter = "(factory.name=" + MMTImpl.factory_id + ")")
void bind(Factory mmtFactory) {
MMTFactories.put(mmtFactory.getBundleContext().getBundle().getVersion().toString(), mmtFactory);
}
代码示例来源:origin: org.apache.felix/org.apache.felix.ipojo
public String generate(final Factory factory, final List<String> reserved) throws UnacceptableConfiguration {
// Loop until we obtain a unique value (or counter overflow)
long counter = 0;
while (counter < maximum) {
String generated = m_delegate.generate(factory, reserved);
counter++;
// Verify uniqueness
if (!reserved.contains(generated)) {
return generated;
}
}
// Should never happen (except is NameGenerator composition is broken: like a delegate that
// never change its return value)
throw new UnacceptableConfiguration(format("Cannot generate unique instance name for factory %s/%s from bundle %d",
factory.getName(),
factory.getVersion(),
factory.getBundleContext().getBundle().getBundleId()));
}
}
代码示例来源:origin: apache/felix
public String generate(final Factory factory, final List<String> reserved) throws UnacceptableConfiguration {
// Loop until we obtain a unique value (or counter overflow)
long counter = 0;
while (counter < maximum) {
String generated = m_delegate.generate(factory, reserved);
counter++;
// Verify uniqueness
if (!reserved.contains(generated)) {
return generated;
}
}
// Should never happen (except is NameGenerator composition is broken: like a delegate that
// never change its return value)
throw new UnacceptableConfiguration(format("Cannot generate unique instance name for factory %s/%s from bundle %d",
factory.getName(),
factory.getVersion(),
factory.getBundleContext().getBundle().getBundleId()));
}
}
代码示例来源:origin: apache/felix
String bundle = factory.getBundleContext().getBundle().getSymbolicName()
+ " (" + factory.getBundleContext().getBundle().getBundleId() + ")";
pw.object();
pw.key("name");
代码示例来源:origin: apache/felix
pw.value(StateUtils.getFactoryState(factory.getState()));
String bundle = factory.getBundleContext().getBundle().getSymbolicName()
+ " (" + factory.getBundleContext().getBundle().getBundleId() + ")";
pw.key("bundle");
pw.value(bundle);
内容来源于网络,如有侵权,请联系作者删除!