Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-10-14 16:10:49 -0400
committerEike Stepper2008-10-14 16:10:49 -0400
commit2020cb50ff8b249ae99ceec765e4d109f79aec5e (patch)
tree48e6d24f2919d20b6ce3d44088967ac16e4e686a
parentfe6483460a8a77da448798175952418c22469dd1 (diff)
downloadcdo-2020cb50ff8b249ae99ceec765e4d109f79aec5e.tar.gz
cdo-2020cb50ff8b249ae99ceec765e4d109f79aec5e.tar.xz
cdo-2020cb50ff8b249ae99ceec765e4d109f79aec5e.zip
[250845] Decouple CDOClientRequests from IChannel
https://bugs.eclipse.org/bugs/show_bug.cgi?id=250845
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InitialTest.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditorInput.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/.settings/.api_filters27
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/analyzer/CDOFeatureAnalyzer.java12
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAuditImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java23
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java85
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionPackageManagerImpl.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSingleTransactionStrategy.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java13
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOXATransactionImpl.java42
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOAbstractFeatureRuleAnalyzer.java12
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerModelBased.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerUI.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/NOOPFeatureAnalyzer.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourcePathRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java13
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryResultIteratorImpl.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java5
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java7
-rw-r--r--plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClientProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java5
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java5
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java5
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java11
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/connector/IConnector.java1
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java15
56 files changed, 246 insertions, 274 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InitialTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InitialTest.java
index 2af38311b3..e354e4797c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InitialTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/InitialTest.java
@@ -24,11 +24,9 @@ import org.eclipse.emf.cdo.tests.model1.Supplier;
import org.eclipse.emf.cdo.util.CDOURIUtil;
import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
-import org.eclipse.net4j.buffer.IBufferHandler;
-import org.eclipse.net4j.channel.IChannel;
-
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
@@ -127,14 +125,9 @@ public class InitialTest extends AbstractCDOTest
public void testOpenSession() throws Exception
{
msg("Opening session");
- CDOSession session = openModel1Session();
+ CDOSessionImpl session = (CDOSessionImpl)openModel1Session();
assertNotNull(session);
-
- IChannel channel = session.getChannel();
- assertNotNull(channel);
-
- IBufferHandler receiveHandler = channel.getReceiveHandler();
- assertNotNull(receiveHandler);
+ assertEquals(true, session.isOpen());
}
public void testStartTransaction() throws Exception
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditorInput.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditorInput.java
index 632049f72c..53b5eaedc0 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditorInput.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditorInput.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.internal.ui.SharedIcons;
-import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.util.ObjectUtil;
import org.eclipse.core.runtime.Path;
@@ -89,12 +88,9 @@ public class CDOEditorInput extends PlatformObject implements IEditorInput
public String getToolTipText()
{
CDOSession session = view.getSession();
- IConnector connector = session.getConnector();
String repositoryName = session.getRepositoryName();
StringBuilder builder = new StringBuilder();
- builder.append(connector.getURL());
- builder.append("/");
builder.append(repositoryName);
if (resourcePath != null)
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
index ae1207924c..2668ba13c3 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
@@ -42,7 +42,6 @@ import org.eclipse.emf.cdo.ui.viewhistory.CDOViewHistoryEvent;
import org.eclipse.emf.cdo.util.CDOPackageType;
import org.eclipse.emf.cdo.util.CDOPackageTypeRegistry;
-import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.util.container.IContainer;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
@@ -241,9 +240,7 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
public static String getSessionLabel(CDOSession session)
{
- IConnector connector = session.getConnector();
- String repositoryName = session.getRepositoryName();
- return "Session " + connector.getURL() + "/" + repositoryName + " [" + session.getSessionID() + "]";
+ return "Session " + session.getRepositoryName() + " [" + session.getSessionID() + "]";
}
public static String getViewLabel(CDOView view)
diff --git a/plugins/org.eclipse.emf.cdo/.settings/.api_filters b/plugins/org.eclipse.emf.cdo/.settings/.api_filters
index 3ea32e62e8..771260946d 100644
--- a/plugins/org.eclipse.emf.cdo/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo/.settings/.api_filters
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.emf.cdo" version="2">
- <resource path="src/org/eclipse/emf/internal/cdo/CDOXATransactionImpl.java" type="org.eclipse.emf.internal.cdo.CDOXATransactionImpl$CDOXAState">
- <filter id="643846161">
+ <resource path="src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java" type="org.eclipse.emf.internal.cdo.CDOSessionImpl">
+ <filter id="643842064">
<message_arguments>
- <message_argument value="CommitTransactionResult"/>
- <message_argument value="CDOXAState"/>
- <message_argument value="check_result(CommitTransactionResult)"/>
+ <message_argument value="CDOClientProtocol"/>
+ <message_argument value="CDOSessionImpl"/>
+ <message_argument value="getProtocol()"/>
</message_arguments>
</filter>
</resource>
@@ -18,6 +18,15 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/eclipse/emf/internal/cdo/CDOXATransactionImpl.java" type="org.eclipse.emf.internal.cdo.CDOXATransactionImpl$CDOXAState">
+ <filter id="643846161">
+ <message_arguments>
+ <message_argument value="CommitTransactionResult"/>
+ <message_argument value="CDOXAState"/>
+ <message_argument value="check_result(CommitTransactionResult)"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/emf/internal/cdo/InternalCDOObject.java" type="org.eclipse.emf.internal.cdo.InternalCDOObject">
<filter id="1211105284">
<message_arguments>
@@ -38,18 +47,18 @@
<message_argument value="setResult(CommitTransactionResult)"/>
</message_arguments>
</filter>
- <filter id="643842064">
+ <filter id="643846161">
<message_arguments>
<message_argument value="CommitTransactionResult"/>
<message_argument value="CDOXATransactionCommitContext"/>
- <message_argument value="getResult()"/>
+ <message_argument value="postCommit(CommitTransactionResult)"/>
</message_arguments>
</filter>
- <filter id="643846161">
+ <filter id="643842064">
<message_arguments>
<message_argument value="CommitTransactionResult"/>
<message_argument value="CDOXATransactionCommitContext"/>
- <message_argument value="postCommit(CommitTransactionResult)"/>
+ <message_argument value="getResult()"/>
</message_arguments>
</filter>
</resource>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java
index aa9b5fba6e..48e30cdfe4 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSession.java
@@ -14,8 +14,6 @@ package org.eclipse.emf.cdo;
import org.eclipse.emf.cdo.common.CDOProtocolSession;
import org.eclipse.emf.cdo.util.CDOPackageRegistry;
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.container.IContainer;
@@ -31,10 +29,6 @@ public interface CDOSession extends CDOProtocolSession, IContainer<CDOView>
{
public IFailOverStrategy getFailOverStrategy();
- public IChannel getChannel();
-
- public IConnector getConnector();
-
public boolean isOpen();
public String getRepositoryName();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/analyzer/CDOFeatureAnalyzer.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/analyzer/CDOFeatureAnalyzer.java
index 1fbcc8b8b2..0373a7a3e5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/analyzer/CDOFeatureAnalyzer.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/analyzer/CDOFeatureAnalyzer.java
@@ -11,9 +11,9 @@
**************************************************************************/
package org.eclipse.emf.cdo.analyzer;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.model.CDOFeature;
-import org.eclipse.emf.internal.cdo.InternalCDOObject;
import org.eclipse.emf.internal.cdo.analyzer.NOOPFeatureAnalyzer;
/**
@@ -23,7 +23,13 @@ public interface CDOFeatureAnalyzer
{
public static final CDOFeatureAnalyzer NOOP = new NOOPFeatureAnalyzer();
- public void preTraverseFeature(InternalCDOObject revision, CDOFeature feature, int index);
+ /**
+ * @since 2.0
+ */
+ public void preTraverseFeature(CDOObject revision, CDOFeature feature, int index);
- public void postTraverseFeature(InternalCDOObject revision, CDOFeature feature, int index, Object value);
+ /**
+ * @since 2.0
+ */
+ public void postTraverseFeature(CDOObject revision, CDOFeature feature, int index, Object value);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAuditImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAuditImpl.java
index 0e5dc11b2f..0dccac75f7 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAuditImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOAuditImpl.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.cdo.spi.common.InternalCDORevision;
import org.eclipse.emf.internal.cdo.protocol.SetAuditRequest;
-import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.WrappedException;
import java.text.MessageFormat;
@@ -82,9 +81,8 @@ public class CDOAuditImpl extends CDOViewImpl implements CDOAudit
try
{
CDOSessionImpl session = getSession();
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
- SetAuditRequest request = new SetAuditRequest(session.getChannel(), getViewID(), timeStamp, invalidObjects);
- return failOverStrategy.send(request);
+ SetAuditRequest request = new SetAuditRequest(session.getProtocol(), getViewID(), timeStamp, invalidObjects);
+ return session.getFailOverStrategy().send(request);
}
catch (Exception ex)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java
index 158c5410cb..4e026fe621 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDORevisionManagerImpl.java
@@ -22,12 +22,12 @@ import org.eclipse.emf.cdo.internal.common.revision.CDORevisionResolverImpl;
import org.eclipse.emf.cdo.spi.common.InternalCDORevision;
import org.eclipse.emf.internal.cdo.bundle.OM;
+import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocol;
import org.eclipse.emf.internal.cdo.protocol.LoadChunkRequest;
import org.eclipse.emf.internal.cdo.protocol.LoadRevisionByTimeRequest;
import org.eclipse.emf.internal.cdo.protocol.LoadRevisionByVersionRequest;
import org.eclipse.emf.internal.cdo.protocol.LoadRevisionRequest;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.om.trace.PerfTracer;
@@ -77,8 +77,8 @@ public class CDORevisionManagerImpl extends CDORevisionResolverImpl implements C
{
try
{
- IChannel channel = session.getChannel();
- LoadChunkRequest request = new LoadChunkRequest(channel, (InternalCDORevision)revision, feature, accessIndex,
+ CDOClientProtocol protocol = session.getProtocol();
+ LoadChunkRequest request = new LoadChunkRequest(protocol, (InternalCDORevision)revision, feature, accessIndex,
fetchIndex, fromIndex, toIndex);
IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
@@ -97,33 +97,36 @@ public class CDORevisionManagerImpl extends CDORevisionResolverImpl implements C
@Override
protected InternalCDORevision loadRevision(CDOID id, int referenceChunk)
{
- return send(new LoadRevisionRequest(session.getChannel(), Collections.singleton(id), referenceChunk)).get(0);
+ CDOClientProtocol protocol = session.getProtocol();
+ return send(new LoadRevisionRequest(protocol, Collections.singleton(id), referenceChunk)).get(0);
}
@Override
protected InternalCDORevision loadRevisionByTime(CDOID id, int referenceChunk, long timeStamp)
{
- return send(
- new LoadRevisionByTimeRequest(session.getChannel(), Collections.singleton(id), referenceChunk, timeStamp)).get(
- 0);
+ CDOClientProtocol protocol = session.getProtocol();
+ return send(new LoadRevisionByTimeRequest(protocol, Collections.singleton(id), referenceChunk, timeStamp)).get(0);
}
@Override
protected InternalCDORevision loadRevisionByVersion(CDOID id, int referenceChunk, int version)
{
- return send(new LoadRevisionByVersionRequest(session.getChannel(), id, referenceChunk, version)).get(0);
+ CDOClientProtocol protocol = session.getProtocol();
+ return send(new LoadRevisionByVersionRequest(protocol, id, referenceChunk, version)).get(0);
}
@Override
protected List<InternalCDORevision> loadRevisions(Collection<CDOID> ids, int referenceChunk)
{
- return send(new LoadRevisionRequest(session.getChannel(), ids, referenceChunk));
+ CDOClientProtocol protocol = session.getProtocol();
+ return send(new LoadRevisionRequest(protocol, ids, referenceChunk));
}
@Override
protected List<InternalCDORevision> loadRevisionsByTime(Collection<CDOID> ids, int referenceChunk, long timeStamp)
{
- return send(new LoadRevisionByTimeRequest(session.getChannel(), ids, referenceChunk, timeStamp));
+ CDOClientProtocol protocol = session.getProtocol();
+ return send(new LoadRevisionByTimeRequest(protocol, ids, referenceChunk, timeStamp));
}
/**
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index ded780bd93..30f059c188 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -41,12 +41,13 @@ import org.eclipse.emf.cdo.util.CDOPackageRegistry;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.internal.cdo.bundle.OM;
+import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocol;
import org.eclipse.emf.internal.cdo.protocol.LoadLibrariesRequest;
import org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest;
import org.eclipse.emf.internal.cdo.protocol.OpenSessionResult;
-import org.eclipse.emf.internal.cdo.protocol.SetPassiveUpdateRequest;
import org.eclipse.emf.internal.cdo.protocol.RepositoryTimeRequest;
import org.eclipse.emf.internal.cdo.protocol.RepositoryTimeResult;
+import org.eclipse.emf.internal.cdo.protocol.SetPassiveUpdateRequest;
import org.eclipse.emf.internal.cdo.protocol.SyncRevisionRequest;
import org.eclipse.emf.internal.cdo.protocol.ViewsChangedRequest;
import org.eclipse.emf.internal.cdo.util.CDOPackageRegistryImpl;
@@ -124,7 +125,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
private IConnector connector;
- private IChannel channel;
+ private CDOClientProtocol protocol;
@ExcludeFromDump
private IListener channelListener = new LifecycleEventAdapter()
@@ -176,6 +177,9 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
public CDOSessionImpl()
{
+ protocol = new CDOClientProtocol();
+ protocol.setInfraStructure(this);
+
packageManager = createPackageManager();
revisionManager = createRevisionManager();
@@ -194,7 +198,8 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
*/
public String getUserID()
{
- return connector == null ? null : connector.getUserID();
+ IChannel channel = protocol.getChannel();
+ return channel == null ? null : channel.getUserID();
}
public CDOIDObject createCDOIDObject(ExtendedDataInput in)
@@ -265,9 +270,12 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
this.connector = connector;
}
- public IChannel getChannel()
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
+ public CDOClientProtocol getProtocol()
{
- return channel;
+ return protocol;
}
public String getRepositoryName()
@@ -320,7 +328,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
{
try
{
- RepositoryTimeRequest request = new RepositoryTimeRequest(channel);
+ RepositoryTimeRequest request = new RepositoryTimeRequest(protocol);
return getFailOverStrategy().send(request);
}
catch (Exception ex)
@@ -331,6 +339,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
public boolean isOpen()
{
+ IChannel channel = protocol.getChannel();
return channel != null;
}
@@ -436,15 +445,18 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
}
}
- try
- {
- getFailOverStrategy().send(
- new ViewsChangedRequest(channel, view.getViewID(), CDOProtocolConstants.VIEW_CLOSED,
- CDOProtocolView.UNSPECIFIED_DATE));
- }
- catch (Exception ex)
+ if (isActive())
{
- throw WrappedException.wrap(ex);
+ try
+ {
+ ViewsChangedRequest request = new ViewsChangedRequest(protocol, view.getViewID(),
+ CDOProtocolConstants.VIEW_CLOSED, CDOProtocolView.UNSPECIFIED_DATE);
+ getFailOverStrategy().send(request);
+ }
+ catch (Exception ex)
+ {
+ throw WrappedException.wrap(ex);
+ }
}
fireElementRemovedEvent(view);
@@ -462,7 +474,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
timeStamp = ((CDOAudit)view).getTimeStamp();
}
- ViewsChangedRequest request = new ViewsChangedRequest(channel, id, kind, timeStamp);
+ ViewsChangedRequest request = new ViewsChangedRequest(protocol, id, kind, timeStamp);
getFailOverStrategy().send(request);
}
catch (Exception ex)
@@ -787,7 +799,8 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
@Override
public String toString()
{
- return MessageFormat.format("CDOSession[{0}/{1}]", connector, repositoryName);
+ IChannel channel = protocol.getChannel();
+ return MessageFormat.format("CDOSession[{0}/{1}]", channel, repositoryName);
}
/**
@@ -824,31 +837,28 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
// Link ViewSet with View
view.setViewSet(viewSet);
((CDOViewSetImpl)viewSet).add(view);
+
sendViewsChangedRequest(view);
fireElementAddedEvent(view);
}
protected void handleFailOver(IChannel oldChannel, IChannel newChannel, IConnector newConnector)
{
- EventUtil.removeListener(oldChannel, channelListener);
- EventUtil.addListener(newChannel, channelListener);
- channel = newChannel;
- connector = newConnector;
+ // TODO: implement CDOSessionImpl.handleFailOver(oldChannel, newChannel, newConnector)
+ throw new UnsupportedOperationException();
+
+ // EventUtil.removeListener(oldChannel, channelListener);
+ // EventUtil.addListener(newChannel, channelListener);
+ // channel = newChannel;
+ // connector = newConnector;
}
@Override
protected void doBeforeActivate() throws Exception
{
super.doBeforeActivate();
- if (channel == null && connector == null)
- {
- throw new IllegalStateException("channel == null && connector == null");
- }
-
- if (repositoryName == null)
- {
- throw new IllegalStateException("repositoryName == null");
- }
+ checkState(connector, "connector == null");
+ checkState(repositoryName, "repositoryName == null");
}
@Override
@@ -861,13 +871,9 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
}
packageRegistry.setSession(this);
+ IChannel channel = protocol.open(connector);
- if (channel == null)
- {
- channel = connector.openChannel(CDOProtocolConstants.PROTOCOL_NAME, this);
- }
-
- OpenSessionRequest request = new OpenSessionRequest(channel, repositoryName, passiveUpdateEnabled);
+ OpenSessionRequest request = new OpenSessionRequest(protocol, repositoryName, passiveUpdateEnabled);
OpenSessionResult result = getFailOverStrategy().send(request);
sessionID = result.getSessionID();
@@ -885,6 +891,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
@Override
protected void doDeactivate() throws Exception
{
+ IChannel channel = protocol.getChannel();
EventUtil.removeListener(channel, channelListener);
if (invalidationRunner != null)
{
@@ -938,7 +945,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
missingLibraries.removeAll(existingLibraries);
if (!missingLibraries.isEmpty())
{
- LoadLibrariesRequest request = new LoadLibrariesRequest(channel, missingLibraries, cacheFolder);
+ LoadLibrariesRequest request = new LoadLibrariesRequest(protocol, missingLibraries, cacheFolder);
getFailOverStrategy().send(request);
}
}
@@ -1033,7 +1040,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
{
if (!allRevisions.isEmpty())
{
- SetPassiveUpdateRequest request = new SetPassiveUpdateRequest(getChannel(), this, allRevisions,
+ SetPassiveUpdateRequest request = new SetPassiveUpdateRequest(protocol, this, allRevisions,
collectionLoadingPolicy.getInitialChunkSize(), passiveUpdateEnabled);
getFailOverStrategy().send(request);
}
@@ -1061,8 +1068,8 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
{
if (!allRevisions.isEmpty())
{
- SyncRevisionRequest request = new SyncRevisionRequest(getChannel(), this, allRevisions,
- collectionLoadingPolicy.getInitialChunkSize());
+ SyncRevisionRequest request = new SyncRevisionRequest(protocol, this, allRevisions, collectionLoadingPolicy
+ .getInitialChunkSize());
return getFailOverStrategy().send(request);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionPackageManagerImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionPackageManagerImpl.java
index a6faa06fdc..0c274a5f1e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionPackageManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionPackageManagerImpl.java
@@ -24,6 +24,7 @@ import org.eclipse.emf.cdo.internal.common.model.CDOPackageManagerImpl;
import org.eclipse.emf.cdo.util.CDOEMFUtil;
import org.eclipse.emf.internal.cdo.bundle.OM;
+import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocol;
import org.eclipse.emf.internal.cdo.protocol.LoadPackageRequest;
import org.eclipse.emf.internal.cdo.util.ModelUtil;
@@ -152,8 +153,10 @@ public class CDOSessionPackageManagerImpl extends CDOPackageManagerImpl implemen
try
{
+ CDOClientProtocol protocol = session.getProtocol();
+ LoadPackageRequest request = new LoadPackageRequest(protocol, cdoPackage);
+
IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
- LoadPackageRequest request = new LoadPackageRequest(session.getChannel(), cdoPackage);
failOverStrategy.send(request);
if (!cdoPackage.isDynamic())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSingleTransactionStrategy.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSingleTransactionStrategy.java
index d1c9ce4ef9..d6cd19ec3e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSingleTransactionStrategy.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSingleTransactionStrategy.java
@@ -11,13 +11,11 @@
package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOSavepoint;
-import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionRequest;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionResult;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.transaction.TransactionException;
@@ -46,15 +44,14 @@ public class CDOSingleTransactionStrategy implements CDOTransactionStrategy
commitContext.preCommit();
- CDOSession session = transaction.getSession();
- IChannel channel = session.getChannel();
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
- CommitTransactionRequest request = new CommitTransactionRequest(channel, commitContext);
+ CDOSessionImpl session = (CDOSessionImpl)transaction.getSession();
+ CommitTransactionRequest request = new CommitTransactionRequest(session.getProtocol(), commitContext);
if (TRACER.isEnabled())
{
TRACER.format("Sending commit request");
}
+ IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
CommitTransactionResult result = failOverStrategy.send(request, transaction.getCommitTimeout());
String rollbackMessage = result.getRollbackMessage();
if (rollbackMessage != null)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index 48f16f4cda..f228f4ca1f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -11,7 +11,6 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo;
-import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOState;
import org.eclipse.emf.cdo.CDOTransaction;
import org.eclipse.emf.cdo.CDOView;
@@ -28,12 +27,12 @@ import org.eclipse.emf.cdo.spi.common.InternalCDORevision;
import org.eclipse.emf.cdo.util.InvalidObjectException;
import org.eclipse.emf.internal.cdo.bundle.OM;
+import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocol;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionResult;
import org.eclipse.emf.internal.cdo.protocol.VerifyRevisionRequest;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.emf.internal.cdo.util.RevisionAdjuster;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.collection.Pair;
import org.eclipse.net4j.util.fsm.FiniteStateMachine;
@@ -311,10 +310,11 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
{
try
{
- CDOSession session = view.getSession();
- IChannel channel = session.getChannel();
+ CDOSessionImpl session = (CDOSessionImpl)view.getSession();
+ CDOClientProtocol protocol = session.getProtocol();
+ VerifyRevisionRequest request = new VerifyRevisionRequest(protocol, revisions);
+
IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
- VerifyRevisionRequest request = new VerifyRevisionRequest(channel, revisions);
revisions = failOverStrategy.send(request);
}
catch (Exception ex)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index 2f6e6ba81c..240b940afc 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -48,7 +48,6 @@ import org.eclipse.emf.internal.cdo.query.CDOQueryImpl;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.emf.internal.cdo.util.ModelUtil;
-import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.ImplementationError;
import org.eclipse.net4j.util.ReflectUtil.ExcludeFromDump;
import org.eclipse.net4j.util.collection.CloseableIterator;
@@ -301,9 +300,8 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
return resource.cdoID();
}
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
- ResourceIDRequest request = new ResourceIDRequest(session.getChannel(), viewID, path);
- return failOverStrategy.send(request);
+ ResourceIDRequest request = new ResourceIDRequest(session.getProtocol(), viewID, path);
+ return session.getFailOverStrategy().send(request);
}
catch (Exception ex)
{
@@ -379,9 +377,8 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
try
{
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
- ResourcePathRequest request = new ResourcePathRequest(session.getChannel(), viewID, resourceID);
- String path = failOverStrategy.send(request);
+ ResourcePathRequest request = new ResourcePathRequest(session.getProtocol(), viewID, resourceID);
+ String path = session.getFailOverStrategy().send(request);
return addResource(resourceID, path);
}
catch (RuntimeException ex)
@@ -1097,7 +1094,7 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
{
try
{
- ChangeSubscriptionRequest request = new ChangeSubscriptionRequest(getSession().getChannel(), getViewID(),
+ ChangeSubscriptionRequest request = new ChangeSubscriptionRequest(getSession().getProtocol(), getViewID(),
cdoIDs, subscribeMode, clear);
session.getFailOverStrategy().send(request);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOXATransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOXATransactionImpl.java
index 69ee06a07d..410bd965ee 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOXATransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOXATransactionImpl.java
@@ -11,7 +11,6 @@
package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOSavepoint;
-import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOTransaction;
import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.CDOViewSet;
@@ -19,13 +18,13 @@ import org.eclipse.emf.cdo.CDOXATransaction;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.internal.cdo.protocol.CDOClientProtocol;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionCancelRequest;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionPhase1Request;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionPhase2Request;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionPhase3Request;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionResult;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.transaction.TransactionException;
@@ -428,15 +427,17 @@ public class CDOXATransactionImpl implements CDOXATransaction
xaTransaction.preCommit();
InternalCDOTransaction transaction = xaTransaction.getTransaction();
- CDOSession session = xaTransaction.getTransaction().getSession();
- IChannel channel = session.getChannel();
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
+ CDOSessionImpl session = (CDOSessionImpl)xaTransaction.getTransaction().getSession();
// Phase 1
{
- CommitTransactionPhase1Request requestPhase1 = new CommitTransactionPhase1Request(channel, xaTransaction);
+ CDOClientProtocol protocol = session.getProtocol();
+ CommitTransactionPhase1Request requestPhase1 = new CommitTransactionPhase1Request(protocol, xaTransaction);
+
+ IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
CommitTransactionResult result = failOverStrategy.send(requestPhase1, transaction.getCommitTimeout());
check_result(result);
+
xaTransaction.setResult(result);
xaTransaction.setState(CDOXAPhase2State.INSTANCE);
}
@@ -458,15 +459,17 @@ public class CDOXATransactionImpl implements CDOXATransaction
protected void handle(CDOXATransactionCommitContext xaTransaction) throws Exception
{
InternalCDOTransaction transaction = xaTransaction.getTransaction();
- CDOSession session = xaTransaction.getTransaction().getSession();
- IChannel channel = session.getChannel();
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
+ CDOSessionImpl session = (CDOSessionImpl)xaTransaction.getTransaction().getSession();
// Phase 2
{
- CommitTransactionPhase2Request requestPhase2 = new CommitTransactionPhase2Request(channel, xaTransaction);
+ CDOClientProtocol protocol = session.getProtocol();
+ CommitTransactionPhase2Request requestPhase2 = new CommitTransactionPhase2Request(protocol, xaTransaction);
+
+ IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
CommitTransactionResult result = failOverStrategy.send(requestPhase2, transaction.getCommitTimeout());
check_result(result);
+
xaTransaction.setState(CDOXAPhase3State.INSTANCE);
}
}
@@ -487,15 +490,17 @@ public class CDOXATransactionImpl implements CDOXATransaction
protected void handle(CDOXATransactionCommitContext xaTransaction) throws Exception
{
InternalCDOTransaction transaction = xaTransaction.getTransaction();
- CDOSession session = xaTransaction.getTransaction().getSession();
- IChannel channel = session.getChannel();
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
+ CDOSessionImpl session = (CDOSessionImpl)xaTransaction.getTransaction().getSession();
// Phase 2
{
- CommitTransactionPhase3Request requestPhase3 = new CommitTransactionPhase3Request(channel, xaTransaction);
+ CDOClientProtocol protocol = session.getProtocol();
+ CommitTransactionPhase3Request requestPhase3 = new CommitTransactionPhase3Request(protocol, xaTransaction);
+
+ IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
CommitTransactionResult result = failOverStrategy.send(requestPhase3, transaction.getCommitTimeout());
check_result(result);
+
xaTransaction.postCommit(xaTransaction.getResult());
xaTransaction.setState(null);
}
@@ -517,13 +522,14 @@ public class CDOXATransactionImpl implements CDOXATransaction
protected void handle(CDOXATransactionCommitContext xaTransaction) throws Exception
{
InternalCDOTransaction transaction = xaTransaction.getTransaction();
- CDOSession session = xaTransaction.getTransaction().getSession();
- IChannel channel = session.getChannel();
- IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
+ CDOSessionImpl session = (CDOSessionImpl)xaTransaction.getTransaction().getSession();
// Phase 2
{
- CommitTransactionCancelRequest requestCancel = new CommitTransactionCancelRequest(channel, xaTransaction);
+ CDOClientProtocol protocol = session.getProtocol();
+ CommitTransactionCancelRequest requestCancel = new CommitTransactionCancelRequest(protocol, xaTransaction);
+
+ IFailOverStrategy failOverStrategy = session.getFailOverStrategy();
CommitTransactionResult result = failOverStrategy.send(requestCancel, transaction.getCommitTimeout());
check_result(result);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOAbstractFeatureRuleAnalyzer.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOAbstractFeatureRuleAnalyzer.java
index 3d4f68f1b4..1168fd1bfd 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOAbstractFeatureRuleAnalyzer.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOAbstractFeatureRuleAnalyzer.java
@@ -12,11 +12,11 @@
package org.eclipse.emf.internal.cdo.analyzer;
import org.eclipse.emf.cdo.CDOCollectionLoadingPolicy;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.analyzer.CDOFeatureAnalyzer;
import org.eclipse.emf.cdo.analyzer.CDOFetchRuleManager;
import org.eclipse.emf.cdo.common.model.CDOFeature;
-import org.eclipse.emf.internal.cdo.InternalCDOObject;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.net4j.util.om.trace.ContextTracer;
@@ -36,7 +36,7 @@ public abstract class CDOAbstractFeatureRuleAnalyzer implements CDOFeatureAnalyz
protected long lastElapseTimeBetweenOperations;
- protected InternalCDOObject lastTraverseCDOObject;
+ protected CDOObject lastTraverseCDOObject;
protected long lastLatencyTime;
@@ -60,7 +60,7 @@ public abstract class CDOAbstractFeatureRuleAnalyzer implements CDOFeatureAnalyz
return loadCollectionPolicy;
}
- public void preTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index)
+ public void preTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index)
{
if (TRACER.isEnabled())
{
@@ -79,7 +79,7 @@ public abstract class CDOAbstractFeatureRuleAnalyzer implements CDOFeatureAnalyz
doPreTraverseFeature(cdoObject, feature, index);
}
- public void postTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index, Object value)
+ public void postTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index, Object value)
{
if (TRACER.isEnabled())
{
@@ -97,11 +97,11 @@ public abstract class CDOAbstractFeatureRuleAnalyzer implements CDOFeatureAnalyz
}
}
- protected void doPreTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index)
+ protected void doPreTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index)
{
}
- protected void doPostTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index, Object value)
+ protected void doPostTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index, Object value)
{
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerModelBased.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerModelBased.java
index bc7a2e7e47..dc6934ace4 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerModelBased.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerModelBased.java
@@ -11,12 +11,11 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.analyzer;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.analyzer.CDOFetchRule;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.model.CDOFeature;
-import org.eclipse.emf.internal.cdo.InternalCDOObject;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -33,12 +32,12 @@ public class CDOFeatureAnalyzerModelBased extends CDOAbstractFeatureRuleAnalyzer
}
@Override
- public void doPreTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index)
+ public void doPreTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index)
{
}
@Override
- public void doPostTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index, Object value)
+ public void doPostTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index, Object value)
{
if (didFetch())
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerUI.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerUI.java
index 60c748b74a..68f69d75bb 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerUI.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/CDOFeatureAnalyzerUI.java
@@ -11,13 +11,12 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.analyzer;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.analyzer.CDOFetchRule;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.model.CDOClass;
import org.eclipse.emf.cdo.common.model.CDOFeature;
-import org.eclipse.emf.internal.cdo.InternalCDOObject;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -101,7 +100,7 @@ public class CDOFeatureAnalyzerUI extends CDOAbstractFeatureRuleAnalyzer
}
@Override
- protected void doPreTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index)
+ protected void doPreTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index)
{
// Don`t handle containment relationship
if (!feature.isReference())
@@ -117,7 +116,7 @@ public class CDOFeatureAnalyzerUI extends CDOAbstractFeatureRuleAnalyzer
}
@Override
- protected void doPostTraverseFeature(InternalCDOObject cdoObject, CDOFeature feature, int index, Object object)
+ protected void doPostTraverseFeature(CDOObject cdoObject, CDOFeature feature, int index, Object object)
{
if (didFetch())
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/NOOPFeatureAnalyzer.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/NOOPFeatureAnalyzer.java
index 9cc4dc9829..dcf9eaa671 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/NOOPFeatureAnalyzer.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/analyzer/NOOPFeatureAnalyzer.java
@@ -11,11 +11,10 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.analyzer;
+import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.analyzer.CDOFeatureAnalyzer;
import org.eclipse.emf.cdo.common.model.CDOFeature;
-import org.eclipse.emf.internal.cdo.InternalCDOObject;
-
/**
* @author Simon McDuff
*/
@@ -25,11 +24,11 @@ public class NOOPFeatureAnalyzer implements CDOFeatureAnalyzer
{
}
- public void preTraverseFeature(InternalCDOObject cdoClass, CDOFeature feature, int index)
+ public void preTraverseFeature(CDOObject cdoClass, CDOFeature feature, int index)
{
}
- public void postTraverseFeature(InternalCDOObject cdoClass, CDOFeature feature, int index, Object value)
+ public void postTraverseFeature(CDOObject cdoClass, CDOFeature feature, int index, Object value)
{
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
index 8195f50232..e785cb67c4 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocol.java
@@ -38,9 +38,10 @@ public class CDOClientProtocol extends CDOProtocolImpl
{
case CDOProtocolConstants.SIGNAL_COMMIT_NOTIFICATION:
return new CommitNotificationIndication();
- }
- return null;
+ default:
+ return null;
+ }
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java
index 22366ac567..46ad228644 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientRequest.java
@@ -27,9 +27,7 @@ import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl;
import org.eclipse.emf.internal.cdo.revision.CDOListReferenceProxyImpl;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.RequestWithConfirmation;
-import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
@@ -40,9 +38,9 @@ import java.io.IOException;
*/
public abstract class CDOClientRequest<RESULT> extends RequestWithConfirmation<RESULT>
{
- public CDOClientRequest(IChannel channel)
+ public CDOClientRequest(CDOClientProtocol protocol)
{
- super((SignalProtocol)channel.getReceiveHandler());
+ super(protocol);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java
index f7eaf60f2b..edab3384e0 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOTimeRequest.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.common.CDODataOutput;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -29,9 +28,9 @@ public abstract class CDOTimeRequest<RESULT> extends CDOClientRequest<RESULT>
private RepositoryTimeResult repositoryTimeResult = new RepositoryTimeResult();
- public CDOTimeRequest(IChannel channel)
+ public CDOTimeRequest(CDOClientProtocol protocol)
{
- super(channel);
+ super(protocol);
}
public RepositoryTimeResult getRepositoryTimeResult()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java
index aad51d0e03..c9f9186f34 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ChangeSubscriptionRequest.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -45,10 +44,10 @@ public class ChangeSubscriptionRequest extends CDOClientRequest<Boolean>
private boolean clear;
- public ChangeSubscriptionRequest(IChannel channel, int viewID, List<CDOID> cdoIDs, boolean subscribeMode,
+ public ChangeSubscriptionRequest(CDOClientProtocol protocol, int viewID, List<CDOID> cdoIDs, boolean subscribeMode,
boolean clear)
{
- super(channel);
+ super(protocol);
this.viewID = viewID;
this.cdoIDs = cdoIDs;
this.subscribeMode = subscribeMode;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java
index 45c146e670..6eced26c15 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionCancelRequest.java
@@ -17,8 +17,6 @@ import org.eclipse.emf.cdo.common.CDOProtocolConstants;
import org.eclipse.emf.internal.cdo.CDOXATransactionCommitContext;
-import org.eclipse.net4j.channel.IChannel;
-
import java.io.IOException;
/**
@@ -32,9 +30,9 @@ import java.io.IOException;
*/
public class CommitTransactionCancelRequest extends CommitTransactionRequest
{
- public CommitTransactionCancelRequest(IChannel channel, CDOXATransactionCommitContext xaTransaction)
+ public CommitTransactionCancelRequest(CDOClientProtocol protocol, CDOXATransactionCommitContext xaTransaction)
{
- super(channel, xaTransaction);
+ super(protocol, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java
index d702e49e9b..d884db432f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase1Request.java
@@ -17,8 +17,6 @@ import org.eclipse.emf.cdo.common.id.CDOIDProvider;
import org.eclipse.emf.internal.cdo.CDOXATransactionCommitContext;
-import org.eclipse.net4j.channel.IChannel;
-
import java.io.IOException;
/**
@@ -31,9 +29,9 @@ import java.io.IOException;
*/
public class CommitTransactionPhase1Request extends CommitTransactionRequest
{
- public CommitTransactionPhase1Request(IChannel channel, final CDOXATransactionCommitContext xaTransaction)
+ public CommitTransactionPhase1Request(CDOClientProtocol protocol, final CDOXATransactionCommitContext xaTransaction)
{
- super(channel, xaTransaction);
+ super(protocol, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java
index aa05c9db57..9a1e2068fd 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase2Request.java
@@ -22,7 +22,6 @@ import org.eclipse.emf.internal.cdo.CDOXATransactionCommitContext;
import org.eclipse.emf.internal.cdo.InternalCDOTransaction;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.common.util.URI;
@@ -44,9 +43,9 @@ public class CommitTransactionPhase2Request extends CommitTransactionRequest
private static final ContextTracer PROTOCOL = new ContextTracer(OM.DEBUG_PROTOCOL,
CommitTransactionPhase1Request.class);
- public CommitTransactionPhase2Request(IChannel channel, final CDOXATransactionCommitContext xaTransaction)
+ public CommitTransactionPhase2Request(CDOClientProtocol protocol, final CDOXATransactionCommitContext xaTransaction)
{
- super(channel, xaTransaction);
+ super(protocol, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java
index 3e1e7dfec6..a17d687b88 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionPhase3Request.java
@@ -17,8 +17,6 @@ import org.eclipse.emf.cdo.common.CDOProtocolConstants;
import org.eclipse.emf.internal.cdo.CDOXATransactionCommitContext;
-import org.eclipse.net4j.channel.IChannel;
-
import java.io.IOException;
/**
@@ -32,9 +30,9 @@ import java.io.IOException;
*/
public class CommitTransactionPhase3Request extends CommitTransactionRequest
{
- public CommitTransactionPhase3Request(IChannel channel, final CDOXATransactionCommitContext xaTransaction)
+ public CommitTransactionPhase3Request(CDOClientProtocol protocol, final CDOXATransactionCommitContext xaTransaction)
{
- super(channel, xaTransaction);
+ super(protocol, xaTransaction);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
index 504e32a6b3..4707088754 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CommitTransactionRequest.java
@@ -31,7 +31,6 @@ import org.eclipse.emf.internal.cdo.CDOCommitContext;
import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -49,9 +48,9 @@ public class CommitTransactionRequest extends CDOClientRequest<CommitTransaction
protected CDOCommitContext commitContext;
- public CommitTransactionRequest(IChannel channel, CDOCommitContext commitContext)
+ public CommitTransactionRequest(CDOClientProtocol protocol, CDOCommitContext commitContext)
{
- super(channel);
+ super(protocol);
this.commitContext = commitContext;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java
index 032d33d93e..08de1d5be5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadChunkRequest.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.spi.common.InternalCDORevision;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.collection.MoveableList;
import org.eclipse.net4j.util.om.trace.ContextTracer;
@@ -44,10 +43,10 @@ public class LoadChunkRequest extends CDOClientRequest<CDOID>
private int fetchIndex;
- public LoadChunkRequest(IChannel channel, InternalCDORevision revision, CDOFeature feature, int accessIndex,
- int fetchIndex, int fromIndex, int toIndex)
+ public LoadChunkRequest(CDOClientProtocol protocol, InternalCDORevision revision, CDOFeature feature,
+ int accessIndex, int fetchIndex, int fromIndex, int toIndex)
{
- super(channel);
+ super(protocol);
this.revision = revision;
this.feature = feature;
this.accessIndex = accessIndex;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java
index 231466697a..85adb768ab 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadLibrariesRequest.java
@@ -14,9 +14,7 @@ import org.eclipse.emf.cdo.common.CDOProtocolConstants;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.RequestWithConfirmation;
-import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.io.IOUtil;
@@ -38,9 +36,9 @@ public class LoadLibrariesRequest extends RequestWithConfirmation<Integer>
private File cacheFolder;
- public LoadLibrariesRequest(IChannel channel, Collection<String> libraryNames, File cacheFolder)
+ public LoadLibrariesRequest(CDOClientProtocol protocol, Collection<String> libraryNames, File cacheFolder)
{
- super((SignalProtocol)channel.getReceiveHandler());
+ super(protocol);
this.libraryNames = libraryNames;
this.cacheFolder = cacheFolder;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java
index 800565d315..5de5b0ae86 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadPackageRequest.java
@@ -15,8 +15,6 @@ import org.eclipse.emf.cdo.common.CDODataOutput;
import org.eclipse.emf.cdo.common.CDOProtocolConstants;
import org.eclipse.emf.cdo.common.model.CDOPackage;
-import org.eclipse.net4j.channel.IChannel;
-
import java.io.IOException;
/**
@@ -26,9 +24,9 @@ public class LoadPackageRequest extends CDOClientRequest<Object>
{
private CDOPackage cdoPackage;
- public LoadPackageRequest(IChannel channel, CDOPackage cdoPackage)
+ public LoadPackageRequest(CDOClientProtocol protocol, CDOPackage cdoPackage)
{
- super(channel);
+ super(protocol);
this.cdoPackage = cdoPackage;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java
index 94a58fd393..65a0034d06 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByTimeRequest.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -33,9 +32,9 @@ public class LoadRevisionByTimeRequest extends LoadRevisionRequest
private long timeStamp;
- public LoadRevisionByTimeRequest(IChannel channel, Collection<CDOID> ids, int referenceChunk, long timeStamp)
+ public LoadRevisionByTimeRequest(CDOClientProtocol protocol, Collection<CDOID> ids, int referenceChunk, long timeStamp)
{
- super(channel, ids, referenceChunk);
+ super(protocol, ids, referenceChunk);
this.timeStamp = timeStamp;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java
index c340ca4b1b..03faa34435 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionByVersionRequest.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -33,9 +32,9 @@ public class LoadRevisionByVersionRequest extends LoadRevisionRequest
private int version;
- public LoadRevisionByVersionRequest(IChannel channel, CDOID id, int referenceChunk, int version)
+ public LoadRevisionByVersionRequest(CDOClientProtocol protocol, CDOID id, int referenceChunk, int version)
{
- super(channel, Collections.singleton(id), referenceChunk);
+ super(protocol, Collections.singleton(id), referenceChunk);
this.version = version;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java
index 01eb447911..4d860c4620 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/LoadRevisionRequest.java
@@ -21,7 +21,6 @@ import org.eclipse.emf.cdo.spi.common.InternalCDORevision;
import org.eclipse.emf.internal.cdo.CDORevisionManagerImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -41,9 +40,9 @@ public class LoadRevisionRequest extends CDOClientRequest<List<InternalCDORevisi
private int referenceChunk;
- public LoadRevisionRequest(IChannel channel, Collection<CDOID> ids, int referenceChunk)
+ public LoadRevisionRequest(CDOClientProtocol protocol, Collection<CDOID> ids, int referenceChunk)
{
- super(channel);
+ super(protocol);
this.ids = ids;
this.referenceChunk = referenceChunk;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
index 21b0b336da..8d1c9a2c90 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/OpenSessionRequest.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -45,9 +44,9 @@ public class OpenSessionRequest extends CDOTimeRequest<OpenSessionResult>
private OpenSessionResult result;
- public OpenSessionRequest(IChannel channel, String repositoryName, boolean passiveUpdateEnabled)
+ public OpenSessionRequest(CDOClientProtocol protocol, String repositoryName, boolean passiveUpdateEnabled)
{
- super(channel);
+ super(protocol);
this.repositoryName = repositoryName;
this.passiveUpdateEnabled = passiveUpdateEnabled;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java
index 3afb17cc02..c41705c9cb 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryCancelRequest.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.cdo.common.CDOProtocolConstants;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -31,9 +30,9 @@ public class QueryCancelRequest extends CDOClientRequest<Object>
private int queryID;
- public QueryCancelRequest(IChannel channel, int queryID)
+ public QueryCancelRequest(CDOClientProtocol protocol, int queryID)
{
- super(channel);
+ super(protocol);
this.queryID = queryID;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java
index 68ac352d2a..7eaeae4f79 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/QueryRequest.java
@@ -20,7 +20,6 @@ import org.eclipse.emf.cdo.internal.common.query.CDOQueryInfoImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.query.CDOQueryResultIteratorImpl;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -40,10 +39,10 @@ public class QueryRequest extends CDOClientRequest<Object>
private CDOQueryResultIteratorImpl<?> queryResult;
- public QueryRequest(IChannel channel, int viewID, CDOQueryInfoImpl queryInfo,
+ public QueryRequest(CDOClientProtocol protocol, int viewID, CDOQueryInfoImpl queryInfo,
CDOQueryResultIteratorImpl<?> queryResult)
{
- super(channel);
+ super(protocol);
this.viewID = viewID;
this.queryInfo = queryInfo;
this.queryResult = queryResult;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java
index 1972ab27ba..ff4a632c64 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/RepositoryTimeRequest.java
@@ -13,8 +13,6 @@ package org.eclipse.emf.internal.cdo.protocol;
import org.eclipse.emf.cdo.common.CDODataInput;
import org.eclipse.emf.cdo.common.CDOProtocolConstants;
-import org.eclipse.net4j.channel.IChannel;
-
import java.io.IOException;
/**
@@ -22,9 +20,9 @@ import java.io.IOException;
*/
public class RepositoryTimeRequest extends CDOTimeRequest<RepositoryTimeResult>
{
- public RepositoryTimeRequest(IChannel channel)
+ public RepositoryTimeRequest(CDOClientProtocol protocol)
{
- super(channel);
+ super(protocol);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java
index cb19efd546..70cbe03ef4 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourceIDRequest.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -33,9 +32,9 @@ public class ResourceIDRequest extends CDOClientRequest<CDOID>
private String path;
- public ResourceIDRequest(IChannel channel, int viewID, String path)
+ public ResourceIDRequest(CDOClientProtocol protocol, int viewID, String path)
{
- super(channel);
+ super(protocol);
this.viewID = viewID;
this.path = path;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourcePathRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourcePathRequest.java
index f3ac91777b..126f758ee0 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourcePathRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ResourcePathRequest.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -33,9 +32,9 @@ public class ResourcePathRequest extends CDOClientRequest<String>
private CDOID id;
- public ResourcePathRequest(IChannel channel, int viewID, CDOID id)
+ public ResourcePathRequest(CDOClientProtocol protocol, int viewID, CDOID id)
{
- super(channel);
+ super(protocol);
this.viewID = viewID;
this.id = id;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java
index 5c97c1c052..f167955059 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetAuditRequest.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.cdo.common.CDOProtocolConstants;
import org.eclipse.emf.internal.cdo.InternalCDOObject;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -36,9 +35,9 @@ public class SetAuditRequest extends CDOClientRequest<boolean[]>
private List<InternalCDOObject> invalidObjects;
- public SetAuditRequest(IChannel channel, int viewID, long timeStamp, List<InternalCDOObject> invalidObjects)
+ public SetAuditRequest(CDOClientProtocol protocol, int viewID, long timeStamp, List<InternalCDOObject> invalidObjects)
{
- super(channel);
+ super(protocol);
this.viewID = viewID;
this.timeStamp = timeStamp;
this.invalidObjects = invalidObjects;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java
index b3721ae759..6482fb2d4d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SetPassiveUpdateRequest.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -36,10 +35,10 @@ public class SetPassiveUpdateRequest extends SyncRevisionRequest
private boolean passiveUpdateEnabled;
- public SetPassiveUpdateRequest(IChannel channel, CDOSessionImpl session, Map<CDOID, CDORevision> cdoRevisions,
- int referenceChunk, boolean passiveUpdateEnabled)
+ public SetPassiveUpdateRequest(CDOClientProtocol protocol, CDOSessionImpl session,
+ Map<CDOID, CDORevision> cdoRevisions, int referenceChunk, boolean passiveUpdateEnabled)
{
- super(channel, session, cdoRevisions, referenceChunk);
+ super(protocol, session, cdoRevisions, referenceChunk);
this.passiveUpdateEnabled = passiveUpdateEnabled;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java
index 8625a83140..13fae014e9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/SyncRevisionRequest.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.CDOTimestampContextImpl;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -50,10 +49,10 @@ public class SyncRevisionRequest extends CDOClientRequest<Collection<CDOTimestam
private int referenceChunk;
- public SyncRevisionRequest(IChannel channel, CDOSessionImpl cdoSession, Map<CDOID, CDORevision> cdoRevisions,
- int referenceChunk)
+ public SyncRevisionRequest(CDOClientProtocol protocol, CDOSessionImpl cdoSession,
+ Map<CDOID, CDORevision> cdoRevisions, int referenceChunk)
{
- super(channel);
+ super(protocol);
collectionRevisions = cdoRevisions;
this.referenceChunk = referenceChunk;
this.cdoSession = cdoSession;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java
index dd3ca90b74..3b31f1e36d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/VerifyRevisionRequest.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.spi.common.InternalCDORevision;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -37,15 +36,15 @@ public class VerifyRevisionRequest extends CDOClientRequest<List<InternalCDORevi
private Collection<InternalCDORevision> revisions;
- public VerifyRevisionRequest(IChannel channel, Collection<InternalCDORevision> revisions)
+ public VerifyRevisionRequest(CDOClientProtocol protocol, Collection<InternalCDORevision> revisions)
{
- super(channel);
+ super(protocol);
this.revisions = revisions;
}
- public VerifyRevisionRequest(IChannel channel, InternalCDORevision revision)
+ public VerifyRevisionRequest(CDOClientProtocol protocol, InternalCDORevision revision)
{
- this(channel, Collections.singleton(revision));
+ this(protocol, Collections.singleton(revision));
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java
index 19ff5699e3..7bea8919a3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/ViewsChangedRequest.java
@@ -14,8 +14,6 @@ import org.eclipse.emf.cdo.common.CDODataInput;
import org.eclipse.emf.cdo.common.CDODataOutput;
import org.eclipse.emf.cdo.common.CDOProtocolConstants;
-import org.eclipse.net4j.channel.IChannel;
-
import java.io.IOException;
/**
@@ -29,9 +27,9 @@ public class ViewsChangedRequest extends CDOClientRequest<Boolean>
private long timeStamp;
- public ViewsChangedRequest(IChannel channel, int viewID, byte kind, long timeStamp)
+ public ViewsChangedRequest(CDOClientProtocol protocol, int viewID, byte kind, long timeStamp)
{
- super(channel);
+ super(protocol);
this.viewID = viewID;
this.kind = kind;
this.timeStamp = timeStamp;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java
index 7562f2ad97..a57f29859a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java
@@ -11,19 +11,18 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.query;
-import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.common.util.BlockingCloseableIterator;
import org.eclipse.emf.cdo.internal.common.query.CDOQueryInfoImpl;
import org.eclipse.emf.cdo.query.CDOQuery;
+import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.CDOViewImpl;
import org.eclipse.emf.internal.cdo.InternalCDOObject;
import org.eclipse.emf.internal.cdo.protocol.QueryRequest;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.emf.internal.cdo.util.ModelUtil;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.WrappedException;
import org.eclipse.emf.ecore.EClass;
@@ -69,9 +68,8 @@ public class CDOQueryImpl extends CDOQueryInfoImpl implements CDOQuery
try
{
- CDOSession session = view.getSession();
- IChannel channel = session.getChannel();
- QueryRequest request = new QueryRequest(channel, view.getViewID(), queryInfo, queryResult);
+ CDOSessionImpl session = view.getSession();
+ QueryRequest request = new QueryRequest(session.getProtocol(), view.getViewID(), queryInfo, queryResult);
session.getFailOverStrategy().send(request);
}
catch (Exception exception)
@@ -93,9 +91,8 @@ public class CDOQueryImpl extends CDOQueryInfoImpl implements CDOQuery
{
try
{
- CDOSession session = view.getSession();
- IChannel channel = session.getChannel();
- QueryRequest request = new QueryRequest(channel, view.getViewID(), queryInfo, queryResult);
+ CDOSessionImpl session = view.getSession();
+ QueryRequest request = new QueryRequest(session.getProtocol(), view.getViewID(), queryInfo, queryResult);
session.getFailOverStrategy().send(request);
}
catch (Exception ex)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryResultIteratorImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryResultIteratorImpl.java
index 22a2f078d0..99395a63dc 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryResultIteratorImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryResultIteratorImpl.java
@@ -11,15 +11,14 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo.query;
-import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.query.CDOQueryInfo;
import org.eclipse.emf.cdo.internal.common.query.AbstractQueryResult;
+import org.eclipse.emf.internal.cdo.CDOSessionImpl;
import org.eclipse.emf.internal.cdo.protocol.QueryCancelRequest;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.concurrent.ConcurrentValue;
import java.util.ArrayList;
@@ -102,9 +101,8 @@ public class CDOQueryResultIteratorImpl<T> extends AbstractQueryResult<T>
try
{
- CDOSession session = getView().getSession();
- IChannel channel = session.getChannel();
- QueryCancelRequest request = new QueryCancelRequest(channel, getQueryID());
+ CDOSessionImpl session = (CDOSessionImpl)getView().getSession();
+ QueryCancelRequest request = new QueryCancelRequest(session.getProtocol(), getQueryID());
session.getFailOverStrategy().send(request);
}
catch (Exception exception)
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
index 9152f01b03..f5ffbf52e6 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
@@ -57,9 +57,10 @@ public class BuddiesServerProtocol extends SignalProtocol
case ProtocolConstants.SIGNAL_MESSAGE:
return new MessageIndication(IBuddyAdmin.INSTANCE);
- }
- return null;
+ default:
+ return null;
+ }
}
/**
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
index 23c0b2882a..9546864e74 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
@@ -31,7 +31,7 @@ public class BuddiesClientProtocol extends SignalProtocol
public BuddiesClientProtocol(IConnector connector)
{
- super(connector);
+ open(connector);
}
public String getType()
@@ -64,9 +64,10 @@ public class BuddiesClientProtocol extends SignalProtocol
case ProtocolConstants.SIGNAL_MESSAGE:
return new MessageIndication(getSelf());
- }
- return null;
+ default:
+ return null;
+ }
}
protected Self getSelf()
diff --git a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClientProtocol.java b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClientProtocol.java
index 96f50d4961..c410f31f12 100644
--- a/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClientProtocol.java
+++ b/plugins/org.eclipse.net4j.examples/src/org/eclipse/net4j/examples/echo/client/EchoClientProtocol.java
@@ -23,7 +23,7 @@ public class EchoClientProtocol extends SignalProtocol implements EchoProtocol
{
public EchoClientProtocol(IConnector connector)
{
- super(connector);
+ open(connector);
}
public String getType()
diff --git a/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocol.java b/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocol.java
index c28dc3215c..acbe4a3572 100644
--- a/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocol.java
@@ -22,7 +22,7 @@ public class JMSAdminProtocol extends SignalProtocol
{
public JMSAdminProtocol(IConnector connector)
{
- super(connector);
+ open(connector);
}
public String getType()
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
index d6d719b5bb..598df79ac9 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
@@ -59,8 +59,9 @@ public class JMSServerProtocol extends SignalProtocol
case JMSProtocolConstants.SIGNAL_ROLLBACK:
return new JMSRollbackIndication();
- }
- return null;
+ default:
+ return null;
+ }
}
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
index a2ad5498a0..b98d093ea1 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
@@ -36,9 +36,10 @@ public class JMSAdminServerProtocol extends SignalProtocol
{
case JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION:
return new JMSCreateDestinationIndication();
- }
- return null;
+ default:
+ return null;
+ }
}
public IServer getServer()
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java
index 88aaf55d29..c26889e9e7 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocol.java
@@ -40,8 +40,9 @@ public class JMSClientProtocol extends SignalProtocol
{
case JMSProtocolConstants.SIGNAL_SERVER_MESSAGE:
return new JMSServerMessageIndication();
- }
- return null;
+ default:
+ return null;
+ }
}
}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
index d39c3ff493..adfb813013 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
@@ -37,7 +37,7 @@ public class TestSignalProtocol extends SignalProtocol
public TestSignalProtocol(IConnector connector)
{
- super(connector);
+ open(connector);
}
private TestSignalProtocol()
@@ -56,18 +56,25 @@ public class TestSignalProtocol extends SignalProtocol
{
case SIGNAL_INT:
return new IntIndication();
+
case SIGNAL_INT_FAIL:
return new IntFailIndication();
+
case SIGNAL_ARRAY:
return new ArrayIndication();
+
case SIGNAL_STRING:
return new StringIndication();
+
case SIGNAL_ASYNC:
return new AsyncIndication();
+
case SIGNAL_EXCEPTION:
return new ExceptionIndication();
+
+ default:
+ return null;
}
- return null;
}
/**
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/connector/IConnector.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/connector/IConnector.java
index 69237b8b97..af64fb6ac5 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/connector/IConnector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/connector/IConnector.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.connector;
import org.eclipse.net4j.ILocationAware;
+import org.eclipse.net4j.ILocationAware.Location;
import org.eclipse.net4j.buffer.IBuffer;
import org.eclipse.net4j.buffer.IBufferHandler;
import org.eclipse.net4j.channel.IChannel;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
index a05df135c0..7f0a2842b7 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java
@@ -66,19 +66,12 @@ public abstract class SignalProtocol extends Protocol
/**
* @since 2.0
*/
- protected SignalProtocol(IConnector connector)
- {
- open(connector);
- }
-
- /**
- * @since 2.0
- */
public IChannel open(IConnector connector)
{
- InternalConnector internal = (InternalConnector)connector;
- setBufferProvider(internal.getConfig().getBufferProvider());
- setExecutorService(internal.getConfig().getReceiveExecutor());
+ InternalConnector conn = (InternalConnector)connector;
+ setBufferProvider(conn.getConfig().getBufferProvider());
+ setExecutorService(conn.getConfig().getReceiveExecutor());
+
IChannel channel = connector.openChannel(this);
setChannel(channel);
return channel;

Back to the top