本文整理汇总了Java中org.osgi.service.component.ComponentInstance类的典型用法代码示例。如果您正苦于以下问题:Java ComponentInstance类的具体用法?Java ComponentInstance怎么用?Java ComponentInstance使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ComponentInstance类属于org.osgi.service.component包,在下文中一共展示了ComponentInstance类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shoot
import org.osgi.service.component.ComponentInstance; //导入依赖的package包/类
public void shoot(String target) {
// create a new service instance
ComponentInstance instance = this.factory.newInstance(null);
OneShot shooter = (OneShot) instance.getInstance();
try {
shooter.shoot(target);
} finally {
// destroy the service instance
instance.dispose();
}
}
示例2: getComponentInstance
import org.osgi.service.component.ComponentInstance; //导入依赖的package包/类
@Override
public ComponentInstance getComponentInstance() {
return null;
}
示例3: doWebSocketConnect
import org.osgi.service.component.ComponentInstance; //导入依赖的package包/类
public WebSocket doWebSocketConnect(HttpServletRequest servlet, String protocol) {
ComponentInstance instance = webSocketFactory.newInstance(new Hashtable());
return (WebSocket) instance.getInstance();
}
示例4: doWebSocketConnect
import org.osgi.service.component.ComponentInstance; //导入依赖的package包/类
public WebSocket doWebSocketConnect(HttpServletRequest servlet, String protocol) {
ComponentInstance instance=webSocketFactory.newInstance(new Hashtable());
return (WebSocket) instance.getInstance();
}
示例5: getComponentInstance
import org.osgi.service.component.ComponentInstance; //导入依赖的package包/类
public ComponentInstance getComponentInstance() {
throw new UnsupportedOperationException("Mock implementation");
}
示例6: getComponentInstance
import org.osgi.service.component.ComponentInstance; //导入依赖的package包/类
public ComponentInstance getComponentInstance() {
return null;
}
示例7: getComponentInstance
import org.osgi.service.component.ComponentInstance; //导入依赖的package包/类
public ComponentInstance getComponentInstance() {
throw new UnsupportedOperationException();
}
开发者ID:michelemostarda,项目名称:machinelinking-stanbol-enhancement-engine,代码行数:4,代码来源:MockComponentContext.java