Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-01-09 01:17:01 +0000
committerslewis2005-01-09 01:17:01 +0000
commita2a29504e0ed7164de53b2c7e96d3319ba310dfe (patch)
tree3c835f082201c2026a9083884e04d79da8b81712
parent11353db9e45f5238395a3dd98e816f420fe0c04f (diff)
downloadorg.eclipse.ecf-a2a29504e0ed7164de53b2c7e96d3319ba310dfe.tar.gz
org.eclipse.ecf-a2a29504e0ed7164de53b2c7e96d3319ba310dfe.tar.xz
org.eclipse.ecf-a2a29504e0ed7164de53b2c7e96d3319ba310dfe.zip
small fixes for ClientSOContainer
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java
index cafc8ecad..d2be87dbd 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/ClientSOContainer.java
@@ -35,7 +35,7 @@ import org.eclipse.ecf.provider.generic.gmm.Member;
public abstract class ClientSOContainer extends SOContainer {
ISynchAsynchConnection connection;
- ID remoteServerID;
+ protected ID remoteServerID;
byte connectionState;
public static final byte UNCONNECTED = 0;
public static final byte CONNECTING = 1;
@@ -93,7 +93,7 @@ public abstract class ClientSOContainer extends SOContainer {
+ ":" + remote.getName());
throw c;
}
- ContainerMessage response;
+ Object response;
synchronized (connectLock) {
if (isConnected()) {
killConnection(aConnection);
@@ -115,8 +115,8 @@ public abstract class ClientSOContainer extends SOContainer {
synchronized (aConnection) {
try {
Object connectData = getConnectData(remote, data);
- response = (ContainerMessage) aConnection.connect(remote,
- connectData, 0);
+ response = aConnection.connect(remote,
+ connectData, getConnectTimeout());
} catch (IOException e) {
synchronized (connectLock) {
killConnection(aConnection);
@@ -141,7 +141,7 @@ public abstract class ClientSOContainer extends SOContainer {
}
ID serverID = null;
try {
- serverID = acceptNewServer(response);
+ serverID = acceptNewServer(remote, response);
} catch (Exception e) {
killConnection(aConnection);
aConnection = null;
@@ -158,10 +158,17 @@ public abstract class ClientSOContainer extends SOContainer {
}
}
} catch (Exception e) {
- throw new SharedObjectContainerJoinException("could not join", e);
+ SharedObjectContainerJoinException except = new SharedObjectContainerJoinException(e.getClass().getName()+" wrapped: "+e.getMessage());
+ except.setStackTrace(e.getStackTrace());
+ dumpStack("Exception in joinGroup",e);
+ throw except;
}
}
+ protected int getConnectTimeout() {
+ return 0;
+ }
+
protected void handleLeaveGroupMessage(ContainerMessage mess) {
ContainerMessage.LeaveGroupMessage lgm = (ContainerMessage.LeaveGroupMessage) mess.getData();
ID fromID = mess.getFromContainerID();
@@ -353,8 +360,8 @@ public abstract class ClientSOContainer extends SOContainer {
throw new ConnectException("not connected");
}
- protected ID acceptNewServer(ContainerMessage serverData) throws Exception {
- ContainerMessage aPacket = serverData;
+ protected ID acceptNewServer(ID orginalTarget, Object serverData) throws Exception {
+ ContainerMessage aPacket = (ContainerMessage) serverData;
ID fromID = aPacket.getFromContainerID();
if (fromID == null)
throw new InvalidObjectException("server id is null");

Back to the top