Package org.eclipse.ecf.core

Examples of org.eclipse.ecf.core.IContainerManager


     * Called on ECF-startup, registers our IContainerManagerListener with the IContainerManager, hence we are able to
     * react to added/removed containers.
     */
    @Override
    public IStatus run(IProgressMonitor monitor) {
        IContainerManager containerManager = ECFContribution.getDefault().getContainerManager();
        if (containerManager == null)
            return new Status(IStatus.WARNING, ECFContribution.PLUGIN_ID, IStatus.WARNING, "no container manager available", null);
        containerManager.addListener(containerManagerListener);
        return Status.OK_STATUS;       
    }
View Full Code Here


    // make remote service admin available
    rsaProps = new Properties();
    rsaProps.put(RemoteServiceAdmin.SERVICE_PROP, new Boolean(true));
   
    IContainerManager containerManager = getContainerManager();
    Assert.isNotNull(containerManager,
        "Container manager service must be present to start ECF Remote Service Admin"); //$NON-NLS-1$
   
    ContainerTypeDescription[] remoteServiceDescriptions = containerManager
        .getContainerFactory().getDescriptionsForContainerAdapter(
            IRemoteServiceContainerAdapter.class);
    // The following adds the standard supported configs and supported intents
    // values for all remote service descriptions to rsaProps
    for (int i = 0; i < remoteServiceDescriptions.length; i++)
View Full Code Here

    commandService = null;
  }

  protected List getPresenceContainerAdapters() {
    List presenceContainers = new ArrayList();
    IContainerManager containerManager = Activator.getDefault().getContainerManager();
    if (containerManager == null)
      return presenceContainers;
    IContainer[] containers = containerManager.getAllContainers();
    for (int i = 0; i < containers.length; i++) {
      IPresenceContainerAdapter presenceContainerAdapter = (IPresenceContainerAdapter) containers[i].getAdapter(IPresenceContainerAdapter.class);
      if ((containers[i].getConnectedID() != null) && (presenceContainerAdapter != null)) {
        presenceContainers.add(presenceContainerAdapter);
      }
View Full Code Here

   *            The conected ID for which an IContainer is to be returned
   * @return a IContainer instance of null
   */
  // TODO push this functionality down into the ContainerManager
  private IContainer getContainerByConnectID(ID connectID) {
    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();
View Full Code Here

    }
  }

  // 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();
View Full Code Here

  }

  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) {
      ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.server"); //$NON-NLS-1$
      containerManager.addContainer(container, ctd);
    }
    return container;
  }
View Full Code Here

  protected void createAndInitializeServer(String path, int keepAlive) throws IDCreateException {
    if (path == null || path.equals("")) //$NON-NLS-1$
      throw new NullPointerException("Cannot create ID with null or empty path"); //$NON-NLS-1$
    GenericServerContainer s = new GenericServerContainer(this, createServerConfig(path), serverGroup, path, keepAlive);
    IContainerManager containerManager = Activator.getDefault().getContainerManager();
    if (containerManager != null) {
      ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.server"); //$NON-NLS-1$
      containerManager.addContainer(s, ctd);
    }
    IConnectHandlerPolicy policy = createConnectHandlerPolicy(s, path);
    if (policy != null)
      s.setConnectPolicy(policy);
  }
View Full Code Here

  protected void createAndInitializeServer(String path, int keepAlive) throws IDCreateException {
    if (path == null || path.equals("")) //$NON-NLS-1$
      throw new NullPointerException("Cannot create ID with null or empty path"); //$NON-NLS-1$
    SSLGenericServerContainer s = new SSLGenericServerContainer(this, createServerConfig(path), serverGroup, path, keepAlive);
    IContainerManager containerManager = Activator.getDefault().getContainerManager();
    if (containerManager != null) {
      ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.server"); //$NON-NLS-1$
      containerManager.addContainer(s, ctd);
    }
    IConnectHandlerPolicy policy = createConnectHandlerPolicy(s, path);
    if (policy != null)
      s.setConnectPolicy(policy);
  }
View Full Code Here

    server = createServer();
    clients = createClients();
  }

  protected void removeFromContainerManager(IContainer container) {
    IContainerManager manager = Activator.getDefault().getContainerManager();
    if (manager != null) manager.removeContainer(container);
  }
View Full Code Here

   *
   * @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;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.IContainerManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.