summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-03-11 05:21:18 (EDT)
committerEike Stepper2007-03-11 05:21:18 (EDT)
commitcea0aabf741f56cd306f07e9380a2860467d4d29 (patch)
tree447aff144c863a71b6b32c85dd05b319def27ede
parent74807bd2c88bbc9b7f99272f9a6faff39b5b1fd0 (diff)
downloadcdo-cea0aabf741f56cd306f07e9380a2860467d4d29.zip
cdo-cea0aabf741f56cd306f07e9380a2860467d4d29.tar.gz
cdo-cea0aabf741f56cd306f07e9380a2860467d4d29.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j/.classpath2
-rw-r--r--plugins/org.eclipse.net4j/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Acceptor.java8
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Connector.java8
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Protocol.java3
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/factory/Factory.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/product/ProductFactory.java)11
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/product/ProductGroup.java53
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptor.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IConnector.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IProtocol.java2
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/FactoryUtil.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/ProductUtil.java)18
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/IFactory.java (renamed from plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProductFactory.java)8
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProduct.java23
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProductGroup.java23
14 files changed, 25 insertions, 146 deletions
diff --git a/plugins/org.eclipse.net4j/.classpath b/plugins/org.eclipse.net4j/.classpath
index ec568ce..c769157 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" kind="src" path="src"/>
+ <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="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/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
index b1cbfbc..3edb1de 100644
--- a/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j/META-INF/MANIFEST.MF
@@ -17,9 +17,9 @@ Export-Package: org.eclipse.internal.net4j.bundle;version="0.8.0",
org.eclipse.internal.net4j.util.concurrent;version="0.8.0",
org.eclipse.internal.net4j.util.container;version="0.8.0",
org.eclipse.internal.net4j.util.event;version="0.8.0",
+ org.eclipse.internal.net4j.util.factory;version="0.8.0",
org.eclipse.internal.net4j.util.lifecycle;version="0.8.0",
org.eclipse.internal.net4j.util.om;version="0.8.0",
- org.eclipse.internal.net4j.util.product;version="0.8.0",
org.eclipse.internal.net4j.util.registry;version="0.8.0",
org.eclipse.net4j;version="0.8.0",
org.eclipse.net4j.message;version="0.8.0",
@@ -32,11 +32,11 @@ Export-Package: org.eclipse.internal.net4j.bundle;version="0.8.0",
org.eclipse.net4j.util.concurrent;version="0.8.0",
org.eclipse.net4j.util.container;version="0.8.0",
org.eclipse.net4j.util.event;version="0.8.0",
+ org.eclipse.net4j.util.factory;version="0.8.0",
org.eclipse.net4j.util.lifecycle;version="0.8.0",
org.eclipse.net4j.util.om;version="0.8.0",
org.eclipse.net4j.util.om.log;version="0.8.0",
org.eclipse.net4j.util.om.trace;version="0.8.0",
- org.eclipse.net4j.util.product;version="0.8.0",
org.eclipse.net4j.util.registry;version="0.8.0",
org.eclipse.net4j.util.stream;version="0.8.0"
Eclipse-LazyStart: true
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 ff666f8..b8a815e 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
@@ -22,7 +22,6 @@ import org.eclipse.net4j.util.event.INotifier;
import org.eclipse.net4j.util.lifecycle.ILifecycleEvent;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.om.trace.ContextTracer;
-import org.eclipse.net4j.util.product.IProduct;
import org.eclipse.net4j.util.registry.IRegistry;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -37,7 +36,7 @@ import java.util.concurrent.ExecutorService;
/**
* @author Eike Stepper
*/
-public abstract class Acceptor extends Lifecycle implements IAcceptor, IContainer<IConnector>, IProduct
+public abstract class Acceptor extends Lifecycle implements IAcceptor, IContainer<IConnector>
{
private static final ContextTracer TRACER = new ContextTracer(Net4j.DEBUG_ACCEPTOR, Acceptor.class);
@@ -65,11 +64,6 @@ public abstract class Acceptor extends Lifecycle implements IAcceptor, IContaine
{
}
- public String getProductGroupID()
- {
- return PRODUCT_GROUP_ID;
- }
-
public String getDescription()
{
return description;
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 b083da5..43fbd4e 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
@@ -27,7 +27,6 @@ import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.event.INotifier;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.om.trace.ContextTracer;
-import org.eclipse.net4j.util.product.IProduct;
import org.eclipse.net4j.util.registry.IRegistry;
import org.eclipse.internal.net4j.bundle.Net4j;
@@ -45,7 +44,7 @@ import java.util.concurrent.TimeUnit;
/**
* @author Eike Stepper
*/
-public abstract class Connector extends Lifecycle implements IConnector, IContainer<IChannel>, IProduct
+public abstract class Connector extends Lifecycle implements IConnector, IContainer<IChannel>
{
private static final ContextTracer TRACER = new ContextTracer(Net4j.DEBUG_CONNECTOR, Connector.class);
@@ -150,11 +149,6 @@ public abstract class Connector extends Lifecycle implements IConnector, IContai
return userID;
}
- public String getProductGroupID()
- {
- return PRODUCT_GROUP_ID;
- }
-
public ConnectorLocation getLocation()
{
return null;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Protocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Protocol.java
index 40bb3d0..7fd4fa3 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Protocol.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/transport/Protocol.java
@@ -14,14 +14,13 @@ import org.eclipse.net4j.transport.IBuffer;
import org.eclipse.net4j.transport.IBufferProvider;
import org.eclipse.net4j.transport.IChannel;
import org.eclipse.net4j.transport.IProtocol;
-import org.eclipse.net4j.util.product.IProduct;
import org.eclipse.internal.net4j.util.lifecycle.Lifecycle;
/**
* @author Eike Stepper
*/
-public abstract class Protocol extends Lifecycle implements IProtocol, IBufferProvider, IProduct
+public abstract class Protocol extends Lifecycle implements IProtocol, IBufferProvider
{
private IChannel channel;
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/product/ProductFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/factory/Factory.java
index 9995e5b..94b25ba 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/product/ProductFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/factory/Factory.java
@@ -8,27 +8,26 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.internal.net4j.util.product;
+package org.eclipse.internal.net4j.util.factory;
-import org.eclipse.net4j.util.product.IProduct;
-import org.eclipse.net4j.util.product.IProductFactory;
+import org.eclipse.net4j.util.factory.IFactory;
/**
* @author Eike Stepper
*/
-public abstract class ProductFactory<PRODUCT extends IProduct> implements IProductFactory<PRODUCT>
+public abstract class Factory<PRODUCT> implements IFactory<PRODUCT>
{
private String productGroupID;
private String type;
- public ProductFactory(String productGroupID, String type)
+ public Factory(String productGroupID, String type)
{
this.productGroupID = productGroupID;
this.type = type;
}
- public String getProductGroupID()
+ public String getProductGroup()
{
return productGroupID;
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/product/ProductGroup.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/product/ProductGroup.java
deleted file mode 100644
index 8d641f7..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/util/product/ProductGroup.java
+++ /dev/null
@@ -1,53 +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.internal.net4j.util.product;
-
-import org.eclipse.net4j.util.product.IProduct;
-import org.eclipse.net4j.util.product.IProductFactory;
-import org.eclipse.net4j.util.product.IProductGroup;
-import org.eclipse.net4j.util.registry.IRegistry;
-
-import org.eclipse.internal.net4j.util.registry.HashMapRegistry;
-
-/**
- * @author Eike Stepper
- */
-public class ProductGroup<PRODUCT extends IProduct> implements IProductGroup<PRODUCT>
-{
- private String id;
-
- private IRegistry<String, IProductFactory<PRODUCT>> factoryRegistry = new HashMapRegistry();
-
- public ProductGroup(String id)
- {
- this.id = id;
- }
-
- public String getID()
- {
- return id;
- }
-
- public IRegistry<String, IProductFactory<PRODUCT>> getFactoryRegistry()
- {
- return factoryRegistry;
- }
-
- public void addFactory(IProductFactory<PRODUCT> factory)
- {
- factoryRegistry.put(factory.getType(), factory);
- }
-
- public void removeFactory(IProductFactory<PRODUCT> factory)
- {
- factoryRegistry.remove(factory.getType());
- }
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptor.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptor.java
index 0b858c3..7aa19b3 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptor.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IAcceptor.java
@@ -17,9 +17,5 @@ import org.eclipse.net4j.util.event.INotifier;
*/
public interface IAcceptor extends INotifier
{
- public static final String PRODUCT_GROUP_ID = "org.eclipse.net4j.acceptor";
-
- public String getDescription();
-
public IConnector[] getAcceptedConnectors();
}
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 1a9d15d..7446bf7 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 static final String PRODUCT_GROUP_ID = "org.eclipse.net4j.connector";
-
public Integer getID();
public ConnectorLocation getLocation();
@@ -43,8 +41,6 @@ public interface IConnector extends INotifier
public boolean isServer();
- public String getDescription();
-
public String getUserID();
public IConnectorCredentials getCredentials();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IProtocol.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IProtocol.java
index 87e1758..a1eebd7 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IProtocol.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/transport/IProtocol.java
@@ -15,8 +15,6 @@ package org.eclipse.net4j.transport;
*/
public interface IProtocol extends IBufferHandler
{
- public static final String PRODUCT_GROUP_ID = "org.eclipse.net4j.protocol";
-
public String getProtocolID();
public IChannel getChannel();
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/ProductUtil.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/FactoryUtil.java
index 87f5ed3..9ddc47f 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/ProductUtil.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/FactoryUtil.java
@@ -8,24 +8,24 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.product;
+package org.eclipse.net4j.util.factory;
import org.eclipse.net4j.util.registry.IRegistry;
/**
* @author Eike Stepper
*/
-public final class ProductUtil
+public final class FactoryUtil
{
- private ProductUtil()
+ private FactoryUtil()
{
}
- public static String getProductGroupID(Object product)
+ public static String getProductGroup(Object product)
{
if (product instanceof IProduct)
{
- return ((IProduct)product).getProductGroupID();
+ return ((IProduct)product).getProductGroup();
}
return null;
@@ -60,14 +60,14 @@ public final class ProductUtil
return null;
}
- IRegistry<String, IProductFactory> factoryRegistry = productGroup.getFactoryRegistry();
- IProductFactory productFactory = factoryRegistry.get(factoryType);
- if (productFactory == null)
+ IRegistry<String, IFactory> factoryRegistry = productGroup.getFactoryRegistry();
+ IFactory factory = factoryRegistry.get(factoryType);
+ if (factory == null)
{
return null;
}
- IProduct product = productFactory.create(description);
+ IProduct product = factory.create(description);
return product;
}
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProductFactory.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/IFactory.java
index 5f6fa40..92b752d 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProductFactory.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/factory/IFactory.java
@@ -8,16 +8,18 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.product;
+package org.eclipse.net4j.util.factory;
/**
* @author Eike Stepper
*/
-public interface IProductFactory<PRODUCT extends IProduct>
+public interface IFactory<PRODUCT>
{
- public String getProductGroupID();
+ public String getProductGroup();
public String getType();
public PRODUCT create(String description);
+
+ public String getDescriptionFor(PRODUCT product);
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProduct.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProduct.java
deleted file mode 100644
index c28fac5..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProduct.java
+++ /dev/null
@@ -1,23 +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.product;
-
-/**
- * @author Eike Stepper
- */
-public interface IProduct
-{
- public String getProductGroupID();
-
- public String getFactoryType();
-
- public String getDescription();
-}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProductGroup.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProductGroup.java
deleted file mode 100644
index 1be815b..0000000
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/util/product/IProductGroup.java
+++ /dev/null
@@ -1,23 +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.product;
-
-import org.eclipse.net4j.util.registry.IRegistry;
-
-/**
- * @author Eike Stepper
- */
-public interface IProductGroup<PRODUCT extends IProduct>
-{
- public String getID();
-
- public IRegistry<String, IProductFactory<PRODUCT>> getFactoryRegistry();
-}