Examples of IServiceTypeID


Examples of org.eclipse.ecf.discovery.identity.IServiceTypeID

   * @param aServiceTypeID Used as a prototype
   * @param stid Namespace to use
   */
  private void createFromAnother(IServiceTypeID aServiceTypeID, IServiceTypeID stid) {
    final Namespace namespace2 = stid.getNamespace();
    IServiceTypeID instance = null;
    instance = ServiceIDFactory.getDefault().createServiceTypeID(namespace2, aServiceTypeID);
    assertNotNull("it should have been possible to create a new instance of ", instance);
    assertTrue(instance.hashCode() == stid.hashCode());
    //TODO-mkuppe decide if equality should be handled by the namespace for IServiceTypeIDs?
    assertEquals(instance, stid);
    assertEquals(stid, instance);
    assertTrue(instance.hashCode() == aServiceTypeID.hashCode());
    assertEquals(instance, aServiceTypeID);
    assertEquals(aServiceTypeID, instance);
  }
View Full Code Here

Examples of org.eclipse.ecf.discovery.identity.IServiceTypeID

        .getProperty(Constants.OBJECTCLASS);
    for (String propertyKey : this.serviceReference.getPropertyKeys()) {
      super.properties.setProperty(propertyKey,
          this.serviceReference.getProperty(propertyKey));
    }
    IServiceTypeID serviceTypeID = ServiceIDFactory.getDefault()
        .createServiceTypeID(
            ZooDiscoveryContainer.getSingleton()
                .getConnectNamespace(), services,
            IServiceTypeID.DEFAULT_PROTO);
    serviceTypeID = new ZooDiscoveryServiceTypeID(
View Full Code Here

Examples of org.eclipse.ecf.discovery.identity.IServiceTypeID

   */
  public void testGetServicesNamespace() {
    testConnect();
    final Namespace namespace = discoveryLocator.getServicesNamespace();
    assertNotNull(namespace);
    final IServiceTypeID serviceTypeID = ServiceIDFactory.getDefault().createServiceTypeID(namespace, serviceInfo.getServiceID().getServiceTypeID());
    assertNotNull("It must be possible to obtain a IServiceTypeID", serviceTypeID);
  }
View Full Code Here

Examples of org.eclipse.ecf.discovery.identity.IServiceTypeID

  public ID createInstance(Object[] parameters) throws IDCreateException {
    if(parameters != null && parameters.length == 1 && parameters[0] instanceof String) {
      String str = (String) parameters[0];
      return new DnsSdServiceTypeID(this, str);
    } else if (parameters != null && parameters.length == 1 && parameters[0] instanceof IServiceTypeID) {
      IServiceTypeID serviceTypeID = (IServiceTypeID) parameters[0];
      return new DnsSdServiceTypeID(this, serviceTypeID);
    } else if (parameters != null && parameters.length == 1 && parameters[0] instanceof IServiceID) {
      IServiceID serviceID = (IServiceID) parameters[0];
      return new DnsSdServiceTypeID(this, serviceID.getServiceTypeID());
    } else if (parameters != null && parameters.length == 1 && parameters[0] instanceof StringID) {
      StringID stringID = (StringID) parameters[0];
      return new DnsSdServiceTypeID(this, stringID.getName());
    } else if (parameters != null && parameters.length == 2 && parameters[0] instanceof IServiceTypeID && parameters[1] instanceof URI) {
      IServiceTypeID serviceTypeID = (IServiceTypeID) parameters[0];
      URI uri = (URI) parameters[1];
      return new DnsSdServiceID(this, new DnsSdServiceTypeID(this, serviceTypeID), uri);
    } else {
      throw new IDCreateException(Messages.DnsSdNamespace_Wrong_Parameters);
    }
View Full Code Here

Examples of org.eclipse.ecf.discovery.identity.IServiceTypeID

    } else if (parameters.length == 2 && parameters[0] instanceof String && parameters[1] instanceof URI) {
      return new CompositeServiceID(this, new ServiceTypeID(this, (String) parameters[0]), (URI) parameters[1]);
    } else if (parameters.length == 2 && parameters[0] instanceof IServiceTypeID && parameters[1] instanceof URI) {
      return new CompositeServiceID(this, (IServiceTypeID) parameters[0], (URI) parameters[1]);
    } else if (parameters.length == 1 && parameters[0] instanceof IServiceTypeID) {
      final IServiceTypeID iServiceTypeID = (IServiceTypeID) parameters[0];
      return new ServiceTypeID(this, iServiceTypeID.getName());
    } else {
      throw new IDCreateException("wrong parameters"); //$NON-NLS-1$
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.discovery.ui.model.IServiceTypeID

    // convert the args to a list we can use for comparison
    List asList = Arrays.asList(args);

    // extract the sublist from the service types
    IServiceInfo serviceInfo = (IServiceInfo) receiver;
    IServiceTypeID serviceTypeId = serviceInfo.getServiceID().getServiceTypeID();
    List services = serviceTypeId.getEcfServices();
    if (services.size() < args.length) {
      return false;
    }
    List ecfServices = services.subList(0, args.length);
    return asList.equals(ecfServices);
View Full Code Here

Examples of org.eclipse.ecf.discovery.ui.model.IServiceTypeID

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setServiceTypeID(IServiceTypeID newServiceTypeID) {
    IServiceTypeID oldServiceTypeID = serviceTypeID;
    serviceTypeID = newServiceTypeID;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.ISERVICE_ID__SERVICE_TYPE_ID, oldServiceTypeID, serviceTypeID));
  }
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.