use of org.eclipse.ecf.core.sharedobject.ISharedObject in project ecf by eclipse.
the class ClientApplication method createSharedObjects.
public void createSharedObjects() throws Exception {
if (sharedObjectClassNames != null) {
for (int j = 0; j < clientCount; j++) {
ISharedObjectContainer scg = sm[j];
sharedObjects = new ID[sharedObjectClassNames.length];
for (int i = 0; i < sharedObjectClassNames.length; i++) {
// $NON-NLS-1$ //$NON-NLS-2$
System.out.println("Creating sharedObject: " + sharedObjectClassNames[i] + " for client " + scg.getID().getName());
ISharedObject so = (ISharedObject) Class.forName(sharedObjectClassNames[i]).newInstance();
// $NON-NLS-1$
sharedObjects[i] = IDFactory.getDefault().createStringID(sharedObjectClassNames[i] + "_" + i);
scg.getSharedObjectManager().addSharedObject(sharedObjects[i], so, new HashMap());
// $NON-NLS-1$
System.out.println("Created sharedObject for client " + scg.getID().getName());
}
}
}
}
Aggregations