summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-29 11:51:35 (EST)
committerEike Stepper2007-12-29 11:51:35 (EST)
commit8460a70ac554b0aa9029cee7c92d1b8e63aa762e (patch)
tree5d5b79543c66790bf84accdc968a2bd8d1c01e71
parenta42e4288cc0ae0da880dd20e363fa3d04b285428 (diff)
downloadcdo-8460a70ac554b0aa9029cee7c92d1b8e63aa762e.zip
cdo-8460a70ac554b0aa9029cee7c92d1b8e63aa762e.tar.gz
cdo-8460a70ac554b0aa9029cee7c92d1b8e63aa762e.tar.bz2
[213782] Transaction DeadLock
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213782
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/net4j/org/eclipse/net4j/tests/AbstractTransportTest.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java2
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java4
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java4
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java4
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/AcceptorContentProvider.java2
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/ConnectorContentProvider.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/DescriptionUtil.java59
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/DescriptionUtil.java59
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/channel/DescriptionUtil.java59
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/DescriptionUtil.java59
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/DescriptionUtil.java59
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/Protocol.java86
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/ServerProtocolFactory.java26
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/Net4jUtil.java10
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/acceptor/IAcceptor.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/IBuffer.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/connector/IConnector.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/SignalProtocol.java2
30 files changed, 144 insertions, 327 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocolFactory.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocolFactory.java
index d1f6537..31347a8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocolFactory.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/protocol/CDOServerProtocolFactory.java
@@ -5,7 +5,7 @@ import org.eclipse.emf.cdo.server.IRepositoryProvider;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.internal.net4j.ServerProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.emf.cdo.tests/net4j/org/eclipse/net4j/tests/AbstractTransportTest.java b/plugins/org.eclipse.emf.cdo.tests/net4j/org/eclipse/net4j/tests/AbstractTransportTest.java
index 2ae8394..9d5802d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/net4j/org/eclipse/net4j/tests/AbstractTransportTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/net4j/org/eclipse/net4j/tests/AbstractTransportTest.java
@@ -16,8 +16,8 @@ import org.eclipse.net4j.tcp.TCPUtil;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.internal.net4j.Acceptor;
-import org.eclipse.internal.net4j.Connector;
+import org.eclipse.internal.net4j.acceptor.Acceptor;
+import org.eclipse.internal.net4j.connector.Connector;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerProtocolFactory.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerProtocolFactory.java
index ca40390..d769781 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/ServerProtocolFactory.java
@@ -16,7 +16,7 @@ import org.eclipse.net4j.util.container.IManagedContainer;
/**
* @author Eike Stepper
*/
-public class ServerProtocolFactory extends org.eclipse.internal.net4j.ServerProtocolFactory
+public class ServerProtocolFactory extends org.eclipse.internal.net4j.protocol.ServerProtocolFactory
{
public static final String TYPE = ProtocolConstants.PROTOCOL_NAME;
diff --git a/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocolFactory.java b/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocolFactory.java
index 6251ff4..b725a9b 100644
--- a/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms.admin/src/org/eclipse/net4j/jms/internal/admin/protocol/JMSAdminProtocolFactory.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.jms.internal.admin.protocol;
import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.internal.net4j.ClientProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ClientProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
index bde2566..739e8ba 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.jms.internal.server.protocol;
import org.eclipse.net4j.jms.JMSProtocolConstants;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.internal.net4j.ServerProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
index 0eb7d98..e9dff04 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.jms.internal.server.protocol.admin;
import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.internal.net4j.ServerProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocolFactory.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocolFactory.java
index 3c7adb2..abbbc33 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/protocol/JMSClientProtocolFactory.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.internal.jms.protocol;
import org.eclipse.net4j.jms.JMSProtocolConstants;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.internal.net4j.ClientProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ClientProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java
index 645b740..a2fac0f 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.internal.jvm;
import org.eclipse.net4j.jvm.IJVMAcceptor;
import org.eclipse.net4j.util.StringUtil;
-import org.eclipse.internal.net4j.Acceptor;
+import org.eclipse.internal.net4j.acceptor.Acceptor;
import java.text.MessageFormat;
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java
index 9482bf6..9a933d6 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptorFactory.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.internal.jvm;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import org.eclipse.internal.net4j.AcceptorFactory;
+import org.eclipse.internal.net4j.acceptor.AcceptorFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java
index 63527ad..1cc0baf 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnector.java
@@ -16,8 +16,8 @@ import org.eclipse.net4j.connector.ConnectorException;
import org.eclipse.net4j.protocol.IProtocol;
import org.eclipse.net4j.util.security.INegotiationContext;
-import org.eclipse.internal.net4j.Channel;
-import org.eclipse.internal.net4j.Connector;
+import org.eclipse.internal.net4j.channel.Channel;
+import org.eclipse.internal.net4j.connector.Connector;
import java.util.Queue;
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java
index 925f898..5510833 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMConnectorFactory.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.internal.jvm;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import org.eclipse.internal.net4j.ConnectorFactory;
+import org.eclipse.internal.net4j.connector.ConnectorFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java
index 16649c2..1f752d1 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ControlChannel.java
@@ -21,8 +21,8 @@ import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException;
import org.eclipse.net4j.util.security.INegotiationContext;
import org.eclipse.net4j.util.security.INegotiationContext.Receiver;
-import org.eclipse.internal.net4j.BufferUtil;
-import org.eclipse.internal.net4j.Channel;
+import org.eclipse.internal.net4j.buffer.BufferUtil;
+import org.eclipse.internal.net4j.channel.Channel;
import java.nio.ByteBuffer;
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
index 6df68ab..7c39aac 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
@@ -18,7 +18,7 @@ import org.eclipse.net4j.tcp.ITCPSelector;
import org.eclipse.net4j.tcp.ITCPSelectorListener;
import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.internal.net4j.Acceptor;
+import org.eclipse.internal.net4j.acceptor.Acceptor;
import java.io.IOException;
import java.net.InetAddress;
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java
index d1e9276..bc07b43 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptorFactory.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.internal.tcp;
import org.eclipse.net4j.tcp.ITCPAcceptor;
import org.eclipse.net4j.util.StringUtil;
-import org.eclipse.internal.net4j.AcceptorFactory;
+import org.eclipse.internal.net4j.acceptor.AcceptorFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index f51fcf2..92938ec 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -25,8 +25,8 @@ import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.security.INegotiationContext;
-import org.eclipse.internal.net4j.Channel;
-import org.eclipse.internal.net4j.Connector;
+import org.eclipse.internal.net4j.channel.Channel;
+import org.eclipse.internal.net4j.connector.Connector;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java
index 7b56801..1f02be5 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnectorFactory.java
@@ -14,7 +14,7 @@ import org.eclipse.net4j.tcp.ITCPConnector;
import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import org.eclipse.internal.net4j.ConnectorFactory;
+import org.eclipse.internal.net4j.connector.ConnectorFactory;
import java.net.MalformedURLException;
import java.net.URL;
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/AcceptorContentProvider.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/AcceptorContentProvider.java
index f445ef6..6542469 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/AcceptorContentProvider.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/AcceptorContentProvider.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.internal.ui;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.ui.StructuredContentProvider;
-import org.eclipse.internal.net4j.AcceptorFactory;
+import org.eclipse.internal.net4j.acceptor.AcceptorFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/ConnectorContentProvider.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/ConnectorContentProvider.java
index c3e0c61..8571e1d 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/ConnectorContentProvider.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/internal/ui/ConnectorContentProvider.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.internal.ui;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.ui.StructuredContentProvider;
-import org.eclipse.internal.net4j.ConnectorFactory;
+import org.eclipse.internal.net4j.connector.ConnectorFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/DescriptionUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/DescriptionUtil.java
deleted file mode 100644
index 89e2b93..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/DescriptionUtil.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * 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.internal.net4j.acceptor;
-
-/**
- * @author Eike Stepper
- */
-@Deprecated
-public final class DescriptionUtil
-{
- public static final String SEPARATOR = ":"; //$NON-NLS-1$
-
- public static final int TYPE_INDEX = 0;
-
- private DescriptionUtil()
- {
- }
-
- public static String getType(String description)
- {
- return getElement(description, TYPE_INDEX);
- }
-
- public static String getElement(String description, int index)
- {
- String[] elements = getElements(description);
- return elements[index];
- }
-
- public static String[] getElements(String description)
- {
- return description.split(SEPARATOR);
- }
-
- public static String getDescription(String type, Object[] elements)
- {
- StringBuilder builder = new StringBuilder();
- builder.append(type);
-
- for (Object element : elements)
- {
- builder.append(":");
- if (element != null)
- {
- builder.append(element);
- }
- }
-
- return builder.toString();
- }
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/DescriptionUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/DescriptionUtil.java
deleted file mode 100644
index 256d521..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/DescriptionUtil.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * 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.internal.net4j.buffer;
-
-/**
- * @author Eike Stepper
- */
-@Deprecated
-public final class DescriptionUtil
-{
- public static final String SEPARATOR = ":"; //$NON-NLS-1$
-
- public static final int TYPE_INDEX = 0;
-
- private DescriptionUtil()
- {
- }
-
- public static String getType(String description)
- {
- return getElement(description, TYPE_INDEX);
- }
-
- public static String getElement(String description, int index)
- {
- String[] elements = getElements(description);
- return elements[index];
- }
-
- public static String[] getElements(String description)
- {
- return description.split(SEPARATOR);
- }
-
- public static String getDescription(String type, Object[] elements)
- {
- StringBuilder builder = new StringBuilder();
- builder.append(type);
-
- for (Object element : elements)
- {
- builder.append(":");
- if (element != null)
- {
- builder.append(element);
- }
- }
-
- return builder.toString();
- }
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/channel/DescriptionUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/channel/DescriptionUtil.java
deleted file mode 100644
index 6e00ce5..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/channel/DescriptionUtil.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * 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.internal.net4j.channel;
-
-/**
- * @author Eike Stepper
- */
-@Deprecated
-public final class DescriptionUtil
-{
- public static final String SEPARATOR = ":"; //$NON-NLS-1$
-
- public static final int TYPE_INDEX = 0;
-
- private DescriptionUtil()
- {
- }
-
- public static String getType(String description)
- {
- return getElement(description, TYPE_INDEX);
- }
-
- public static String getElement(String description, int index)
- {
- String[] elements = getElements(description);
- return elements[index];
- }
-
- public static String[] getElements(String description)
- {
- return description.split(SEPARATOR);
- }
-
- public static String getDescription(String type, Object[] elements)
- {
- StringBuilder builder = new StringBuilder();
- builder.append(type);
-
- for (Object element : elements)
- {
- builder.append(":");
- if (element != null)
- {
- builder.append(element);
- }
- }
-
- return builder.toString();
- }
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/DescriptionUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/DescriptionUtil.java
deleted file mode 100644
index 1d5a4a2..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/DescriptionUtil.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * 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.internal.net4j.connector;
-
-/**
- * @author Eike Stepper
- */
-@Deprecated
-public final class DescriptionUtil
-{
- public static final String SEPARATOR = ":"; //$NON-NLS-1$
-
- public static final int TYPE_INDEX = 0;
-
- private DescriptionUtil()
- {
- }
-
- public static String getType(String description)
- {
- return getElement(description, TYPE_INDEX);
- }
-
- public static String getElement(String description, int index)
- {
- String[] elements = getElements(description);
- return elements[index];
- }
-
- public static String[] getElements(String description)
- {
- return description.split(SEPARATOR);
- }
-
- public static String getDescription(String type, Object[] elements)
- {
- StringBuilder builder = new StringBuilder();
- builder.append(type);
-
- for (Object element : elements)
- {
- builder.append(":");
- if (element != null)
- {
- builder.append(element);
- }
- }
-
- return builder.toString();
- }
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/DescriptionUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/DescriptionUtil.java
deleted file mode 100644
index 7c5a192..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/DescriptionUtil.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * 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.internal.net4j.protocol;
-
-/**
- * @author Eike Stepper
- */
-@Deprecated
-public final class DescriptionUtil
-{
- public static final String SEPARATOR = ":"; //$NON-NLS-1$
-
- public static final int TYPE_INDEX = 0;
-
- private DescriptionUtil()
- {
- }
-
- public static String getType(String description)
- {
- return getElement(description, TYPE_INDEX);
- }
-
- public static String getElement(String description, int index)
- {
- String[] elements = getElements(description);
- return elements[index];
- }
-
- public static String[] getElements(String description)
- {
- return description.split(SEPARATOR);
- }
-
- public static String getDescription(String type, Object[] elements)
- {
- StringBuilder builder = new StringBuilder();
- builder.append(type);
-
- for (Object element : elements)
- {
- builder.append(":");
- if (element != null)
- {
- builder.append(element);
- }
- }
-
- return builder.toString();
- }
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/Protocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/Protocol.java
new file mode 100644
index 0000000..13f4990
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/Protocol.java
@@ -0,0 +1,86 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * 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.internal.net4j.protocol;
+
+import org.eclipse.net4j.Net4jUtil;
+import org.eclipse.net4j.buffer.IBuffer;
+import org.eclipse.net4j.buffer.IBufferProvider;
+import org.eclipse.net4j.channel.IChannel;
+import org.eclipse.net4j.internal.util.lifecycle.Lifecycle;
+import org.eclipse.net4j.protocol.IProtocol;
+
+import org.eclipse.internal.net4j.channel.Channel;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class Protocol extends Lifecycle implements IProtocol, IBufferProvider
+{
+ private Channel channel;
+
+ private Object infraStructure;
+
+ public Protocol()
+ {
+ }
+
+ public Channel getChannel()
+ {
+ return channel;
+ }
+
+ public void setChannel(IChannel channel)
+ {
+ this.channel = (Channel)channel;
+ }
+
+ public Object getInfraStructure()
+ {
+ return infraStructure;
+ }
+
+ public void setInfraStructure(Object infraStructure)
+ {
+ this.infraStructure = infraStructure;
+ }
+
+ public short getBufferCapacity()
+ {
+ return Net4jUtil.getBufferProvider(channel).getBufferCapacity();
+ }
+
+ public IBuffer provideBuffer()
+ {
+ return Net4jUtil.getBufferProvider(channel).provideBuffer();
+ }
+
+ public void retainBuffer(IBuffer buffer)
+ {
+ Net4jUtil.getBufferProvider(channel).retainBuffer(buffer);
+ }
+
+ @Override
+ protected void doBeforeActivate() throws Exception
+ {
+ super.doBeforeActivate();
+ if (channel == null)
+ {
+ throw new IllegalStateException("channel == null");
+ }
+ }
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ channel = null;
+ super.doDeactivate();
+ }
+}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/ServerProtocolFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/ServerProtocolFactory.java
new file mode 100644
index 0000000..575e35b
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/ServerProtocolFactory.java
@@ -0,0 +1,26 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * 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.internal.net4j.protocol;
+
+import org.eclipse.net4j.internal.util.factory.Factory;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class ServerProtocolFactory extends Factory
+{
+ public static final String PRODUCT_GROUP = "org.eclipse.net4j.serverProtocols";
+
+ public ServerProtocolFactory(String type)
+ {
+ super(PRODUCT_GROUP, type);
+ }
+}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/Net4jUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/Net4jUtil.java
index 4489a7d..948d51e 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/Net4jUtil.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/Net4jUtil.java
@@ -18,13 +18,13 @@ import org.eclipse.net4j.internal.util.security.RandomizerFactory;
import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.internal.net4j.AcceptorFactory;
-import org.eclipse.internal.net4j.BufferFactory;
-import org.eclipse.internal.net4j.BufferPool;
-import org.eclipse.internal.net4j.BufferProviderFactory;
-import org.eclipse.internal.net4j.ConnectorFactory;
import org.eclipse.internal.net4j.ExecutorServiceFactory;
import org.eclipse.internal.net4j.Net4jTransportInjector;
+import org.eclipse.internal.net4j.acceptor.AcceptorFactory;
+import org.eclipse.internal.net4j.buffer.BufferFactory;
+import org.eclipse.internal.net4j.buffer.BufferPool;
+import org.eclipse.internal.net4j.buffer.BufferProviderFactory;
+import org.eclipse.internal.net4j.connector.ConnectorFactory;
import java.util.concurrent.ExecutorService;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/acceptor/IAcceptor.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/acceptor/IAcceptor.java
index f42827a..e974dec 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/acceptor/IAcceptor.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/acceptor/IAcceptor.java
@@ -18,7 +18,7 @@ import org.eclipse.net4j.util.factory.IFactory;
import org.eclipse.net4j.util.factory.IFactoryKey;
import org.eclipse.net4j.util.registry.IRegistry;
-import org.eclipse.internal.net4j.Acceptor;
+import org.eclipse.internal.net4j.acceptor.Acceptor;
import java.util.List;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/IBuffer.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/IBuffer.java
index 9034639..60ecc20 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/IBuffer.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/buffer/IBuffer.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.buffer;
import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.internal.net4j.Buffer;
+import org.eclipse.internal.net4j.buffer.Buffer;
import java.io.IOException;
import java.nio.ByteBuffer;
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 b5af42f..c85d71c 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
@@ -32,8 +32,8 @@ import java.util.List;
* exchange {@link IBuffer}s.
* <p>
* This interface is <b>not</b> intended to be implemented by clients. Providers of connectors for new physical
- * connection types have to subclass {@link org.eclipse.internal.net4j.Connector Connector} (see
- * {@link org.eclipse.internal.net4j.Channel#setConnector(org.eclipse.internal.net4j.Connector) Channel#setConnector}).
+ * connection types have to subclass {@link org.eclipse.internal.net4j.connector.Connector Connector} (see
+ * {@link org.eclipse.internal.net4j.channel.Channel#setConnector(org.eclipse.internal.net4j.connector.Connector) Channel#setConnector}).
* <p>
* <dt><b>Class Diagram:</b></dt>
* <dd><img src="doc-files/Connectors.png" title="Diagram Connectors" border="0" usemap="Connectors.png"/></dd>
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 d7e7e56..673c149 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
@@ -18,8 +18,8 @@ import org.eclipse.net4j.stream.ChannelOutputStream;
import org.eclipse.net4j.util.io.IStreamWrapper;
import org.eclipse.net4j.util.io.StreamWrapperChain;
-import org.eclipse.internal.net4j.Protocol;
import org.eclipse.internal.net4j.bundle.OM;
+import org.eclipse.internal.net4j.protocol.Protocol;
import java.io.IOException;
import java.io.InputStream;