Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo')
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java39
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSession.java64
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java35
3 files changed, 138 insertions, 0 deletions
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
new file mode 100644
index 0000000000..1e16188097
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java
@@ -0,0 +1,39 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2009 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.emf.internal.cdo.net4j.CDONet4jSessionConfigurationImpl;
+import org.eclipse.emf.internal.cdo.net4j.protocol.CDOClientProtocolFactory;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+/**
+ * @since 2.0
+ * @author Eike Stepper
+ */
+public final class CDONet4jUtil
+{
+ private CDONet4jUtil()
+ {
+ }
+
+ public static CDOSessionConfiguration createSessionConfiguration()
+ {
+ return new CDONet4jSessionConfigurationImpl();
+ }
+
+ public static void prepareContainer(IManagedContainer container)
+ {
+ container.registerFactory(new CDOClientProtocolFactory());
+ }
+}
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
new file mode 100644
index 0000000000..176c55adc6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSession.java
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2009 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.emf.cdo.common.CDOCommonSession;
+
+import org.eclipse.net4j.signal.ISignalProtocol;
+
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol;
+
+/**
+ * @since 2.0
+ * @author Eike Stepper
+ * @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
+ */
+ 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<CDOCommonSession> 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/CDOSessionConfiguration.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java
new file mode 100644
index 0000000000..20f845e930
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDOSessionConfiguration.java
@@ -0,0 +1,35 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2009 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.net4j.connector.IConnector;
+import org.eclipse.net4j.signal.failover.IFailOverStrategy;
+
+/**
+ * @author Eike Stepper
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface CDOSessionConfiguration extends org.eclipse.emf.cdo.session.CDOSessionConfiguration
+{
+ public IConnector getConnector();
+
+ public void setConnector(IConnector connector);
+
+ public IFailOverStrategy getFailOverStrategy();
+
+ /**
+ * The fail-over strategy must be set <b>before</b> the session is opened and can not be changed thereafter.
+ */
+ public void setFailOverStrategy(IFailOverStrategy failOverStrategy);
+
+ public org.eclipse.emf.cdo.net4j.CDOSession openSession();
+}

Back to the top