Package org.eclipse.ecf.provider.jslp.identity

Examples of org.eclipse.ecf.provider.jslp.identity.JSLPNamespace


  /* (non-Javadoc)
   * @see org.eclipse.ecf.tests.discovery.identity.ServiceIDTest#testCreateServiceTypeIDFromInternalString()
   */
  public void testCreateServiceTypeIDWithProviderSpecificString() {
    final String internalRep = "service:foo.eclipse:bar";
    IServiceTypeID stid = (IServiceTypeID) new JSLPNamespace().createInstance(new Object[]{internalRep});

    assertEquals(internalRep, stid.getInternal());
    assertTrue(stid.getName().startsWith("_foo._bar"));
    assertTrue(stid.getName().endsWith("._eclipse"));
   
View Full Code Here


  /* (non-Javadoc)
   * @see org.eclipse.ecf.tests.discovery.identity.ServiceIDTest#testCreateServiceTypeIDFromInternalString()
   */
  public void testCreateServiceTypeIDFromSLPStringWithDefaultNamingAuthority() {
    final String internalRep = "service:foo.iana:bar";
    final IServiceTypeID stid = (IServiceTypeID) new JSLPNamespace().createInstance(new Object[]{internalRep});

    // the internalRep contains "iana" but getInternal may not!
    final int indexOf = stid.getInternal().toLowerCase().indexOf("iana");
    assertTrue(indexOf == -1);
    assertEquals(IServiceTypeID.DEFAULT_NA, stid.getNamingAuthority());
View Full Code Here

  public void start(final BundleContext context) throws Exception {
    bundleContext = context;

    SafeRunner.run(new ExtensionRegistryRunnable(context) {
      protected void runWithoutRegistry() throws Exception {
        context.registerService(Namespace.class, new JSLPNamespace(), null);
        context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription("ecf.discovery.jslp", new ContainerInstantiator(), "JSLP Discovery Container", true, false), null); //$NON-NLS-1$//$NON-NLS-2$
        context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription("ecf.discovery.jslp.locator", new ContainerInstantiator(), "JSLP Discovery Locator Container", true, false), null); //$NON-NLS-1$//$NON-NLS-2$
        context.registerService(ContainerTypeDescription.class, new ContainerTypeDescription("ecf.discovery.jslp.advertiser", new ContainerInstantiator(), "JSLP Discovery Advertiser Container", true, false), null); //$NON-NLS-1$//$NON-NLS-2$
      }
    });
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.provider.jslp.identity.JSLPNamespace

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.