use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class DataProcessorServerApplication method getContainerManagerService.
private IContainerManager getContainerManagerService() {
if (containerManagerServiceTracker == null) {
containerManagerServiceTracker = new ServiceTracker(bundleContext, IContainerManager.class.getName(), null);
containerManagerServiceTracker.open();
}
return (IContainerManager) containerManagerServiceTracker.getService();
}
use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class Activator method getContainerManager.
public IContainerManager getContainerManager() {
if (containerManagerTracker == null) {
containerManagerTracker = new ServiceTracker(context, IContainerManager.class.getName(), null);
containerManagerTracker.open();
}
return (IContainerManager) containerManagerTracker.getService();
}
use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class Activator method getContainerManager.
public IContainerManager getContainerManager() {
BundleContext context = getBundle().getBundleContext();
if (containerManagerTracker == null) {
containerManagerTracker = new ServiceTracker(context, IContainerManager.class.getName(), null);
containerManagerTracker.open();
}
return (IContainerManager) containerManagerTracker.getService();
}
use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class RemoteServiceHandlerUtil method getContainerWithConnectID.
// TODO push this functionality down into the ContainerManager
private static IContainer getContainerWithConnectID(ID aConnectedID) {
final IContainerManager containerManager = Activator.getDefault().getContainerManager();
final IContainer[] containers = containerManager.getAllContainers();
if (containers == null) {
return null;
}
for (int i = 0; i < containers.length; i++) {
ID connectedId = containers[i].getConnectedID();
if (connectedId != null && connectedId.equals(aConnectedID)) {
return containers[i];
}
}
return null;
}
use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class Activator method start.
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
IContainerManager containerManager = getContainerManagerService();
container = containerManager.getContainerFactory().createContainer(REST_CONTAINER_TYPE, getRestID(RSS_URL));
adapter = getRestClientContainerAdapter();
adapter.setResponseDeserializer(new SyndFeedResponseDeserializer());
IRemoteService restClientService = adapter.getRemoteService(registerCall().getReference());
asyncCall(restClientService);
}
Aggregations