Package org.eclipse.ecf.core.identity

Examples of org.eclipse.ecf.core.identity.Namespace.createInstance()


    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


    // 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

    }
    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

        throw new ContainerConnectException(Messages.DnsSdDiscoveryLocator_No_Target_ID);
      }
    } else {
      final Namespace ns = getConnectNamespace();
      try {
        targetID = (DnsSdServiceTypeID) ns.createInstance(new Object[]{aTargetID});
      } catch(IDCreateException e) {
        throw new ContainerConnectException(e);
      }
    }
   
View Full Code Here

  }

  public void testNewNamespaceCreateInstance() {
    Namespace ns = createNamespace();
    try {
      ns.createInstance(null);
      fail("createInstance did not return null");
    } catch (IDCreateException e) {

    }
  }
View Full Code Here

      super(Messages.LookupHandler_RESOLVING);
      uri = anURI;
      container = (UserInputDiscoveryLocator) ContainerFactory.getDefault().createContainer(UserInputDiscoveryContainerInstantiator.NAME);
      Namespace namespace = IDFactory.getDefault().getNamespaceByName(uri.getScheme());
      if(namespace != null) {
        serviceTypeID = (IServiceTypeID) namespace.createInstance(new Object[] { uri });
      } else {
        //TODO throw ex and catch in execute with proper user notification
      }
    }
View Full Code Here

    uri = URI.create(buf.toString());
  }

  private void setIServiceTypeID(final ServiceURL aServiceURL, final String[] scopes) {
    final Namespace namespace = IDFactory.getDefault().getNamespaceByName(JSLPNamespace.NAME);
    serviceID = (IServiceTypeID) namespace.createInstance(new Object[] {aServiceURL, scopes});
  }

  /**
   * @return URI
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.