Search in sources :

Example 76 with IContainer

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

the class RestContainerTest method testConnectedID.

public void testConnectedID() throws Exception {
    IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
    ID connectedID = container.getConnectedID();
    assertNull(connectedID);
}
Also used : ID(org.eclipse.ecf.core.identity.ID) IContainer(org.eclipse.ecf.core.IContainer)

Example 77 with IContainer

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

the class RestContainerTest method testConnect.

public void testConnect() throws Exception {
    IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
    ID connectedID = container.getConnectedID();
    ID targetID = createRestID(new URL(RestConstants.TEST_TWITTER_TARGET));
    assertNotNull(targetID);
    container.connect(targetID, null);
    connectedID = container.getConnectedID();
    assertEquals(targetID, connectedID);
}
Also used : ID(org.eclipse.ecf.core.identity.ID) IContainer(org.eclipse.ecf.core.IContainer) URL(java.net.URL)

Example 78 with IContainer

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

the class RestContainerTest method testCreateContainer.

public void testCreateContainer() throws Exception {
    IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
    assertNotNull(container);
    assertTrue(container instanceof RestClientContainer);
}
Also used : RestClientContainer(org.eclipse.ecf.remoteservice.rest.client.RestClientContainer) IContainer(org.eclipse.ecf.core.IContainer)

Example 79 with IContainer

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

the class ClientContainerConnectTest method testListenerConnected.

public void testListenerConnected() throws Exception {
    final IContainer client = getClients()[0];
    client.addListener(createListener());
    client.connect(createServerID(), null);
    final Object o = clientConnectedEvents.get(0);
    assertTrue(o instanceof IContainerConnectedEvent);
    final IContainerConnectedEvent cco = (IContainerConnectedEvent) o;
    assertTrue(cco.getLocalContainerID().equals(client.getID()));
    assertTrue(cco.getTargetID().equals(createServerID()));
}
Also used : IContainer(org.eclipse.ecf.core.IContainer) IContainerConnectedEvent(org.eclipse.ecf.core.events.IContainerConnectedEvent)

Example 80 with IContainer

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

the class ClientContainerConnectTest method testRemoveListener.

public void testRemoveListener() throws Exception {
    final IContainer client = getClients()[0];
    final IContainerListener l = createListener();
    client.addListener(l);
    client.removeListener(l);
    client.connect(createServerID(), null);
    assertTrue(clientConnectingEvents.size() == 0);
}
Also used : IContainerListener(org.eclipse.ecf.core.IContainerListener) IContainer(org.eclipse.ecf.core.IContainer)

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