use of org.eclipse.ecf.core.sharedobject.ISharedObjectContext in project ecf by eclipse.
the class RemoteAgent method unsubscribe.
public void unsubscribe(ID requestorID) {
synchronized (subscriptionMutex) {
if (subscribers == null)
return;
subscribers.remove(requestorID);
if (subscribers.isEmpty()) {
ISharedObjectContext ctx = config.getContext();
try {
ctx.sendMessage(config.getHomeContainerID(), new UnsubscribeMessage());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ctx.getSharedObjectManager().removeSharedObject(config.getSharedObjectID());
}
}
}
Aggregations