Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j')
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSession.java66
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSessionConfiguration.java88
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jViewProvider.java43
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSession.java106
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java103
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/RecoveringCDOSessionConfiguration.java1
7 files changed, 280 insertions, 154 deletions
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSession.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSession.java
new file mode 100644
index 0000000000..9e0ff20a5a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSession.java
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ * Simon McDuff - maintenance
+ * Victor Roldan Betancort - maintenance
+ **************************************************************************/
+package org.eclipse.emf.cdo.net4j;
+
+import org.eclipse.net4j.signal.ISignalProtocol;
+
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol;
+
+/**
+ * @since 4.1
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface CDONet4jSession extends org.eclipse.emf.cdo.session.CDOSession
+{
+ /**
+ * Returns the {@link Options options} of this session.
+ */
+ public Options options();
+
+ /**
+ * @since 4.1
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+ public interface Options extends org.eclipse.emf.cdo.session.CDOSession.Options
+ {
+ /**
+ * Returns the Net4j {@link CDOSessionProtocol protocol} instance that represents the underlying
+ * <em>signalling connection</em> to the repository of this session.
+ */
+ public ISignalProtocol<CDONet4jSession> getProtocol();
+
+ /**
+ * Returns the timeout for commit operations in <b>seconds</b>.
+ */
+ public int getCommitTimeout();
+
+ /**
+ * Sets the timeout for commit operations in <b>seconds</b>.
+ */
+ public void setCommitTimeout(int commitTimeout);
+
+ /**
+ * Returns the interval for progress reports of commit operations in <b>seconds</b>.
+ */
+ public int getProgressInterval();
+
+ /**
+ * Sets the interval for progress reports of commit operations in <b>seconds</b>.
+ */
+ public void setProgressInterval(int progressInterval);
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSessionConfiguration.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSessionConfiguration.java
new file mode 100644
index 0000000000..edc2374512
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jSessionConfiguration.java
@@ -0,0 +1,88 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.emf.cdo.net4j;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranchManager;
+import org.eclipse.emf.cdo.common.model.CDOPackageRegistry;
+import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
+
+import org.eclipse.net4j.connector.IConnector;
+import org.eclipse.net4j.util.io.IStreamWrapper;
+
+/**
+ * @since 4.1
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface CDONet4jSessionConfiguration extends org.eclipse.emf.cdo.session.CDOSessionConfiguration
+{
+ public String getRepositoryName();
+
+ public void setRepositoryName(String repositoryName);
+
+ public IConnector getConnector();
+
+ public void setConnector(IConnector connector);
+
+ public IStreamWrapper getStreamWrapper();
+
+ public void setStreamWrapper(IStreamWrapper streamWrapper);
+
+ /**
+ * @since 4.0
+ */
+ public long getSignalTimeout();
+
+ /**
+ * @since 4.0
+ */
+ public void setSignalTimeout(long timeout);
+
+ /**
+ * @see CDONet4jSession#getPackageRegistry()
+ */
+ public CDOPackageRegistry getPackageRegistry();
+
+ /**
+ * A special package registry can be set <b>before</b> the session is opened and can not be changed thereafter.
+ *
+ * @see CDONet4jSession#getPackageRegistry()
+ */
+ public void setPackageRegistry(CDOPackageRegistry packageRegistry);
+
+ public CDOBranchManager getBranchManager();
+
+ public void setBranchManager(CDOBranchManager branchManager);
+
+ /**
+ * @see CDONet4jSession#getRevisionManager()
+ * @since 3.0
+ */
+ public CDORevisionManager getRevisionManager();
+
+ /**
+ * @see CDONet4jSession#getRevisionManager()
+ * @since 3.0
+ */
+ public void setRevisionManager(CDORevisionManager revisionManager);
+
+ /**
+ * @since 4.1
+ */
+ public CDONet4jSession openNet4jSession();
+
+ /**
+ * @deprecated Use {@link #openNet4jSession() openNet4jSession()}.
+ */
+ @Deprecated
+ public org.eclipse.emf.cdo.net4j.CDOSession openSession();
+}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java
index 281f353dd5..ed376780d3 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java
@@ -86,12 +86,24 @@ public final class CDONet4jUtil
{
}
- public static CDOSessionConfiguration createSessionConfiguration()
+ /**
+ * @since 4.1
+ */
+ public static CDONet4jSessionConfiguration createNet4jSessionConfiguration()
{
return new CDONet4jSessionConfigurationImpl();
}
/**
+ * @deprecated Use {@link #createNet4jSessionConfiguration() createNet4jSessionConfiguration()}.
+ */
+ @Deprecated
+ public static CDOSessionConfiguration createSessionConfiguration()
+ {
+ return (CDOSessionConfiguration)createNet4jSessionConfiguration();
+ }
+
+ /**
* @since 4.0
*/
public static ReconnectingCDOSessionConfiguration createReconnectingSessionConfiguration(String hostAndPort,
@@ -125,10 +137,21 @@ public final class CDONet4jUtil
}
/**
+ * @since 4.1
+ */
+ public static CDONet4jSession getNet4jSession(IManagedContainer container, String description)
+ {
+ return (CDONet4jSession)container
+ .getElement(CDOSessionFactory.PRODUCT_GROUP, Net4jSessionFactory.TYPE, description);
+ }
+
+ /**
* @since 4.0
+ * @deprecated Use {@link #getNet4jSession(IManagedContainer, String) getNet4jSession()}.
*/
+ @Deprecated
public static CDOSession getSession(IManagedContainer container, String description)
{
- return (CDOSession)container.getElement(CDOSessionFactory.PRODUCT_GROUP, Net4jSessionFactory.TYPE, description);
+ return (CDOSession)getNet4jSession(container, description);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jViewProvider.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jViewProvider.java
index 7bf0fdd6d1..4ec9b01072 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jViewProvider.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jViewProvider.java
@@ -49,7 +49,7 @@ public abstract class CDONet4jViewProvider extends AbstractCDOViewProvider
CDOURIData data = new CDOURIData(uri);
IConnector connector = getConnector(data.getAuthority());
- CDOSession session = getSession(connector, data.getUserName(), data.getPassWord(), data.getRepositoryName());
+ CDONet4jSession session = getSession(connector, data.getUserName(), data.getPassWord(), data.getRepositoryName());
String branchPath = data.getBranchPath().toPortableString();
CDOBranch branch = session.getBranchManager().getBranch(branchPath);
@@ -71,7 +71,7 @@ public abstract class CDONet4jViewProvider extends AbstractCDOViewProvider
builder.append(transport);
builder.append("://");
- CDOSession session = (CDOSession)view.getSession();
+ CDONet4jSession session = (CDONet4jSession)view.getSession();
// CDOAuthenticator authenticator = ((InternalCDOSession)session).getAuthenticator();
// IPasswordCredentialsProvider credentialsProvider = authenticator.getCredentialsProvider();
@@ -137,16 +137,23 @@ public abstract class CDONet4jViewProvider extends AbstractCDOViewProvider
return URI.createURI(url).authority();
}
- protected CDOSession getSession(IConnector connector, String userName, String passWord, String repositoryName)
+ /**
+ * @since 4.1
+ */
+ protected CDONet4jSession getNet4jSession(IConnector connector, String userName, String passWord,
+ String repositoryName)
{
- CDOSessionConfiguration configuration = getSessionConfiguration(connector, userName, passWord, repositoryName);
- return configuration.openSession();
+ CDONet4jSessionConfiguration configuration = getSessionConfiguration(connector, userName, passWord, repositoryName);
+ return configuration.openNet4jSession();
}
- protected CDOSessionConfiguration getSessionConfiguration(IConnector connector, String userName, String passWord,
- String repositoryName)
+ /**
+ * @since 4.1
+ */
+ protected CDONet4jSessionConfiguration getNet4jSessionConfiguration(IConnector connector, String userName,
+ String passWord, String repositoryName)
{
- CDOSessionConfiguration configuration = CDONet4jUtil.createSessionConfiguration();
+ CDONet4jSessionConfiguration configuration = CDONet4jUtil.createNet4jSessionConfiguration();
configuration.setConnector(connector);
configuration.setRepositoryName(repositoryName);
@@ -176,6 +183,26 @@ public abstract class CDONet4jViewProvider extends AbstractCDOViewProvider
return configuration;
}
+ /**
+ * @deprecated Use {@link #getNet4jSession(IConnector, String, String, String) getNet4jSession()}.
+ */
+ @Deprecated
+ protected CDOSession getSession(IConnector connector, String userName, String passWord, String repositoryName)
+ {
+ return (CDOSession)getNet4jSession(connector, userName, passWord, repositoryName);
+ }
+
+ /**
+ * @deprecated Use {@link #getNet4jSessionConfiguration(IConnector, String, String, String)
+ * getNet4jSessionConfiguration()}.
+ */
+ @Deprecated
+ protected CDOSessionConfiguration getSessionConfiguration(IConnector connector, String userName, String passWord,
+ String repositoryName)
+ {
+ return (CDOSessionConfiguration)getNet4jSessionConfiguration(connector, userName, passWord, repositoryName);
+ }
+
protected IManagedContainer getContainer()
{
return IPluginContainer.INSTANCE;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSession.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSession.java
index 22914e3b8e..a59d63954c 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSession.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSession.java
@@ -1,65 +1,41 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- * Simon McDuff - maintenance
- * Victor Roldan Betancort - maintenance
- **************************************************************************/
-package org.eclipse.emf.cdo.net4j;
-
-import org.eclipse.net4j.signal.ISignalProtocol;
-
-import org.eclipse.emf.spi.cdo.CDOSessionProtocol;
-
-/**
- * @since 2.0
- * @author Eike Stepper
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface CDOSession extends org.eclipse.emf.cdo.session.CDOSession
-{
- /**
- * Returns the {@link Options options} of this session.
- */
- public Options options();
-
- /**
- * @author Eike Stepper
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
- public interface Options extends org.eclipse.emf.cdo.session.CDOSession.Options
- {
- /**
- * Returns the Net4j {@link CDOSessionProtocol protocol} instance that represents the underlying
- * <em>signalling connection</em> to the repository of this session.
- */
- public ISignalProtocol<CDOSession> getProtocol();
-
- /**
- * Returns the timeout for commit operations in <b>seconds</b>.
- */
- public int getCommitTimeout();
-
- /**
- * Sets the timeout for commit operations in <b>seconds</b>.
- */
- public void setCommitTimeout(int commitTimeout);
-
- /**
- * Returns the interval for progress reports of commit operations in <b>seconds</b>.
- */
- public int getProgressInterval();
-
- /**
- * Sets the interval for progress reports of commit operations in <b>seconds</b>.
- */
- public void setProgressInterval(int progressInterval);
- }
-}
+/**
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.net4j;
+
+/**
+ * @since 2.0
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @deprecated Use {@link org.eclipse.emf.cdo.net4j.CDONet4jSession CDONet4jSession}.
+ */
+@Deprecated
+public interface CDOSession extends CDONet4jSession
+{
+ /**
+ * Returns the {@link Options options} of this session.
+ *
+ * @deprecated Use {@link org.eclipse.emf.cdo.net4j.CDONet4jSession#options() CDONet4jSession.options()}.
+ */
+ @Deprecated
+ public Options options();
+
+ /**
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @deprecated Use {@link org.eclipse.emf.cdo.net4j.CDONet4jSession.Options CDONet4jSession.Options}.
+ */
+ @Deprecated
+ public interface Options extends CDONet4jSession.Options
+ {
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java
index f3f46cfa5f..46dd270b44 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java
@@ -1,79 +1,24 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.emf.cdo.net4j;
-
-import org.eclipse.emf.cdo.common.branch.CDOBranchManager;
-import org.eclipse.emf.cdo.common.model.CDOPackageRegistry;
-import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
-
-import org.eclipse.net4j.connector.IConnector;
-import org.eclipse.net4j.util.io.IStreamWrapper;
-
-/**
- * @author Eike Stepper
- * @since 3.0
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface CDOSessionConfiguration extends org.eclipse.emf.cdo.session.CDOSessionConfiguration
-{
- public String getRepositoryName();
-
- public void setRepositoryName(String repositoryName);
-
- public IConnector getConnector();
-
- public void setConnector(IConnector connector);
-
- public IStreamWrapper getStreamWrapper();
-
- public void setStreamWrapper(IStreamWrapper streamWrapper);
-
- /**
- * @since 4.0
- */
- public long getSignalTimeout();
-
- /**
- * @since 4.0
- */
- public void setSignalTimeout(long timeout);
-
- /**
- * @see CDOSession#getPackageRegistry()
- */
- public CDOPackageRegistry getPackageRegistry();
-
- /**
- * A special package registry can be set <b>before</b> the session is opened and can not be changed thereafter.
- *
- * @see CDOSession#getPackageRegistry()
- */
- public void setPackageRegistry(CDOPackageRegistry packageRegistry);
-
- public CDOBranchManager getBranchManager();
-
- public void setBranchManager(CDOBranchManager branchManager);
-
- /**
- * @see CDOSession#getRevisionManager()
- * @since 3.0
- */
- public CDORevisionManager getRevisionManager();
-
- /**
- * @see CDOSession#getRevisionManager()
- * @since 3.0
- */
- public void setRevisionManager(CDORevisionManager revisionManager);
-
- public org.eclipse.emf.cdo.net4j.CDOSession openSession();
-}
+/**
+ * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.net4j;
+
+/**
+ * @since 3.0
+ * @author Eike Stepper
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @deprecated Use {@link org.eclipse.emf.cdo.net4j.CDONet4jSessionConfiguration CDONet4jSessionConfiguration}.
+ */
+@Deprecated
+public interface CDOSessionConfiguration extends CDONet4jSessionConfiguration
+{
+
+}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/RecoveringCDOSessionConfiguration.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/RecoveringCDOSessionConfiguration.java
index 9fa7fb2048..ee4c423444 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/RecoveringCDOSessionConfiguration.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/RecoveringCDOSessionConfiguration.java
@@ -16,6 +16,7 @@ package org.eclipse.emf.cdo.net4j;
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
+@SuppressWarnings("deprecation")
public interface RecoveringCDOSessionConfiguration extends CDOSessionConfiguration
{
public boolean isHeartBeatEnabled();

Back to the top