summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-29 11:50:49 (EST)
committerEike Stepper2007-12-29 11:50:49 (EST)
commita42e4288cc0ae0da880dd20e363fa3d04b285428 (patch)
tree18e3955ebbadad3ba93356d1b577db2032ccf8cc
parentec3ee7b4e2488560500631522d08edc411fb9ab1 (diff)
downloadcdo-a42e4288cc0ae0da880dd20e363fa3d04b285428.zip
cdo-a42e4288cc0ae0da880dd20e363fa3d04b285428.tar.gz
cdo-a42e4288cc0ae0da880dd20e363fa3d04b285428.tar.bz2
[213782] Transaction DeadLock
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213782
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ChannelInjector.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java4
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java2
-rw-r--r--plugins/org.eclipse.net4j/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.net4j/plugin.xml2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jConfigurator.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jTransportInjector.java5
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Protocol.java84
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ServerProtocolFactory.java26
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/Acceptor.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Acceptor.java)3
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/AcceptorFactory.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/AcceptorFactory.java)2
-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/Buffer.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Buffer.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferFactory.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferFactory.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferPool.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferPool.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferProvider.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferProvider.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferProviderFactory.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferProviderFactory.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferUtil.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferUtil.java)2
-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/Channel.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Channel.java)3
-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/Connector.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java)5
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/ConnectorFactory.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ConnectorFactory.java)2
-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/ClientProtocolFactory.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ClientProtocolFactory.java)2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/DescriptionUtil.java59
32 files changed, 336 insertions, 133 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocolFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocolFactory.java
index d0b68bd..ff79bfb 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocolFactory.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/protocol/CDOClientProtocolFactory.java
@@ -14,7 +14,7 @@ import org.eclipse.emf.cdo.protocol.CDOProtocolConstants;
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.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ChannelInjector.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ChannelInjector.java
index 8af4f75..f958675 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ChannelInjector.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/ChannelInjector.java
@@ -17,7 +17,7 @@ import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.container.IElementProcessor;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.internal.net4j.ConnectorFactory;
+import org.eclipse.internal.net4j.connector.ConnectorFactory;
import org.eclipse.emf.common.util.URI;
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientProtocolFactory.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientProtocolFactory.java
index 385753c..23cb313 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/ClientProtocolFactory.java
@@ -16,7 +16,7 @@ import org.eclipse.net4j.util.container.IManagedContainer;
/**
* @author Eike Stepper
*/
-public final class ClientProtocolFactory extends org.eclipse.internal.net4j.ClientProtocolFactory
+public final class ClientProtocolFactory extends org.eclipse.internal.net4j.protocol.ClientProtocolFactory
{
public static final String TYPE = ProtocolConstants.PROTOCOL_NAME;
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java
index ad74c29..ba59016 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java
@@ -17,8 +17,8 @@ import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.tests.AbstractOMTest;
-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.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java
index 1815b46..ed8c9f2 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.tests;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import org.eclipse.internal.net4j.ClientProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ClientProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java
index fe2129d..6a5495e 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.tests;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import org.eclipse.internal.net4j.ServerProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
import java.util.concurrent.CountDownLatch;
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java
index 0975c64..b165acc 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java
@@ -13,7 +13,7 @@ package org.eclipse.net4j.tests;
import org.eclipse.net4j.buffer.IBuffer;
import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.internal.net4j.Protocol;
+import org.eclipse.internal.net4j.protocol.Protocol;
import java.util.concurrent.CountDownLatch;
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java
index a130220..0613e6a 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.tests.signal;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import org.eclipse.internal.net4j.ClientProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ClientProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java
index b35126c..c5a908c 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.tests.signal;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import org.eclipse.internal.net4j.ServerProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
/**
* @author Eike Stepper
diff --git a/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
index 582b536..a05b907 100644
--- a/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
@@ -11,6 +11,12 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
org.eclipse.net4j.util;bundle-version="[0.8.0,0.9.0)";visibility:=reexport
Export-Package: org.eclipse.internal.net4j;version="0.8.0",
+ org.eclipse.internal.net4j.acceptor;version="0.8.0",
+ org.eclipse.internal.net4j.buffer;version="0.8.0",
+ org.eclipse.internal.net4j.bundle;version="0.8.0";x-internal:=true,
+ org.eclipse.internal.net4j.channel;version="0.8.0",
+ org.eclipse.internal.net4j.connector;version="0.8.0",
+ org.eclipse.internal.net4j.protocol;version="0.8.0",
org.eclipse.net4j;version="0.8.0",
org.eclipse.net4j.acceptor;version="0.8.0",
org.eclipse.net4j.buffer;version="0.8.0",
diff --git a/plugins/org.eclipse.net4j/plugin.xml b/plugins/org.eclipse.net4j/plugin.xml
index c9607fe..e433671 100644
--- a/plugins/org.eclipse.net4j/plugin.xml
+++ b/plugins/org.eclipse.net4j/plugin.xml
@@ -24,7 +24,7 @@
productGroup="org.eclipse.net4j.executorServices"
type="default"/>
<factory
- class="org.eclipse.internal.net4j.BufferProviderFactory"
+ class="org.eclipse.internal.net4j.buffer.BufferProviderFactory"
productGroup="org.eclipse.net4j.bufferProviders"
type="default"/>
</extension>
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jConfigurator.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jConfigurator.java
index 5f1abdb..5413a39 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jConfigurator.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jConfigurator.java
@@ -16,6 +16,8 @@ import org.eclipse.net4j.internal.util.security.NegotiatorFactory;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.security.INegotiator;
+import org.eclipse.internal.net4j.acceptor.Acceptor;
+import org.eclipse.internal.net4j.acceptor.AcceptorFactory;
import org.eclipse.internal.net4j.bundle.OM;
import org.eclipse.core.runtime.CoreException;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jTransportInjector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jTransportInjector.java
index c1d87c0..de0d2d3 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jTransportInjector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Net4jTransportInjector.java
@@ -14,6 +14,11 @@ import org.eclipse.net4j.util.container.IElementProcessor;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.security.INegotiator;
+import org.eclipse.internal.net4j.acceptor.Acceptor;
+import org.eclipse.internal.net4j.buffer.BufferProvider;
+import org.eclipse.internal.net4j.buffer.BufferProviderFactory;
+import org.eclipse.internal.net4j.connector.Connector;
+
import java.util.concurrent.ExecutorService;
/**
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Protocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Protocol.java
deleted file mode 100644
index 94acf5e..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Protocol.java
+++ /dev/null
@@ -1,84 +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;
-
-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;
-
-/**
- * @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/ServerProtocolFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ServerProtocolFactory.java
deleted file mode 100644
index fa87a1c..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ServerProtocolFactory.java
+++ /dev/null
@@ -1,26 +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;
-
-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/internal/net4j/Acceptor.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/Acceptor.java
index 8c58597..088d754 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Acceptor.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/Acceptor.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.acceptor;
import org.eclipse.net4j.acceptor.IAcceptor;
import org.eclipse.net4j.buffer.IBufferProvider;
@@ -28,6 +28,7 @@ import org.eclipse.net4j.util.registry.IRegistry;
import org.eclipse.net4j.util.security.INegotiator;
import org.eclipse.internal.net4j.bundle.OM;
+import org.eclipse.internal.net4j.connector.Connector;
import java.util.HashSet;
import java.util.List;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/AcceptorFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/AcceptorFactory.java
index 2195889..7d95c9c 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/AcceptorFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/AcceptorFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.acceptor;
import org.eclipse.net4j.internal.util.factory.Factory;
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
new file mode 100644
index 0000000..89e2b93
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/acceptor/DescriptionUtil.java
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * 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.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/Buffer.java
index 385470d..67084b4 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Buffer.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/Buffer.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.buffer;
import org.eclipse.net4j.buffer.BufferState;
import org.eclipse.net4j.buffer.IBuffer;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferFactory.java
index 9e87cb3..f0844da 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.buffer;
import org.eclipse.net4j.buffer.IBuffer;
import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferPool.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferPool.java
index ec39b94..a8c2387 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferPool.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferPool.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.buffer;
import org.eclipse.net4j.buffer.IBuffer;
import org.eclipse.net4j.buffer.IBufferPool;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferProvider.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferProvider.java
index 51a9bef..7a9f2c6 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferProvider.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.buffer;
import org.eclipse.net4j.buffer.IBuffer;
import org.eclipse.net4j.buffer.IBufferProvider;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferProviderFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferProviderFactory.java
index d24fe3f..f7b16d9 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferProviderFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferProviderFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.buffer;
import org.eclipse.net4j.Net4jUtil;
import org.eclipse.net4j.buffer.IBufferProvider;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferUtil.java
index 977c619..0f432ef 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/BufferUtil.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/BufferUtil.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.buffer;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
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
new file mode 100644
index 0000000..256d521
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/buffer/DescriptionUtil.java
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * 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.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/channel/Channel.java
index 96472cf..d549835 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Channel.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/channel/Channel.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.channel;
import org.eclipse.net4j.buffer.BufferState;
import org.eclipse.net4j.buffer.IBuffer;
@@ -23,6 +23,7 @@ import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.concurrent.IWorkSerializer;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.internal.net4j.buffer.Buffer;
import org.eclipse.internal.net4j.bundle.OM;
import java.text.MessageFormat;
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
new file mode 100644
index 0000000..6e00ce5
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/channel/DescriptionUtil.java
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * 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.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/Connector.java
index 7e9f589..7b149f2 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Connector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/Connector.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.connector;
import org.eclipse.net4j.buffer.IBuffer;
import org.eclipse.net4j.buffer.IBufferProvider;
@@ -43,6 +43,9 @@ import org.eclipse.net4j.util.security.INegotiationContext;
import org.eclipse.net4j.util.security.INegotiator;
import org.eclipse.internal.net4j.bundle.OM;
+import org.eclipse.internal.net4j.channel.Channel;
+import org.eclipse.internal.net4j.protocol.ClientProtocolFactory;
+import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
import java.text.MessageFormat;
import java.util.ArrayList;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ConnectorFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/ConnectorFactory.java
index e719a8c..909099a 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ConnectorFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/ConnectorFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.connector;
import org.eclipse.net4j.internal.util.factory.Factory;
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
new file mode 100644
index 0000000..1d5a4a2
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/connector/DescriptionUtil.java
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * 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/ClientProtocolFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/ClientProtocolFactory.java
index 957541b..792d424 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/ClientProtocolFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/ClientProtocolFactory.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j;
+package org.eclipse.internal.net4j.protocol;
import org.eclipse.net4j.internal.util.factory.Factory;
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
new file mode 100644
index 0000000..7c5a192
--- /dev/null
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/protocol/DescriptionUtil.java
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * 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();
+ }
+}