Package org.eclipse.ecf.core.identity

Examples of org.eclipse.ecf.core.identity.Namespace


   */
  protected IServiceTypeID createServiceTypeID(
      org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription,
      IDiscoveryAdvertiser advertiser) {
   
    Namespace servicesNamespace = IDFactory.getDefault()
        .getNamespaceByName("ecf.namespace.discovery"); //$NON-NLS-1$
    if (advertiser != null) {
      servicesNamespace = advertiser.getServicesNamespace();
    }

View Full Code Here


      return requiredContainerID.equals(containerID);
    }
    // Else get the container factory arguments, create an ID from the
    // arguments
    // and check if the ID matches that
    Namespace ns = containerID.getNamespace();
    Object cid = properties
        .get(RemoteConstants.SERVICE_EXPORTED_CONTAINER_FACTORY_ARGS);
    // If no arguments are present, then any container ID should match
    if (cid == null)
      return true;
View Full Code Here

  }

  protected boolean includeContainerWithConnectNamespace(
      IContainer container, String connectNamespaceName) {
    if (connectNamespaceName != null) {
      Namespace namespace = container.getConnectNamespace();
      if (namespace != null
          && namespace.getName().equals(connectNamespaceName))
        return true;
    }
    return false;
  }
View Full Code Here

    int colonIndex = idName.indexOf(Namespace.SCHEME_SEPARATOR);
    if (colonIndex <= 0)
      return null;
    String scheme = idName.substring(0, colonIndex);
    // First try to find the Namespace using the protocol directly
    Namespace ns = getNamespaceByName(scheme);
    return (ns == null) ? findNamespaceByScheme(scheme) : ns;
  }
View Full Code Here

      return null;
    if (scheme.equals("ecftcp")) //$NON-NLS-1$
      return getIDFactory().getNamespaceByName(StringID.class.getName());
    List namespaces = getIDFactory().getNamespaces();
    for (Iterator i = namespaces.iterator(); i.hasNext();) {
      Namespace ns = (Namespace) i.next();
      if (scheme.equals(ns.getScheme()))
        return ns;
    }
    return null;
  }
View Full Code Here

    return null;
  }

  public static ID createID(String namespaceName, String idName)
      throws IDCreateException {
    Namespace ns = (namespaceName != null) ? getNamespaceByName(namespaceName)
        : findNamespaceByIdName(idName);
    if (ns == null)
      throw new IDCreateException(
          "Cannot find Namespace for namespaceName=" + namespaceName //$NON-NLS-1$
              + " and idName=" + idName); //$NON-NLS-1$
View Full Code Here

    //TODO convert non DnsSdServiceTypeIDs into DSTIDs
    if(aTargetID == null) {
      targetID = new DnsSdServiceTypeID();
    } else {
      final Namespace ns = getConnectNamespace();
      try {
        targetID = (DnsSdServiceTypeID) ns.createInstance(new Object[]{aTargetID});
      } catch(IDCreateException e) {
        throw new ContainerConnectException(e);
      }
    }
   
View Full Code Here

      ID connectedID = container.getConnectedID();
      if (connectedID != null) {
        interpreter.print("\tConnected to: ");
        printID(interpreter, connectedID);
      } else interpreter.println("\tNot connected.");
      Namespace ns = container.getConnectNamespace();
      if (ns != null) {
        interpreter.print("\tConnect namespace: ");
        interpreter.println(ns.getName());
      } else interpreter.println("\tNo connect namespace.");
      ContainerTypeDescription desc = getContainerManager().getContainerTypeDescription(container.getID());
      if (desc != null) printDescription(interpreter, desc);
    }
    interpreter.println("--End Container--");
View Full Code Here

      final IServiceInfo genericInfo) {

    // Convert similar to
    // org.eclipse.ecf.provider.discovery.CompositeDiscoveryContainer.getServiceIDForDiscoveryContainer(IServiceID,
    // IDiscoveryLocator)
    final Namespace servicesNamespace = advertiser.getServicesNamespace();

    final IServiceID genericServiceID = genericInfo.getServiceID();
    final ServiceID specificServiceID = (ServiceID) servicesNamespace
        .createInstance(new Object[] {
            genericServiceID.getServiceTypeID().getName(),
            genericServiceID.getLocation() });

    final IServiceTypeID serviceTypeID = specificServiceID
View Full Code Here

      fragment = "#" + fragment;
    }
    URI uri = URI.create(scheme + "://" + userInfo + host + ":" + port + path + query + fragment);
   
    // service id
    Namespace ns = aServiceTypeID.getNamespace();
    this.serviceID = (IServiceID) ns.createInstance(new Object[]{aServiceTypeID, uri});
    ((ServiceID) serviceID).setServiceInfo(this);
   
    this.serviceName = aServiceName;
   
    this.weight = weight;
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.identity.Namespace

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.