use of org.eclipse.ecf.core.sharedobject.SharedObjectAddException in project ecf by eclipse.
the class XMPPContainer method connect.
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ecf.provider.generic.ClientSOContainer#connect(org.eclipse
* .ecf.core.identity.ID, org.eclipse.ecf.core.security.IConnectContext)
*/
public void connect(ID remote, IConnectContext joinContext) throws ContainerConnectException {
try {
getSharedObjectManager().addSharedObject(presenceHelperID, presenceHelper, null);
super.connect(remote, joinContext);
XmppPlugin.getDefault().registerService(this);
} catch (final ContainerConnectException e) {
disconnect();
throw e;
} catch (final SharedObjectAddException e1) {
disconnect();
throw new ContainerConnectException(NLS.bind(Messages.XMPPContainer_EXCEPTION_ADDING_SHARED_OBJECT, presenceHelperID), e1);
}
}
use of org.eclipse.ecf.core.sharedobject.SharedObjectAddException in project ecf by eclipse.
the class SharedModelFactory method addSharedObject.
protected void addSharedObject(ISharedObjectManager mgr, ID id, Object data, String updaterID) throws SharedObjectCreateException {
HashMap props = new HashMap(2);
props.put(INITIAL_DATA_KEY, data);
props.put(MODEL_UPDATER_KEY, updaterID);
try {
mgr.addSharedObject(id, new LocalAgent(), props);
} catch (SharedObjectAddException e) {
throw new SharedObjectCreateException(e);
}
}
Aggregations