Search in sources :

Example 6 with IContainer

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

the class RestContainerTest method testCreateContainer2.

public void testCreateContainer2() throws Exception {
    ContainerTypeDescription description = getContainerFactory().getDescriptionByName(RestConstants.REST_CONTAINER_TYPE);
    IContainer container = getContainerFactory().createContainer(description, new Object[] { new URL(RestConstants.TEST_DE_TARGET) });
    assertNotNull(container);
    assertTrue(container instanceof RestClientContainer);
}
Also used : ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) RestClientContainer(org.eclipse.ecf.remoteservice.rest.client.RestClientContainer) IContainer(org.eclipse.ecf.core.IContainer) URL(java.net.URL)

Example 7 with IContainer

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

the class RestContainerTest method testGetRemoteServiceNamespace.

public void testGetRemoteServiceNamespace() throws Exception {
    IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
    IRemoteServiceClientContainerAdapter adapter = getRemoteServiceClientContainerAdapter(container);
    assertNotNull(adapter);
    Namespace namespace = adapter.getRemoteServiceNamespace();
    assertNotNull(namespace);
}
Also used : IRemoteServiceClientContainerAdapter(org.eclipse.ecf.remoteservice.client.IRemoteServiceClientContainerAdapter) IContainer(org.eclipse.ecf.core.IContainer) Namespace(org.eclipse.ecf.core.identity.Namespace)

Example 8 with IContainer

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

the class RpcContainerTest method testCreateContainer3.

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);
}
Also used : RpcClientContainer(org.eclipse.ecf.remoteservice.rpc.client.RpcClientContainer) ContainerTypeDescription(org.eclipse.ecf.core.ContainerTypeDescription) IContainer(org.eclipse.ecf.core.IContainer) URI(java.net.URI)

Example 9 with IContainer

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

the class AbstractConcatHostApplication method start.

public Object start(IApplicationContext context) throws Exception {
    // First, create container of appropriate type
    IContainer container = createContainer();
    // Then, from container create remote service container
    rsContainer = createRemoteServiceContainer(container);
    // Now register remote service
    registerRemoteService(getRemoteServiceClass(), createRemoteService(), createRemoteServiceProperties());
    printStarted();
    // And wait until we're explicitly stopped.
    synchronized (this) {
        while (!done) wait();
    }
    return new Integer(0);
}
Also used : IContainer(org.eclipse.ecf.core.IContainer)

Example 10 with IContainer

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

the class ContainerStoreTest method testAndRetrieveStoreContainerByIDAndCreateContainer.

public void testAndRetrieveStoreContainerByIDAndCreateContainer() throws Exception {
    final ID containerID = testStoreContainer();
    // Now retrieve from container store with given ID
    final IContainerEntry containerEntry = containerStore.retrieve(containerID);
    assertNotNull(containerEntry);
    final IContainer containera = containerEntry.createContainer();
    final ID containerIDa = containera.getID();
    assertNotNull(containerIDa);
    assertTrue(containerIDa.equals(containerID));
}
Also used : ID(org.eclipse.ecf.core.identity.ID) IContainer(org.eclipse.ecf.core.IContainer) IContainerEntry(org.eclipse.ecf.storage.IContainerEntry)

Aggregations

IContainer (org.eclipse.ecf.core.IContainer)121 ID (org.eclipse.ecf.core.identity.ID)29 ContainerTypeDescription (org.eclipse.ecf.core.ContainerTypeDescription)20 IRosterEntry (org.eclipse.ecf.presence.roster.IRosterEntry)9 IRoster (org.eclipse.ecf.presence.roster.IRoster)8 IChannelContainerAdapter (org.eclipse.ecf.datashare.IChannelContainerAdapter)7 IRemoteServiceContainer (org.eclipse.ecf.remoteservice.IRemoteServiceContainer)7 IRemoteServiceContainerAdapter (org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter)7 ISharedObjectContainer (org.eclipse.ecf.core.sharedobject.ISharedObjectContainer)5 IPresenceContainerAdapter (org.eclipse.ecf.presence.IPresenceContainerAdapter)5 RemoteServiceContainer (org.eclipse.ecf.remoteservice.RemoteServiceContainer)5 Action (org.eclipse.jface.action.Action)5 IAction (org.eclipse.jface.action.IAction)5 URL (java.net.URL)4 Job (org.eclipse.core.runtime.jobs.Job)4 ContainerConnectException (org.eclipse.ecf.core.ContainerConnectException)4 IContainerManager (org.eclipse.ecf.core.IContainerManager)4 ISharedObject (org.eclipse.ecf.core.sharedobject.ISharedObject)4 ISharedObjectManager (org.eclipse.ecf.core.sharedobject.ISharedObjectManager)4 RestClientContainer (org.eclipse.ecf.remoteservice.rest.client.RestClientContainer)4