Search in sources :

Example 16 with ContainerTypeDescription

use of org.eclipse.ecf.core.ContainerTypeDescription in project ecf by eclipse.

the class ContainerFactoryServiceCreateTest method testContainerTypeDescriptionGetDescription.

public void testContainerTypeDescriptionGetDescription() {
    final ContainerTypeDescription desc = getContainerFactoryService().getDescriptionByName(CONTAINER_TYPE_NAME);
    assertTrue(desc.getDescription().equals(DESCRIPTION));
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription)

Example 17 with ContainerTypeDescription

use of org.eclipse.ecf.core.ContainerTypeDescription in project ecf by eclipse.

the class ContainerFactoryServiceCreateTest method testCreateContainer3.

public void testCreateContainer3() throws Exception {
    final ContainerTypeDescription desc = getContainerFactoryService().getDescriptionByName(CONTAINER_TYPE_NAME);
    assertNotNull(desc);
    final IContainer container = getContainerFactoryService().createContainer(desc);
    assertNotNull(container);
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) IContainer(org.eclipse.ecf.core.IContainer)

Example 18 with ContainerTypeDescription

use of org.eclipse.ecf.core.ContainerTypeDescription in project ecf by eclipse.

the class ContainerFactoryServiceCreateTest method testContainerTypeDescriptionGetSupportedAdapterTypes.

public void testContainerTypeDescriptionGetSupportedAdapterTypes() {
    final ContainerTypeDescription desc = getContainerFactoryService().getDescriptionByName(CONTAINER_TYPE_NAME);
    final String[] adapterTypes = desc.getSupportedAdapterTypes();
    assertTrue(adapterTypes.length > 0);
    assertTrue(Arrays.asList(adapterTypes).contains("one"));
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription)

Example 19 with ContainerTypeDescription

use of org.eclipse.ecf.core.ContainerTypeDescription in project ecf by eclipse.

the class ContainerFactoryServiceCreateTest method testContainerTypeDescriptionGetSupportedParemeterTypes.

public void testContainerTypeDescriptionGetSupportedParemeterTypes() {
    final ContainerTypeDescription desc = getContainerFactoryService().getDescriptionByName(CONTAINER_TYPE_NAME);
    final Class[][] parameterTypes = desc.getSupportedParameterTypes();
    assertTrue(parameterTypes.length == 1);
    assertTrue(parameterTypes[0].length == 2);
    assertTrue(parameterTypes[0][0].equals(String.class));
    assertTrue(parameterTypes[0][1].equals(Class.class));
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription)

Example 20 with ContainerTypeDescription

use of org.eclipse.ecf.core.ContainerTypeDescription in project ecf by eclipse.

the class ContainerFactoryServiceCreateTest method testCreateBaseContainer5.

public void testCreateBaseContainer5() throws Exception {
    final ContainerTypeDescription desc = getContainerFactoryService().getDescriptionByName(BASE_CONTAINER_TYPE_NAME);
    assertNotNull(desc);
    final IContainer base = getContainerFactoryService().createContainer(desc, IDFactory.getDefault().createGUID(), new Object[] { "param" });
    assertNotNull(base);
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) IContainer(org.eclipse.ecf.core.IContainer)

Aggregations

ContainerTypeDescription (org.eclipse.ecf.core.ContainerTypeDescription)54 IContainer (org.eclipse.ecf.core.IContainer)20 List (java.util.List)5 Namespace (org.eclipse.ecf.core.identity.Namespace)5 ExtensionRegistryRunnable (org.eclipse.ecf.core.util.ExtensionRegistryRunnable)5 ArrayList (java.util.ArrayList)3 Dictionary (java.util.Dictionary)3 Properties (java.util.Properties)3 IContainerManager (org.eclipse.ecf.core.IContainerManager)3 IRemoteServiceContainer (org.eclipse.ecf.remoteservice.IRemoteServiceContainer)3 URI (java.net.URI)2 URL (java.net.URL)2 Hashtable (java.util.Hashtable)2 ContainerConnectException (org.eclipse.ecf.core.ContainerConnectException)2 ID (org.eclipse.ecf.core.identity.ID)2 IConnectHandlerPolicy (org.eclipse.ecf.core.security.IConnectHandlerPolicy)2 RestClientContainer (org.eclipse.ecf.remoteservice.rest.client.RestClientContainer)2 RpcClientContainer (org.eclipse.ecf.remoteservice.rpc.client.RpcClientContainer)2 Bundle (org.osgi.framework.Bundle)2 ServiceFactory (org.osgi.framework.ServiceFactory)2