* identifier of the graph that was published
* @throws ECFException
*/
public synchronized void add(ID graphID) throws ECFException {
if (config == null)
throw new ECFException("Not initialized.");
// wait to be activated before proceeding
synchronized (activationMutex) {
if (!activated)
try {
activationMutex.wait(1000);
} catch (InterruptedException e) {
throw new ECFException(e);
}
if (!activated)
throw new ECFException("Not activated.");
}
// tell everyone a graph was published
try {
getContext().sendMessage(null,
new Object[] { new Integer(ADD), graphID });
} catch (IOException e) {
throw new ECFException(e);
}
// track it yourself
handleAdd(getContext().getLocalContainerID(), graphID);
}