Package org.eclipse.ecf.core

Examples of org.eclipse.ecf.core.ContainerTypeDescription


    // "http://"+java.net.InetAddress.getLocalHost().getHostName();
    String targetURL = "http://feeds.feedburner.com";
    if (args.length > 0) {
      targetURL = args[0];
    }
    final ContainerTypeDescription contd = new ContainerTypeDescription(RssContainerInstantiator.class.getName(), RssContainerInstantiator.class.getName(), null);
    ContainerFactory.getDefault().addDescription(contd);

    final RssClientSOContainer container = new RssClientSOContainer();
    // now connect to rss service
    final ID serverID = IDFactory.getDefault().createStringID(targetURL);
View Full Code Here


  private ExportRegistration createErrorExportRegistration(
      ServiceReference serviceReference,
      Map<String, Object> overridingProperties, String errorMessage,
      SelectContainerException exception) {
    ContainerTypeDescription ctd = exception.getContainerTypeDescription();
    overridingProperties
        .put(org.osgi.service.remoteserviceadmin.RemoteConstants.ENDPOINT_ID,
            "noendpoint"); //$NON-NLS-1$
    overridingProperties
        .put(org.osgi.service.remoteserviceadmin.RemoteConstants.SERVICE_IMPORTED_CONFIGS,
            (ctd == null) ? "noconfig" : ctd.getName()); //$NON-NLS-1$
    return new ExportRegistration(exception, new EndpointDescription(
        serviceReference, overridingProperties));
  }
View Full Code Here

    return Activator.getDefault().getContainerManager()
        .getContainerTypeDescription(containerID);
  }
 
  private boolean isClient(IContainer container) {
    ContainerTypeDescription ctd = getContainerTypeDescription(container.getID());
    if (ctd == null)
      return false;
    else
      return !ctd.isServer();
  }
View Full Code Here

    PropertiesUtil.copyNonReservedProperties(overridingProperties, target);
    return target;
  }

  private String[] getSupportedConfigs(ID containerID) {
    ContainerTypeDescription ctd = getContainerTypeDescription(containerID);
    return (ctd == null) ? null : ctd.getSupportedConfigs();
  }
View Full Code Here

    return (ctd == null) ? null : ctd.getSupportedConfigs();
  }

  private String[] getImportedConfigs(ID containerID,
      String[] exporterSupportedConfigs) {
    ContainerTypeDescription ctd = getContainerTypeDescription(containerID);
    return (ctd == null) ? null : ctd
        .getImportedConfigs(exporterSupportedConfigs);
  }
View Full Code Here

    return (ctd == null) ? null : ctd
        .getImportedConfigs(exporterSupportedConfigs);
  }

  private String[] getSupportedIntents(ID containerID) {
    ContainerTypeDescription ctd = getContainerTypeDescription(containerID);
    return (ctd == null) ? null : ctd.getSupportedIntents();
  }
View Full Code Here

  protected boolean matchSupportedConfigs(IContainer container,
      String[] remoteSupportedConfigs) {
    if (remoteSupportedConfigs == null)
      return false;
    ContainerTypeDescription description = getContainerTypeDescription(container);
    if (description == null)
      return false;
    return description.getImportedConfigs(remoteSupportedConfigs) != null;
  }
View Full Code Here

    if (containerTypeDescriptions == null)
      return null;

    // Go through all containerTypeDescriptions
    for (Iterator i = containerTypeDescriptions.iterator(); i.hasNext();) {
      ContainerTypeDescription desc = (ContainerTypeDescription) i.next();
      // For each one, get the localImportedConfigs for the remote
      // supported configs
      String[] localImportedConfigs = desc
          .getImportedConfigs(remoteSupportedConfigs);
      // If their are some local imported configs for this description
      if (localImportedConfigs != null) {
        // Then get the imported config properties
        Dictionary importedConfigProperties = desc
            .getPropertiesForImportedConfigs(
                localImportedConfigs,
                PropertiesUtil
                    .createDictionaryFromMap(remoteExportedProperties));
        // Then select a specific local imported config (typically the
View Full Code Here

        }, (Dictionary) rsaProps);

    ctdTracker = new ServiceTracker<ContainerTypeDescription,ContainerTypeDescription>(context,ContainerTypeDescription.class,new ServiceTrackerCustomizer<ContainerTypeDescription,ContainerTypeDescription>() {
      public ContainerTypeDescription addingService(
          ServiceReference<ContainerTypeDescription> reference) {
        ContainerTypeDescription ctd = null;
        if (reference != null && context != null) {
          ctd = context.getService(reference);
          if (ctd != null) {
            // Add any new supported configs to rsaProps
            addSupportedConfigsAndIntents(ctd);
View Full Code Here

      // onto next one
      IRemoteServiceContainerAdapter adapter = hasRemoteServiceContainerAdapter(containers[i]);
      if (adapter == null)
        continue;
      // Get container type description and intents
      ContainerTypeDescription description = getContainerTypeDescription(containers[i]);
      // If it has no description go onto next
      if (description == null)
        continue;

      // http://bugs.eclipse.org/331532
      if (!description.isServer()) {
        continue;
      }

      if (matchExistingHostContainer(serviceReference,
          overridingProperties, containers[i], adapter, description,
View Full Code Here

TOP

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

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.