use of org.eclipse.ecf.core.identity.ID in project ecf by eclipse.
the class DestroyIterator method removeSharedObjects.
void removeSharedObjects(Member m, boolean match) {
final HashSet set = getRemoveIDs(m.getID(), match);
final Iterator i = set.iterator();
while (i.hasNext()) {
final ID removeID = (ID) i.next();
if (isLoading(removeID)) {
removeSharedObjectFromLoading(removeID);
} else {
container.destroySharedObject(removeID);
}
}
}
use of org.eclipse.ecf.core.identity.ID in project ecf by eclipse.
the class SSLClientSOContainer method main.
public static final void main(String[] args) throws Exception {
ISharedObjectContainerConfig config = new SOContainerConfig(IDFactory.getDefault().createGUID());
SSLClientSOContainer container = new SSLClientSOContainer(config);
// now join group
ID serverID = IDFactory.getDefault().createStringID(SSLServerSOContainer.getDefaultServerURL());
container.connect(serverID, null);
Thread.sleep(200000);
}
use of org.eclipse.ecf.core.identity.ID in project ecf by eclipse.
the class ServerSOContainer method handleLeaveGroupMessage.
protected void handleLeaveGroupMessage(ContainerMessage mess) {
final ID fromID = mess.getFromContainerID();
if (fromID == null)
return;
synchronized (getGroupMembershipLock()) {
final IAsynchConnection conn = getConnectionForID(fromID);
if (conn == null)
return;
handleLeave(fromID, conn);
}
// Notify listeners
fireContainerEvent(new ContainerDisconnectedEvent(getID(), fromID));
}
use of org.eclipse.ecf.core.identity.ID in project ecf by eclipse.
the class ServerSOContainer method processDisconnect.
/*
* (non-Javadoc)
*
* @see org.eclipse.ecf.provider.generic.SOContainer#processDisconnect(org.eclipse.ecf.provider.comm.DisconnectEvent)
*/
protected void processDisconnect(DisconnectEvent e) {
final IAsynchConnection conn = (IAsynchConnection) e.getConnection();
ID fromID = null;
synchronized (getGroupMembershipLock()) {
fromID = getIDForConnection(conn);
if (fromID == null)
return;
handleLeave(fromID, conn);
}
if (fromID != null)
fireContainerEvent(new ContainerEjectedEvent(getID(), fromID, e.getException()));
}
use of org.eclipse.ecf.core.identity.ID in project ecf by eclipse.
the class ClientSOContainer method handleLeaveGroupMessage.
protected void handleLeaveGroupMessage(ContainerMessage mess) {
if (!isConnected())
return;
final ContainerMessage.LeaveGroupMessage lgm = (ContainerMessage.LeaveGroupMessage) mess.getData();
final ID fromID = mess.getFromContainerID();
if (fromID == null || !fromID.equals(remoteServerID)) {
// we ignore anything not from our server
return;
}
synchronized (getGroupMembershipLock()) {
handleLeave(fromID, connection);
}
// Now notify that we've been ejected
fireContainerEvent(new ContainerEjectedEvent(getID(), fromID, lgm.getData()));
}
Aggregations