summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-03-11 11:24:07 (EDT)
committerEike Stepper2007-03-11 11:24:07 (EDT)
commit6a5abbb4a6b5ee645d8cddf723edd1f1cfa77286 (patch)
tree1542e5726e90ea19fdf8b621d07338df5bfc019f
parent843ed0827ae3be04973549c3c6760c4da3871694 (diff)
downloadcdo-6a5abbb4a6b5ee645d8cddf723edd1f1cfa77286.zip
cdo-6a5abbb4a6b5ee645d8cddf723edd1f1cfa77286.tar.gz
cdo-6a5abbb4a6b5ee645d8cddf723edd1f1cfa77286.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j/.classpath2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Acceptor.java12
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Connector.java57
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptorFactory.java21
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnector.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnectorFactory.java21
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/FactoryUtil.java73
7 files changed, 5 insertions, 183 deletions
diff --git a/plugins/org.eclipse.net4j/.classpath b/plugins/org.eclipse.net4j/.classpath
index c769157..304e861 100644
--- a/plugins/org.eclipse.net4j/.classpath
+++ b/plugins/org.eclipse.net4j/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry excluding="org/eclipse/internal/net4j/component/InactiveException.java|org/eclipse/net4j/transport/ChannelMultiplexer.java|org/eclipse/net4j/util/registry/delegating/AbstractCachingRegistry.java|org/eclipse/net4j/util/registry/delegating/DelegatingRegistry.java|org/eclipse/net4j/util/registry/delegating/HashCacheRegistry.java|org/eclipse/net4j/transport/tcp/TCPConnector.java|org/eclipse/internal/net4j/transport/ClientProtocolFactoryRegistry.java|org/eclipse/internal/net4j/transport/ServerProtocolFactoryRegistry.java|org/eclipse/net4j/util/registry/IRegistryListener.java|org/eclipse/net4j/util/lifecycle/LifecycleListener.java|org/eclipse/net4j/util/lifecycle/LifecycleNotifier.java|org/eclipse/net4j/util/lifecycle/LifecycleAdapter.java|org/eclipse/net4j/util/registry/IRegistryDelta.java|org/eclipse/net4j/util/registry/IRegistryEvent.java|org/eclipse/net4j/util/registry/IRegistryEventVisitor.java|org/eclipse/net4j/util/lifecycle/Activator.java|org/eclipse/net4j/util/lifecycle/Deactivator.java|org/eclipse/net4j/util/product/IProduct.java|org/eclipse/net4j/util/product/IProductGroup.java|org/eclipse/net4j/util/factory/FactoryUtil.java" kind="src" path="src"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Acceptor.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Acceptor.java
index b8a815e..b58c6ae 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Acceptor.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Acceptor.java
@@ -40,8 +40,6 @@ public abstract class Acceptor extends Lifecycle implements IAcceptor, IContaine
{
private static final ContextTracer TRACER = new ContextTracer(Net4j.DEBUG_ACCEPTOR, Acceptor.class);
- private String description;
-
private IBufferProvider bufferProvider;
private IRegistry<IProtocolFactoryID, IProtocolFactory> protocolFactoryRegistry;
@@ -64,16 +62,6 @@ public abstract class Acceptor extends Lifecycle implements IAcceptor, IContaine
{
}
- public String getDescription()
- {
- return description;
- }
-
- public void setDescription(String description)
- {
- this.description = description;
- }
-
public IBufferProvider getBufferProvider()
{
return bufferProvider;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Connector.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Connector.java
index 43fbd4e..c6fd504 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Connector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Connector.java
@@ -50,18 +50,8 @@ public abstract class Connector extends Lifecycle implements IConnector, IContai
private static final Channel NULL_CHANNEL = new NullChannel();
- private static final int MIN_CONNECTOR_ID = 1;
-
- private static final int MAX_CONNECTOR_ID = Integer.MAX_VALUE;
-
- private static int nextConnectorID = MIN_CONNECTOR_ID;
-
- private int connectorID = getNextConnectorID();
-
private String userID;
- private String description;
-
private IConnectorCredentials credentials;
private IRegistry<IProtocolFactoryID, IProtocolFactory> protocolFactoryRegistry;
@@ -97,11 +87,6 @@ public abstract class Connector extends Lifecycle implements IConnector, IContai
{
}
- public Integer getID()
- {
- return connectorID;
- }
-
public abstract void multiplexBuffer(IChannel channel);
public ExecutorService getReceiveExecutor()
@@ -149,19 +134,14 @@ public abstract class Connector extends Lifecycle implements IConnector, IContai
return userID;
}
- public ConnectorLocation getLocation()
- {
- return null;
- }
-
- public String getDescription()
+ public void setUserID(String userID)
{
- return description;
+ this.userID = userID;
}
- public void setDescription(String description)
+ public ConnectorLocation getLocation()
{
- this.description = description;
+ return null;
}
public IConnectorCredentials getCredentials()
@@ -478,15 +458,6 @@ public abstract class Connector extends Lifecycle implements IConnector, IContai
protected void doBeforeActivate() throws Exception
{
super.doBeforeActivate();
- if (description == null)
- {
- throw new IllegalStateException("description == null"); //$NON-NLS-1$
- }
- else
- {
- userID = DescriptionUtil.getElement(description, 1);
- }
-
if (bufferProvider == null)
{
throw new IllegalStateException("bufferProvider == null"); //$NON-NLS-1$
@@ -531,26 +502,6 @@ public abstract class Connector extends Lifecycle implements IConnector, IContai
protected abstract void registerChannelWithPeer(short channelIndex, String protocolID) throws ConnectorException;
- private static int getNextConnectorID()
- {
- int id = nextConnectorID;
- if (nextConnectorID == MAX_CONNECTOR_ID)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("ID wrap around"); //$NON-NLS-1$
- }
-
- nextConnectorID = MIN_CONNECTOR_ID;
- }
- else
- {
- ++nextConnectorID;
- }
-
- return id;
- }
-
/**
* @author Eike Stepper
*/
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptorFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptorFactory.java
deleted file mode 100644
index 9985c9a..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptorFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004-2007 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.net4j.transport;
-
-/**
- * @author Eike Stepper
- */
-public interface IAcceptorFactory
-{
- public String getType();
-
- public IAcceptor createAcceptor();
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnector.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnector.java
index 7446bf7..88b4722 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnector.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnector.java
@@ -33,8 +33,6 @@ import org.eclipse.internal.net4j.transport.Connector;
*/
public interface IConnector extends INotifier
{
- public Integer getID();
-
public ConnectorLocation getLocation();
public boolean isClient();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnectorFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnectorFactory.java
deleted file mode 100644
index 705b5e0..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnectorFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004-2007 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.net4j.transport;
-
-/**
- * @author Eike Stepper
- */
-public interface IConnectorFactory
-{
- public String getType();
-
- public IConnector createConnector();
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/FactoryUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/FactoryUtil.java
deleted file mode 100644
index 9ddc47f..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/FactoryUtil.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004-2007 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.net4j.util.factory;
-
-import org.eclipse.net4j.util.registry.IRegistry;
-
-/**
- * @author Eike Stepper
- */
-public final class FactoryUtil
-{
- private FactoryUtil()
- {
- }
-
- public static String getProductGroup(Object product)
- {
- if (product instanceof IProduct)
- {
- return ((IProduct)product).getProductGroup();
- }
-
- return null;
- }
-
- public static String getFactoryType(Object product)
- {
- if (product instanceof IProduct)
- {
- return ((IProduct)product).getFactoryType();
- }
-
- return null;
- }
-
- public static String getDescription(Object product)
- {
- if (product instanceof IProduct)
- {
- return ((IProduct)product).getDescription();
- }
-
- return null;
- }
-
- public static IProduct create(IRegistry<String, IProductGroup> productGroupRegistry, String productGroupID,
- String factoryType, String description)
- {
- IProductGroup productGroup = productGroupRegistry.get(productGroupID);
- if (productGroup == null)
- {
- return null;
- }
-
- IRegistry<String, IFactory> factoryRegistry = productGroup.getFactoryRegistry();
- IFactory factory = factoryRegistry.get(factoryType);
- if (factory == null)
- {
- return null;
- }
-
- IProduct product = factory.create(description);
- return product;
- }
-}