Package org.eclipse.ecf.core.identity

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


    final ID xmppID = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333");
    assertNotNull(xmppID);
  }

  public void testXMPPCreateID3() throws Exception {
    final ID xmppID = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333/myresource");
    assertNotNull(xmppID);
  }
View Full Code Here


    final ID xmppID = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333/myresource");
    assertNotNull(xmppID);
  }

  public void testXMPPCreateID4() throws Exception {
    final ID xmppID = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org/myresource");
    assertNotNull(xmppID);
  }
View Full Code Here

    final ID xmppID = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org/myresource");
    assertNotNull(xmppID);
  }

  public void testXMPPCreateID5() throws Exception {
    final ID xmppID = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org/myresource/subresource");
    assertNotNull(xmppID);
  }
View Full Code Here

    id2 = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333");
    id3 = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org");
  }

  public void testFQID() throws Exception {
    final ID local = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333/myresource");
    assertNotNull(local);
    final IFQID localfqid = (IFQID) local.getAdapter(IFQID.class);
    assertNotNull(localfqid);
    assertNotNull(localfqid.getFQName());
    assertNotNull(localfqid.getResourceName());
  }
View Full Code Here

    final List origContainers = new ArrayList();
    for (int i = 0; i < events.length; i++) {
      final CompositeServiceContainerEvent event = (CompositeServiceContainerEvent) events[i];

      // check if the local container is hidden correctly
      final ID localContainerId = event.getLocalContainerID();
      final ID connectedId = container.getConnectedID();
      assertEquals(localContainerId, connectedId);
     
      // check the IServiceInfo for correct fields/properties
      final IServiceInfo serviceInfo2 = ((IServiceEvent) event).getServiceInfo();
      assertTrue("IServiceInfo should match, expected:\n\t" + serviceInfo + " but was \n\t" + serviceInfo2, comparator.compare(serviceInfo2, serviceInfo) == 0);
View Full Code Here

    assertNotNull(localfqid.getFQName());
    assertNotNull(localfqid.getResourceName());
  }

  public void testFQID1() throws Exception {
    final ID local = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333/myresource");
    assertNotNull(local);
    final IFQID localfqid = (IFQID) local.getAdapter(IFQID.class);
    assertNotNull(localfqid);
    assertNotNull(localfqid.getFQName());
    assertNotNull(localfqid.getResourceName());

    final IFQID idfqid = (IFQID) id1.getAdapter(IFQID.class);
    assertTrue(local.equals(id1));
    assertTrue(localfqid.getFQName().equals(idfqid.getFQName()));
    assertTrue(localfqid.getResourceName().equals(idfqid.getResourceName()));
  }
View Full Code Here

    assertTrue(localfqid.getFQName().equals(idfqid.getFQName()));
    assertTrue(localfqid.getResourceName().equals(idfqid.getResourceName()));
  }

  public void testFQID2() throws Exception {
    final ID local = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333/myresource");
    assertNotNull(local);
    final IFQID localfqid = (IFQID) local.getAdapter(IFQID.class);
    assertNotNull(localfqid);
    assertNotNull(localfqid.getFQName());
    assertNotNull(localfqid.getResourceName());

    final IFQID idfqid = (IFQID) id2.getAdapter(IFQID.class);
View Full Code Here

    assertTrue(!localfqid.getFQName().equals(idfqid.getFQName()));
    assertTrue(!localfqid.getResourceName().equals(idfqid.getResourceName()));
  }

  public void testFQID3() throws Exception {
    final ID local = IDFactory.getDefault().createID(namespace, "foobar@ecf.eclipse.org:5333/myresource");
    assertNotNull(local);
    final IFQID localfqid = (IFQID) local.getAdapter(IFQID.class);
    assertNotNull(localfqid);
    assertNotNull(localfqid.getFQName());
    assertNotNull(localfqid.getResourceName());

    final IFQID idfqid = (IFQID) id3.getAdapter(IFQID.class);
    assertTrue(!local.equals(id3));
    assertTrue(!localfqid.getFQName().equals(idfqid.getFQName()));
    assertTrue(!localfqid.getResourceName().equals(idfqid.getResourceName()));
  }
View Full Code Here

  }

  public void testSendIM2() throws Exception {
    final Map sendprops = new HashMap();
    sendprops.put("prop1", "this");
    final ID sendthreadid = IDFactory.getDefault()
        .createStringID("thread1");
    // Send the whole thing
    chat0.getChatMessageSender().sendChatMessage(
        getClient(1).getConnectedID(), sendthreadid,
        IChatMessage.Type.CHAT, "subject1", "uvwxyz", sendprops);
View Full Code Here

    RestNamespace namespace = new RestNamespace(RestNamespace.NAME, null);
    Object[] parameters;
    try {
      String url = "http://www.twitter.com";
      parameters = new Object[] {new URL(url)};
      ID id = namespace.createInstance(parameters);
      assertEquals(url, id.getName());
    } catch (MalformedURLException e) {
      fail();
    }   
  }
View Full Code Here

TOP

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

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.