Search in sources :

Example 6 with IContainerManager

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;
}
Also used : IContainerManager(org.eclipse.ecf.core.IContainerManager)

Example 7 with IContainerManager

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);
}
Also used : IConnectHandlerPolicy(org.eclipse.ecf.core.security.IConnectHandlerPolicy) ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) IContainerManager(org.eclipse.ecf.core.IContainerManager)

Example 8 with IContainerManager

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();
}
Also used : ServiceTracker(org.osgi.util.tracker.ServiceTracker) IContainerManager(org.eclipse.ecf.core.IContainerManager)

Example 9 with IContainerManager

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);
}
Also used : IConnectHandlerPolicy(org.eclipse.ecf.core.security.IConnectHandlerPolicy) ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) IContainerManager(org.eclipse.ecf.core.IContainerManager)

Example 10 with IContainerManager

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;
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) IContainerManager(org.eclipse.ecf.core.IContainerManager) IServiceTypeID(org.eclipse.ecf.discovery.identity.IServiceTypeID)

Aggregations

IContainerManager (org.eclipse.ecf.core.IContainerManager)31 ServiceTracker (org.osgi.util.tracker.ServiceTracker)20 IContainer (org.eclipse.ecf.core.IContainer)4 ContainerTypeDescription (org.eclipse.ecf.core.ContainerTypeDescription)3 ID (org.eclipse.ecf.core.identity.ID)3 IConnectHandlerPolicy (org.eclipse.ecf.core.security.IConnectHandlerPolicy)3 IHello (org.eclipse.ecf.examples.remoteservices.hello.IHello)2 IRemoteService (org.eclipse.ecf.remoteservice.IRemoteService)2 IRemoteServiceContainerAdapter (org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter)2 PermissionCollection (java.security.PermissionCollection)1 ISharedObjectContainerGroupManager (org.eclipse.ecf.core.sharedobject.ISharedObjectContainerGroupManager)1 IServiceTypeID (org.eclipse.ecf.discovery.identity.IServiceTypeID)1 Hello (org.eclipse.ecf.examples.remoteservices.hello.impl.Hello)1 IPresenceContainerAdapter (org.eclipse.ecf.presence.IPresenceContainerAdapter)1 IRoster (org.eclipse.ecf.presence.roster.IRoster)1 IRosterEntry (org.eclipse.ecf.presence.roster.IRosterEntry)1 MessagesView (org.eclipse.ecf.presence.ui.MessagesView)1 IRemoteServiceReference (org.eclipse.ecf.remoteservice.IRemoteServiceReference)1 SyndFeedResponseDeserializer (org.eclipse.ecf.remoteservice.rest.synd.SyndFeedResponseDeserializer)1 RemoteServiceTracker (org.eclipse.ecf.remoteservice.util.tracker.RemoteServiceTracker)1