Search in sources :

Example 81 with ID

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);
        }
    }
}
Also used : ID(org.eclipse.ecf.core.identity.ID)

Example 82 with ID

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);
}
Also used : ID(org.eclipse.ecf.core.identity.ID) ISharedObjectContainerConfig(org.eclipse.ecf.core.sharedobject.ISharedObjectContainerConfig)

Example 83 with ID

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));
}
Also used : ID(org.eclipse.ecf.core.identity.ID)

Example 84 with ID

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()));
}
Also used : ID(org.eclipse.ecf.core.identity.ID)

Example 85 with ID

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()));
}
Also used : ID(org.eclipse.ecf.core.identity.ID)

Aggregations

ID (org.eclipse.ecf.core.identity.ID)256 IContainer (org.eclipse.ecf.core.IContainer)29 IOException (java.io.IOException)19 IDCreateException (org.eclipse.ecf.core.identity.IDCreateException)18 UUID (java.util.UUID)17 HashMap (java.util.HashMap)12 ArrayList (java.util.ArrayList)11 ContainerConnectException (org.eclipse.ecf.core.ContainerConnectException)11 GUID (org.eclipse.ecf.core.identity.GUID)11 ISharedObjectManager (org.eclipse.ecf.core.sharedobject.ISharedObjectManager)11 XMPPRoomID (org.eclipse.ecf.provider.xmpp.identity.XMPPRoomID)11 Namespace (org.eclipse.ecf.core.identity.Namespace)10 XMPPID (org.eclipse.ecf.provider.xmpp.identity.XMPPID)10 Map (java.util.Map)9 Matcher (java.util.regex.Matcher)9 ECFException (org.eclipse.ecf.core.util.ECFException)9 List (java.util.List)8 ISharedObject (org.eclipse.ecf.core.sharedobject.ISharedObject)8 IChannel (org.eclipse.ecf.datashare.IChannel)8 Iterator (java.util.Iterator)7