use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class ECFStart method run.
/*
* (non-Javadoc)
*
* @seeorg.eclipse.ecf.core.start.IECFStart#run(org.eclipse.core.runtime.
* IProgressMonitor)
*/
public IStatus run(IProgressMonitor monitor) {
final IContainerManager containerManager = (IContainerManager) ContainerFactory.getDefault();
containerManager.addListener(containerManagerListener);
return Status.OK_STATUS;
}
use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class AbstractGenericServer method createAndInitializeServer.
protected void createAndInitializeServer(String path, int keepAlive) throws IDCreateException {
if (// $NON-NLS-1$
path == null || path.equals(""))
// $NON-NLS-1$
throw new NullPointerException("Cannot create ID with null or empty path");
GenericServerContainer s = new GenericServerContainer(this, createServerConfig(path), serverGroup, path, keepAlive);
IContainerManager containerManager = Activator.getDefault().getContainerManager();
if (containerManager != null) {
// $NON-NLS-1$
ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.server");
containerManager.addContainer(s, ctd);
}
IConnectHandlerPolicy policy = createConnectHandlerPolicy(s, path);
if (policy != null)
s.setConnectPolicy(policy);
}
use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class Activator method getContainerManager.
/**
* @return container manager.
*/
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 SSLAbstractGenericServer method createAndInitializeServer.
protected void createAndInitializeServer(String path, int keepAlive) throws IDCreateException {
if (// $NON-NLS-1$
path == null || path.equals(""))
// $NON-NLS-1$
throw new NullPointerException("Cannot create ID with null or empty path");
SSLGenericServerContainer s = new SSLGenericServerContainer(this, createServerConfig(path), serverGroup, path, keepAlive);
IContainerManager containerManager = Activator.getDefault().getContainerManager();
if (containerManager != null) {
// $NON-NLS-1$
ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.server");
containerManager.addContainer(s, ctd);
}
IConnectHandlerPolicy policy = createConnectHandlerPolicy(s, path);
if (policy != null)
s.setConnectPolicy(policy);
}
use of org.eclipse.ecf.core.IContainerManager in project ecf by eclipse.
the class ServerManager method createServerContainer.
private TCPServerSOContainer createServerContainer(String id, TCPServerSOContainerGroup group, String path, int keepAlive) throws IDCreateException {
final ID newServerID = IDFactory.getDefault().createStringID(id);
TCPServerSOContainer container = new TCPServerSOContainer(new SOContainerConfig(newServerID), group, path, keepAlive);
IContainerManager containerManager = Activator.getDefault().getContainerManager();
if (containerManager != null) {
// $NON-NLS-1$
ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.server");
containerManager.addContainer(container, ctd);
}
return container;
}
Aggregations