Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-05-04 21:53:02 +0000
committerslewis2007-05-04 21:53:02 +0000
commit72c12a2c03e55934b2560a607275e9e253e66b5f (patch)
treed8f330ff06ef77727d5ab5b7d443c09002a7cf4b
parentd8164ed0ed3624ac52c2e62090dbc5e407208066 (diff)
downloadorg.eclipse.ecf-72c12a2c03e55934b2560a607275e9e253e66b5f.tar.gz
org.eclipse.ecf-72c12a2c03e55934b2560a607275e9e253e66b5f.tar.xz
org.eclipse.ecf-72c12a2c03e55934b2560a607275e9e253e66b5f.zip
Fixed account disconnect in MultiRosterView
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/IConnection.java5
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java2
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java27
3 files changed, 5 insertions, 29 deletions
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/IConnection.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/IConnection.java
index 82df0672c..51587cb89 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/IConnection.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/IConnection.java
@@ -10,7 +10,6 @@
*****************************************************************************/
package org.eclipse.ecf.provider.comm;
-import java.io.IOException;
import java.util.Map;
import org.eclipse.core.runtime.IAdaptable;
@@ -42,10 +41,8 @@ public interface IConnection extends IAdaptable {
/**
* Disconnect
*
- * @throws IOException
- * if disconnection cannot occur
*/
- public void disconnect() throws IOException;
+ public void disconnect();
/**
* @return true if the implementing class has been previously connected,
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java
index 55efa8ca2..c046ca01a 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/comm/tcp/Client.java
@@ -437,7 +437,7 @@ public final class Client implements ISynchAsynchConnection {
}
}, getLocalID() + ":ping:" + getAddressPort()); //$NON-NLS-1$
}
- public synchronized void disconnect() throws IOException {
+ public synchronized void disconnect() {
debug("disconnect()"); //$NON-NLS-1$
// Close send queue and socket
queue.close();
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java
index 43ae9549f..155d04d62 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/SOContainer.java
@@ -26,7 +26,6 @@ import java.util.Vector;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.core.IContainerListener;
-import org.eclipse.ecf.core.events.ContainerDisconnectedEvent;
import org.eclipse.ecf.core.events.ContainerDisposeEvent;
import org.eclipse.ecf.core.events.IContainerEvent;
import org.eclipse.ecf.core.identity.ID;
@@ -811,13 +810,8 @@ public abstract class SOContainer implements ISharedObjectContainer {
throws ContainerConnectException;
protected void killConnection(IConnection conn) {
- try {
- if (conn != null && conn.isConnected()) {
- debug("killconnection(" + conn + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- conn.disconnect();
- }
- } catch (IOException e) {
- logException("Exception in killConnection", e); //$NON-NLS-1$
+ if (conn != null && conn.isConnected()) {
+ conn.disconnect();
}
}
@@ -982,22 +976,7 @@ public abstract class SOContainer implements ISharedObjectContainer {
protected abstract ID getIDForConnection(IAsynchConnection connection);
protected void processDisconnect(DisconnectEvent e) {
- debug("processDisconnect[" + Thread.currentThread().getName() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- // Get connection responsible for disconnect event
- IAsynchConnection conn = (IAsynchConnection) e.getConnection();
-
- ID fromID = null;
- synchronized (getGroupMembershipLock()) {
- fromID = getIDForConnection(conn);
- memberLeave(fromID, conn);
- }
- if (fromID != null)
- fireContainerEvent(new ContainerDisconnectedEvent(getID(),
- fromID));
- } catch (Exception except) {
- logException("Exception in processDisconnect ", except); //$NON-NLS-1$
- }
+ disconnect();
}
protected Serializable processSynch(SynchEvent e) throws IOException {

Back to the top