Package org.eclipse.ecf.core

Examples of org.eclipse.ecf.core.ContainerTypeDescription


  private IRemoteServiceContainerAdapter getServerContainerAdapter() {
    if (this.server != null) return (IRemoteServiceContainerAdapter) this.server.getAdapter(IRemoteServiceContainerAdapter.class);
    IContainer [] containers = getContainerManager().getAllContainers();
    String containerType = getServerContainerTypeName();
    for(int i=0; i < containers.length; i++) {
      ContainerTypeDescription ctd = getContainerManager().getContainerTypeDescription(containers[i].getID());
      if (ctd != null && ctd.getName().equals(containerType)) return (IRemoteServiceContainerAdapter) containers[i].getAdapter(IRemoteServiceContainerAdapter.class);
    }
    return null;
  }
View Full Code Here


  protected IContainerFactory getFixture() {
    return fixture;
  }

  protected ContainerTypeDescription createContainerTypeDescription() {
    return new ContainerTypeDescription(this.getClass().getName(),
        new IContainerInstantiator() {
          public IContainer createInstance(
              ContainerTypeDescription description,
              Object[] parameters)
              throws ContainerCreateException {
View Full Code Here

    public TestContainer(ID id) {
      super(id);
    }
  }
  protected ContainerTypeDescription createContainerTypeDescription() {
    return new ContainerTypeDescription(getClass().getName(),new IContainerInstantiator() {

      public IContainer createInstance(
          ContainerTypeDescription description, Object[] parameters)
          throws ContainerCreateException {
        return new TestContainer(IDFactory.getDefault().createGUID());
View Full Code Here

    containerManager = null;
    super.tearDown();
  }

  protected ContainerTypeDescription createContainerTypeDescription() {
    return new ContainerTypeDescription(CONTAINER_TYPE_NAME,
        new IContainerInstantiator() {
          public IContainer createInstance(
              ContainerTypeDescription description,
              Object[] parameters)
              throws ContainerCreateException {
View Full Code Here

  public void testGetContainerDescriptionN() throws Exception {
    IContainer[] c = createContainers(10);
    assertNotNull(c);
    for (int i = 0; i < 10; i++) {
      ContainerTypeDescription description = containerManager
          .getContainerTypeDescription(c[i].getID());
      assertNotNull(description);
    }
  }
View Full Code Here

    assertNotNull(container);
    assertTrue(container instanceof RpcClientContainer);
  }

  public void testCreateContainer2() throws Exception {
    ContainerTypeDescription description = getContainerFactory()
        .getDescriptionByName(RpcConstants.RPC_CONTAINER_TYPE);
    IContainer container = getContainerFactory().createContainer(description,
        new Object[] { new URL(RpcConstants.TEST_ECHO_TARGET) });
    assertNotNull(container);
    assertTrue(container instanceof RpcClientContainer);
View Full Code Here

    assertNotNull(container);
    assertTrue(container instanceof RpcClientContainer);
  }

  public void testCreateContainer3() throws Exception {
    ContainerTypeDescription description = getContainerFactory()
        .getDescriptionByName(RpcConstants.RPC_CONTAINER_TYPE);
    IContainer container = getContainerFactory().createContainer(description,
        new Object[] { new URI(RpcConstants.TEST_ECHO_TARGET) });
    assertNotNull(container);
    assertTrue(container instanceof RpcClientContainer);
View Full Code Here

    getFixture().removeDescription(createContainerTypeDescription());
    super.tearDown();
  }

  protected ContainerTypeDescription createContainerTypeDescription() {
    return new ContainerTypeDescription(CONTAINER_TYPE_NAME,
        new IContainerInstantiator() {
          public IContainer createInstance(
              ContainerTypeDescription description,
              Object[] parameters)
              throws ContainerCreateException {
View Full Code Here

        .createContainer(CONTAINER_TYPE_NAME);
    assertNotNull(container);
  }

  public void testCreateContainer3() throws Exception {
    final ContainerTypeDescription desc = ContainerFactory.getDefault()
        .getDescriptionByName(CONTAINER_TYPE_NAME);
    assertNotNull(desc);
    final IContainer container = ContainerFactory.getDefault()
        .createContainer(desc);
    assertNotNull(container);
View Full Code Here

    } catch (final ContainerCreateException e) {
    }
  }

  public void testCreateContainer6() throws Exception {
    final ContainerTypeDescription desc = ContainerFactory.getDefault()
        .getDescriptionByName(CONTAINER_TYPE_NAME);
    assertNotNull(desc);
    final IContainer container = ContainerFactory.getDefault()
        .createContainer(desc, IDFactory.getDefault().createGUID());
    assertNotNull(container);
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.core.ContainerTypeDescription

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.