Package org.eclipse.ecf.remoteservice.rpc.identity

Examples of org.eclipse.ecf.remoteservice.rpc.identity.RpcNamespace


public class RpcNamespaceTest extends AbstractRpcTestCase {

  public void testCreation() {
    String desc = "description";
    RpcNamespace namespace = new RpcNamespace(RpcNamespace.NAME, desc);
    assertEquals(RpcNamespace.NAME, namespace.getName());
    assertEquals(desc, namespace.getDescription());
  }
View Full Code Here


    assertEquals(RpcNamespace.NAME, namespace.getName());
    assertEquals(desc, namespace.getDescription());
  }
 
  public void testCreateInstance() {
    RpcNamespace namespace = new RpcNamespace(RpcNamespace.NAME, null);
    Object[] parameters;
    try {     
      String url = RpcConstants.TEST_ECHO_TARGET;
      parameters = new Object[] {new URL(url)};
      ID id = namespace.createInstance(parameters);
      assertEquals(url, id.getName());
    } catch (MalformedURLException e) {
      fail();
    }   
  }
View Full Code Here

      fail();
    }   
  }
 
  public void testGetScheme() {
    RpcNamespace namespace = new RpcNamespace(RpcNamespace.NAME, null);
    assertEquals(RpcNamespace.SCHEME, namespace.getScheme());
  }
View Full Code Here

  public void start(final BundleContext bundleContext) throws Exception {
    plugin = this;
    Activator.context = bundleContext;
    SafeRunner.run(new ExtensionRegistryRunnable(bundleContext) {
      protected void runWithoutRegistry() throws Exception {
        bundleContext.registerService(Namespace.class, new RpcNamespace(), null);
        bundleContext.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(
            "ecf.xmlrpc.client", new RpcClientContainerInstantiator(), "Rpc Client Container"), null); //$NON-NLS-1$ //$NON-NLS-2$
      }
    });
  }
View Full Code Here

  public String[] getSupportedAdapterTypes(ContainerTypeDescription description) {
    return getInterfacesAndAdaptersForClass(RpcClientContainer.class);
  }

  public Class[][] getSupportedParameterTypes(ContainerTypeDescription description) {
    RpcNamespace namespace = (RpcNamespace) IDFactory.getDefault().getNamespaceByName(RpcNamespace.NAME);
    return namespace.getSupportedParameterTypes();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.remoteservice.rpc.identity.RpcNamespace

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.