eclipse communication framework

an eclipse technology subproject

New and Noteworthy
0.8.2 Stable Release


Return to ECF download page
Return to ECF communication resources page

New and Noteworthy for 0.4.0
New and Noteworthy for 0.5.2
New and Noteworthy for 0.5.4
New and Noteworthy for 0.6.0
New and Noteworthy for 0.6.2
New and Noteworthy for 0.7.0
New and Noteworthy for 0.7.5
New and Noteworthy for 0.7.6
New and Noteworthy for 0.8.0
New and Noteworthy for 0.8.1

New Features

Preference Page for Managing Automatic Logins


A preference page underneath the 'Team' category has been added to allow the removal of automatic logins.

New Test Case for Zeroconf Discovery


There is a new test case in the org.eclipse.ecf.test plugin to test the Zeroconf-based discovery DiscoveryTest

package org.eclipse.ecf.test;

import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.core.identity.ServiceID;
import org.eclipse.ecf.discovery.IDiscoveryContainer;
import org.eclipse.ecf.discovery.IServiceEvent;
import org.eclipse.ecf.discovery.IServiceListener;
import org.eclipse.ecf.discovery.IServiceTypeListener;
import junit.framework.TestCase;

public class DiscoveryTest extends TestCase {
	
	static IContainer container = null;
	static IDiscoveryContainer discoveryContainer = null;
	
	public final void testDiscovery() throws Exception {
		container = ContainerFactory.getDefault().createContainer(
				"ecf.discovery.jmdns");
		container.connect(null, null);
		discoveryContainer = (IDiscoveryContainer) container
				.getAdapter(IDiscoveryContainer.class);
		discoveryContainer
				.addServiceTypeListener(new CollabServiceTypeListener());
		
		System.out.println("Discovery started.  Waiting 20s for discovered services");
		Thread.sleep(20000);
	}

	class CollabServiceTypeListener implements IServiceTypeListener {
		public void serviceTypeAdded(IServiceEvent event) {
			System.out.println("serviceTypeAdded(" + event + ")");
			ServiceID svcID = event.getServiceInfo().getServiceID();
			discoveryContainer.addServiceListener(svcID,
					new CollabServiceListener());
			discoveryContainer.registerServiceType(svcID);
		}
	}
	class CollabServiceListener implements IServiceListener {
		public void serviceAdded(IServiceEvent event) {
			System.out.println("serviceAdded(" + event + ")");
			discoveryContainer.requestServiceInfo(event.getServiceInfo()
					.getServiceID(), 3000);
		}
		public void serviceRemoved(IServiceEvent event) {
			System.out.println("serviceRemoved(" + event + ")");
		}
		public void serviceResolved(IServiceEvent event) {
			System.out.println("serviceResolved(" + event + ")");
		}
	}

}