OSGi XMPP [message #615224] |
Wed, 18 April 2007 14:30 |
Eclipse User |
|
|
|
Originally posted by: ricker.distributedinstruments.com
Has there been any discussion of creating an OSGi service for XMPP
similar to the OSGi HTTP service? Looking into the ECF architecture, I
expected to find such a lower level service with the higher level ECF
functionality built on top. This service would be especially useful as
the Eclipse community moves forward with server side OSGi.
- Ricker
|
|
|
|
Simple Headless XMPPS Container [message #615251 is a reply to message #615224] |
Fri, 20 April 2007 11:48 |
Bob Brady Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Hi ECF,
I need to use the ECF libs in a headless, programmatic way outside of
OSGi/Eclipse runtime. The code I've used in the past allowed me to add
the Container type description so that I could get an IContainer from
the factory and proceed with getting a connection.
Unfortunately, the API has changed quite a bit and the working code I
had is now broken. Could somebody help me out with a working code
snippet to create an ecf.xmpps.smack container outside of Eclipse?
The old working code is below. I tried experimenting with
BaseContainerInstantiator, but now even ContainerFactory.getDefault() is
throwing NullPointerExceptions in headless, non-Eclipse runtime.
Thanks,
Bob
Old ECF 0.7-0.8 Working Code
// Create IContainerInstantiator manually
IContainerInstantiator instantiator = new ContainerInstantiator();
// Create a container description that associates the
// appropriate name with the instantiator
// These values from org.eclipse.ecf.example.collab plugin.xml
//<containerFactory> element
String[] argTypes =
{"org.eclipse.ecf.core.identity.ID","java.lang.Integer"};
String[] argDefaults = {"","30000"};
String[] argNames = {"id", "keepAlive"};
// Generic used here, but ecf.xmpps.smack desired
ContainerTypeDescription cd = new
ContainerTypeDescription("ecf.generic.client",
instantiator,"ecf.generic.client", argTypes, argDefaults, argNames);
// Add this new description to ContainerFactory
IContainerFactory factory = ContainerFactory.getDefault();
factory.addDescription(cd);
|
|
|
Powered by
FUDForum. Page generated in 0.07428 seconds