本文整理汇总了Java中org.eclipse.osgi.framework.console.CommandProvider类的典型用法代码示例。如果您正苦于以下问题:Java CommandProvider类的具体用法?Java CommandProvider怎么用?Java CommandProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CommandProvider类属于org.eclipse.osgi.framework.console包,在下文中一共展示了CommandProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
/**
* Function called by dependency manager after "init ()" is called and after
* the services provided by the class are registered in the service registry
*
*/
void start() {
authProviders = new ConcurrentHashMap<String, IAAAProvider>();
// Instantiate cluster synced variables
allocateCaches();
retrieveCaches();
// Read startup configuration and populate databases
loadConfigurations();
// Make sure default Network Admin account is there
checkDefaultNetworkAdmin();
BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass())
.getBundleContext();
bundleContext.registerService(CommandProvider.class.getName(), this,
null);
}
示例2: initCP
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
private void initCP(IPartConfiguration[] arrConfig) {
m_XspConfig = new ArrayList<String>();
m_FacesConfig = new ArrayList<String>();
m_CommandProvider = new ArrayList<CommandProvider>();
m_FacesConfig
.add("org/openntf/xpt/core/config/xpt-core-faces-config.xml");
m_XspConfig.add("org/openntf/xpt/core/config/xpt-i18n.xsp-config");
for (IPartConfiguration lib : arrConfig) {
if (lib.getCommandProvider() != null) {
m_CommandProvider.add(lib.getCommandProvider());
}
if (lib.getFacesConfigFiles() != null) {
m_FacesConfig.addAll(Arrays.asList(lib.getFacesConfigFiles()));
}
if (lib.getXspConfigFiles() != null) {
m_XspConfig.addAll(Arrays.asList(lib.getXspConfigFiles()));
}
}
}
示例3: start
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* Called whenever the OSGi framework starts our bundle
*/
public void start( BundleContext bc )
throws Exception
{
m_commands = new RxtxCommands();
// Register our example service implementation in the OSGi service registry
m_registration = bc.registerService( CommandProvider.class, m_commands, null );
}
示例4: init
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
@PostConstruct
public void init(QJob job) {
this.job = job;
BundleContext bundleContext = FrameworkUtil.getBundle(QSystem.class).getBundleContext();
bundleContext.addBundleListener(this);
bundleContext.registerService(CommandProvider.class, this, null);
}
示例5: init
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
/**
* Function called by the dependency manager when all the required
* dependencies are satisfied
*
*/
void init() {
BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass())
.getBundleContext();
bundleContext.registerService(CommandProvider.class.getName(), this,
null);
}
示例6: getCommandProvider
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
public synchronized CommandProvider[] getCommandProvider(
IPartConfiguration[] arrConfig) {
if (m_CommandProvider == null) {
initCP(arrConfig);
}
return m_CommandProvider != null ? m_CommandProvider
.toArray(new CommandProvider[m_CommandProvider.size()])
: new CommandProvider[] {};
}
示例7: registerCommandProvider
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
/**
* Registers the AmgrCommandProvider to handle commands
*
* @param bundle
*
* @param bundleContext
*/
private void registerCommandProvider(final BundleContext bundleContext) {
CommandProvider cp = new OsgiCommandProvider();
Bundle bundle = bundleContext.getBundle();
Dictionary<String, Object> cpDictionary = new Hashtable<String, Object>(7);
cpDictionary.put("service.vendor", bundle.getHeaders().get("Bundle-Vendor"));
cpDictionary.put("service.ranking", new Integer(Integer.MIN_VALUE));
cpDictionary.put("service.pid", bundle.getBundleId() + "." + cp.getClass().getName());
consoleCommandService = bundleContext.registerService(CommandProvider.class.getName(), cp, cpDictionary);
}
示例8: start
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* Called whenever the OSGi framework starts our bundle
*/
public void start( BundleContext bc )
throws Exception
{
m_commands = new RxtxCommands();
// Register our example service implementation in the OSGi service registry
m_registration = bc.registerService( CommandProvider.class.getName(), m_commands, null );
}
示例9: start
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
@Override
public void start(final BundleContext context) {
bundle=context.getBundle();
commandLineReg=context.registerService(CommandProvider.class.getName(), new CommandLine(), null);
StartAndStop.getInstance().start();
}
示例10: start
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
bundleContext.registerService(CommandProvider.class.getName(), new Commands(), null);
}
示例11: registerCommandProvider
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
@Activate
public void registerCommandProvider(BundleContext bundleContext) {
serviceRegistration = bundleContext.registerService(CommandProvider.class, this, null);
}
示例12: start
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
@Override
public void start(final BundleContext context) throws Exception
{
service = new JiveCommandProvider();
context.registerService(CommandProvider.class.getName(), service, null);
}
示例13: registerWithOSGIConsole
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
private void registerWithOSGIConsole() {
BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass())
.getBundleContext();
bundleContext.registerService(CommandProvider.class.getName(), this,
null);
}
示例14: registerWithOSGIConsole
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
private void registerWithOSGIConsole() {
BundleContext bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
bundleContext.registerService(CommandProvider.class.getName(), this, null);
}
示例15: getCommandProvider
import org.eclipse.osgi.framework.console.CommandProvider; //导入依赖的package包/类
@Override
public CommandProvider getCommandProvider() {
// TODO Auto-generated method stub
return null;
}