diff options
| author | slewis | 2004-12-29 06:40:18 +0000 |
|---|---|---|
| committer | slewis | 2004-12-29 06:40:18 +0000 |
| commit | 78e0981466e30e04369bb909a1cf8aefa14a3ce9 (patch) | |
| tree | 3eb03d2d2bf6ffa16d5f18dec11f28566c931128 | |
| parent | 03f502065a3a8d285af1e0d0bbad312a5f3f5a0c (diff) | |
| download | org.eclipse.ecf-78e0981466e30e04369bb909a1cf8aefa14a3ce9.tar.gz org.eclipse.ecf-78e0981466e30e04369bb909a1cf8aefa14a3ce9.tar.xz org.eclipse.ecf-78e0981466e30e04369bb909a1cf8aefa14a3ce9.zip | |
*** empty log message ***
42 files changed, 508 insertions, 288 deletions
diff --git a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF index 62e81e5c2..800dac07d 100644 --- a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF +++ b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF @@ -1,16 +1,17 @@ Manifest-Version: 1.0 -Bundle-Name: Eclipse Communications Framework (ECF) +Bundle-Name: ECF - Eclipse Communications Framework Bundle-SymbolicName: org.eclipse.ecf Bundle-Version: 0.1.0 Bundle-ClassPath: ecf.jar Bundle-Activator: org.eclipse.ecf.internal.core.ECFPlugin Bundle-Vendor: Eclipse.org Bundle-Localization: plugin -Require-Bundle: org.eclipse.core.runtime Eclipse-AutoStart: true Provide-Package: org.eclipse.ecf.core, org.eclipse.ecf.core.events, org.eclipse.ecf.core.identity, org.eclipse.ecf.core.identity.provider, org.eclipse.ecf.core.provider, + org.eclipse.ecf.core.comm, + org.eclipse.ecf.core.comm.provider, org.eclipse.ecf.core.util diff --git a/framework/bundles/org.eclipse.ecf/plugin.xml b/framework/bundles/org.eclipse.ecf/plugin.xml index 7be7c7edf..35abec8a1 100644 --- a/framework/bundles/org.eclipse.ecf/plugin.xml +++ b/framework/bundles/org.eclipse.ecf/plugin.xml @@ -3,6 +3,7 @@ <plugin> <extension-point id="containerFactory" name="ECF Container Factory" schema="schema/containerFactory.exsd"/> <extension-point id="namespace" name="ECF Namespace" schema="schema/namespace.exsd"/> + <extension-point id="comm" name="ECF Connection Factory" schema="schema/comm.exsd"/> <extension point="org.eclipse.ecf.containerFactory"> <containerFactory @@ -10,4 +11,5 @@ description="standalone container implementation for testing" name="standalone"/> </extension> + </plugin> diff --git a/framework/bundles/org.eclipse.ecf/schema/comm.exsd b/framework/bundles/org.eclipse.ecf/schema/comm.exsd new file mode 100644 index 000000000..d3db968d0 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/schema/comm.exsd @@ -0,0 +1,113 @@ +<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ecf">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.ecf" id="comm" name="ECF Connection Factory"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="connection"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="connection">
+ <complexType>
+ <attribute name="instantiatorClass" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/SharedObjectContainerDescription.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/SharedObjectContainerDescription.java index fae04e44e..af33652ee 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/SharedObjectContainerDescription.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/SharedObjectContainerDescription.java @@ -62,15 +62,13 @@ public class SharedObjectContainerDescription { } public String toString() { - StringBuffer b = new StringBuffer("SharedObjectContainerDescription {"); + StringBuffer b = new StringBuffer("SharedObjectContainerDescription["); b.append("name: ").append(name).append(", "); if (instantiator == null) b.append("instantiatorClass: ").append(instantiatorClass).append(", "); else b.append("instantiator: ").append(instantiator).append(", "); - - b.append("classLoader: ").append(classLoader).append(", "); - b.append("description: ").append(description).append("}"); + b.append("description: ").append(description).append("]"); return b.toString(); } diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/AsynchConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/AsynchConnectionEvent.java new file mode 100644 index 000000000..4fa4907bf --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/AsynchConnectionEvent.java @@ -0,0 +1,7 @@ +package org.eclipse.ecf.core.comm; + +public class AsynchConnectionEvent extends ConnectionEvent { + public AsynchConnectionEvent(IAsynchConnection conn, Object data) { + super(conn, data); + } +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionDescription.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionDescription.java index f24d9690d..7d1d39786 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionDescription.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionDescription.java @@ -1,17 +1,20 @@ -package org.eclipse.ecf.internal.comm; +package org.eclipse.ecf.core.comm; + +import org.eclipse.ecf.core.comm.provider.ISynchAsynchConnectionInstantiator; public class ConnectionDescription { protected String name; protected String instantiatorClass; - protected IAsynchConnectionInstantiator instantiator; + protected ISynchAsynchConnectionInstantiator instantiator; protected int hashCode = 0; protected ClassLoader classLoader = null; - + protected String description; + public ConnectionDescription(ClassLoader loader, - String name, String instantiatorClass) { + String name, String instantiatorClass, String desc) { if (name == null) throw new RuntimeException(new InstantiationException( "stagecontainer description name cannot be null")); @@ -20,12 +23,12 @@ public class ConnectionDescription { this.instantiatorClass = instantiatorClass; this.hashCode = name.hashCode(); } - public ConnectionDescription(String name, - IAsynchConnectionInstantiator inst) { + public ConnectionDescription(String name, ISynchAsynchConnectionInstantiator inst, String desc) { this.instantiator = inst; this.classLoader = this.instantiator.getClass().getClassLoader(); this.instantiatorClass = this.instantiatorClass.getClass().getName(); this.hashCode = name.hashCode(); + this.description = desc; } public String getName() { return name; @@ -45,15 +48,15 @@ public class ConnectionDescription { } public String toString() { - StringBuffer b = new StringBuffer("AsynchConnectionDescription["); + StringBuffer b = new StringBuffer("ConnectionDescription["); b.append(name).append(";"); - b.append(instantiatorClass).append("]"); + b.append(instantiatorClass).append(";").append(description).append("]"); return b.toString(); } - protected IAsynchConnectionInstantiator getInstantiator() - throws ClassNotFoundException, InstantiationException, - IllegalAccessException { + protected ISynchAsynchConnectionInstantiator getInstantiator() + throws ClassNotFoundException, InstantiationException, + IllegalAccessException { synchronized (this) { if (instantiator == null) initializeInstantiator(classLoader); @@ -69,7 +72,11 @@ public class ConnectionDescription { // Load instantiator class Class clazz = Class.forName(instantiatorClass, true, cl); // Make new instance - instantiator = (IAsynchConnectionInstantiator) clazz.newInstance(); + instantiator = (ISynchAsynchConnectionInstantiator) clazz.newInstance(); } + public String getDescription() { + return description; + } + }
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionEvent.java new file mode 100644 index 000000000..eb00334de --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionEvent.java @@ -0,0 +1,21 @@ +package org.eclipse.ecf.core.comm; + +import org.eclipse.ecf.core.util.Event; + +public class ConnectionEvent implements Event { + + Object data = null; + IConnection connection = null; + + public ConnectionEvent(IConnection source, Object data) { + this.connection = source; + this.data = data; + } + public IConnection getConnection() { + return connection; + } + public Object getData() { + return data; + } + +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionFactory.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionFactory.java new file mode 100644 index 000000000..48f3e6eb1 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionFactory.java @@ -0,0 +1,134 @@ +package org.eclipse.ecf.core.comm; + +import java.util.Hashtable; + +import org.eclipse.ecf.core.comm.provider.ISynchAsynchConnectionInstantiator; +import org.eclipse.ecf.core.util.AbstractFactory; + +public class ConnectionFactory { + + private static Hashtable connectiontypes = new Hashtable(); + + static { + ConnectionDescription cd = new ConnectionDescription( + (ClassLoader) null, "default", + "org.eclipse.ecf.provider.comm.tcp.Client$Creator","default connection"); + addDescription(cd); + } + public final static ConnectionDescription getDescription( + ConnectionDescription scd) { + return getDescription0(scd); + } + protected static ConnectionDescription getDescription0( + ConnectionDescription scd) { + if (scd == null) + return null; + return (ConnectionDescription) connectiontypes.get(scd.getName()); + } + protected static ConnectionDescription getDescription0(String name) { + if (name == null) + return null; + return (ConnectionDescription) connectiontypes.get(name); + } + public final static ConnectionDescription getDescriptionByName(String name) { + return getDescription0(name); + } + public final static ConnectionDescription removeDescription( + ConnectionDescription scd) { + return removeDescription0(scd); + } + + protected static ConnectionDescription removeDescription0( + ConnectionDescription n) { + if (n == null) + return null; + return (ConnectionDescription) connectiontypes.remove(n.getName()); + } + public final static ConnectionDescription addDescription( + ConnectionDescription scd) { + return addDescription0(scd); + } + + protected static ConnectionDescription addDescription0( + ConnectionDescription n) { + if (n == null) + return null; + return (ConnectionDescription) connectiontypes.put(n.getName(), n); + } + public final static boolean containsDescription(ConnectionDescription scd) { + return containsDescription0(scd); + } + protected static boolean containsDescription0(ConnectionDescription scd) { + if (scd == null) + return false; + return connectiontypes.containsKey(scd.getName()); + } + + public static ISynchAsynchConnection makeSynchAsynchConnection( + ISynchAsynchConnectionEventHandler handler, + ConnectionDescription desc, String[] argTypes, Object[] args) + throws ConnectionInstantiationException { + + if (handler == null) + throw new ConnectionInstantiationException("handler cannot be null"); + if (desc == null) + throw new ConnectionInstantiationException( + "ConnectionDescription cannot be null"); + ConnectionDescription cd = getDescription0(desc); + if (cd == null) + throw new ConnectionInstantiationException("ConnectionDescription " + + desc.getName() + " not found"); + ISynchAsynchConnectionInstantiator instantiator = null; + Class clazzes[] = null; + try { + instantiator = (ISynchAsynchConnectionInstantiator) cd.getInstantiator(); + clazzes = AbstractFactory.getClassesForTypes(argTypes, args, cd + .getClassLoader()); + if (instantiator == null) + throw new InstantiationException( + "Instantiator for ConnectionDescription " + + cd.getName() + " is null"); + } catch (Exception e) { + throw new ConnectionInstantiationException( + "Exception getting instantiator for '" + desc.getName() + + "'", e); + } + // Ask instantiator to actually create instance + return instantiator.makeInstance(handler, clazzes, args); + } + public static ISynchAsynchConnection makeSynchAsynchConnection( + ISynchAsynchConnectionEventHandler handler, + ConnectionDescription desc, Object[] args) + throws ConnectionInstantiationException { + return makeSynchAsynchConnection(handler, desc, null, args); + } + public static ISynchAsynchConnection makeSynchAsynchConnection( + ISynchAsynchConnectionEventHandler handler, String descriptionName, + Object[] args) throws ConnectionInstantiationException { + ConnectionDescription desc = getDescriptionByName(descriptionName); + if (desc == null) + throw new ConnectionInstantiationException("Connection named '" + + descriptionName + "' not found"); + return makeSynchAsynchConnection(handler, desc, args); + } + public static ISynchAsynchConnection makeSynchAsynchConnection( + ISynchAsynchConnectionEventHandler handler, String descriptionName, + String[] argTypes, Object[] args) + throws ConnectionInstantiationException { + ConnectionDescription desc = getDescriptionByName(descriptionName); + if (desc == null) + throw new ConnectionInstantiationException("Connection named '" + + descriptionName + "' not found"); + return makeSynchAsynchConnection(handler, desc, argTypes, args); + } + public static ISynchAsynchConnection makeSynchAsynchConnection( + ISynchAsynchConnectionEventHandler handler, String descriptionName) + throws ConnectionInstantiationException { + ConnectionDescription desc = getDescriptionByName(descriptionName); + if (desc == null) + throw new ConnectionInstantiationException("Connection named '" + + descriptionName + "' not found"); + return makeSynchAsynchConnection(handler, desc, null, null); + } + +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionInstantiationException.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionInstantiationException.java index 19a12e54b..1e7abb5a3 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionInstantiationException.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionInstantiationException.java @@ -1,4 +1,4 @@ -package org.eclipse.ecf.internal.comm; +package org.eclipse.ecf.core.comm; public class ConnectionInstantiationException extends Exception { @@ -28,4 +28,4 @@ public class ConnectionInstantiationException extends Exception { super(message, cause); } -} +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionRequestHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionRequestHandler.java index 2af22e3ff..d59a8549a 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionRequestHandler.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ConnectionRequestHandler.java @@ -1,10 +1,11 @@ -package org.eclipse.ecf.internal.comm; +package org.eclipse.ecf.core.comm; import java.io.Serializable; import java.net.Socket; public interface ConnectionRequestHandler { - public Serializable checkConnect(Socket aSocket, String target, Serializable data, ISynchAsynchConnection conn); - -} + public Serializable checkConnect(Socket aSocket, String target, + Serializable data, ISynchAsynchConnection conn); + +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/DisconnectConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/DisconnectConnectionEvent.java new file mode 100644 index 000000000..30ef327f5 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/DisconnectConnectionEvent.java @@ -0,0 +1,16 @@ +package org.eclipse.ecf.core.comm; + +public class DisconnectConnectionEvent extends ConnectionEvent { + + Throwable exception = null; + + public DisconnectConnectionEvent(IAsynchConnection conn, Throwable e, + Object data) { + super(conn, data); + exception = e; + } + + public Throwable getException() { + return exception; + } +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnection.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IAsynchConnection.java index 79906e59f..1935b2b2f 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnection.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IAsynchConnection.java @@ -1,4 +1,4 @@ -package org.eclipse.ecf.internal.comm; +package org.eclipse.ecf.core.comm; import java.io.IOException; @@ -6,5 +6,5 @@ import org.eclipse.ecf.core.identity.ID; public interface IAsynchConnection extends IConnection { - public void sendAsynch(ID receiver, byte [] data) throws IOException; -} + public void sendAsynch(ID receiver, byte[] data) throws IOException; +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IAsynchConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IAsynchConnectionEventHandler.java new file mode 100644 index 000000000..cadbf4338 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IAsynchConnectionEventHandler.java @@ -0,0 +1,8 @@ +package org.eclipse.ecf.core.comm; + +import java.io.IOException; + +public interface IAsynchConnectionEventHandler extends IConnectionEventHandler { + public void handleAsynchEvent(AsynchConnectionEvent event) + throws IOException; +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnection.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnection.java new file mode 100644 index 000000000..2dd25d18e --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnection.java @@ -0,0 +1,21 @@ +package org.eclipse.ecf.core.comm; + +import java.io.IOException; +import java.util.Map; + +import org.eclipse.ecf.core.identity.ID; + +public interface IConnection { + + public Object connect(ID remote, Object data, int timeout) + throws IOException; + public void disconnect() throws IOException; + public boolean isConnected(); + public ID getLocalID(); + public void start(); + public void stop(); + public boolean isStarted(); + public Map getProperties(); + public void addCommEventListener(IConnectionEventHandler listener); + public void removeCommEventListener(IConnectionEventHandler listener); +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnectionEventHandler.java new file mode 100644 index 000000000..64b0b9629 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnectionEventHandler.java @@ -0,0 +1,8 @@ +package org.eclipse.ecf.core.comm; + +public interface IConnectionEventHandler { + + public boolean handleSuspectEvent(ConnectionEvent event); + public void handleDisconnectEvent(DisconnectConnectionEvent event); + public Object getAdapter(Class clazz); +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnectionRequestHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnectionRequestHandler.java new file mode 100644 index 000000000..269289b2f --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/IConnectionRequestHandler.java @@ -0,0 +1,6 @@ +package org.eclipse.ecf.core.comm; + +public interface IConnectionRequestHandler { + public Object checkConnect(String hostname, Object data, IConnection conn) + throws Exception; +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchAsynchConnection.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchAsynchConnection.java index 1f1d85776..1d13f61eb 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchAsynchConnection.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchAsynchConnection.java @@ -1,6 +1,6 @@ -package org.eclipse.ecf.internal.comm; +package org.eclipse.ecf.core.comm; public interface ISynchAsynchConnection extends IAsynchConnection, ISynchConnection { -} +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchAsynchConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchAsynchConnectionEventHandler.java new file mode 100644 index 000000000..8c7a12066 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchAsynchConnectionEventHandler.java @@ -0,0 +1,6 @@ +package org.eclipse.ecf.core.comm; + +public interface ISynchAsynchConnectionEventHandler extends + ISynchConnectionEventHandler, IAsynchConnectionEventHandler { + +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchConnection.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchConnection.java index b05c62e77..d5e6bf359 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchConnection.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchConnection.java @@ -1,4 +1,4 @@ -package org.eclipse.ecf.internal.comm; +package org.eclipse.ecf.core.comm; import java.io.IOException; @@ -6,5 +6,5 @@ import org.eclipse.ecf.core.identity.ID; public interface ISynchConnection extends IConnection { - public Object sendSynch(ID receiver, byte [] data) throws IOException; -} + public Object sendSynch(ID receiver, byte[] data) throws IOException; +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchConnectionEventHandler.java new file mode 100644 index 000000000..f97b95011 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/ISynchConnectionEventHandler.java @@ -0,0 +1,9 @@ +package org.eclipse.ecf.core.comm; + +import java.io.IOException; + +public interface ISynchConnectionEventHandler extends IConnectionEventHandler { + + public Object handleSynchEvent(SynchConnectionEvent event) + throws IOException; +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/SuspectConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/SuspectConnectionEvent.java index 2fd668f44..c97001cfc 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/SuspectConnectionEvent.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/SuspectConnectionEvent.java @@ -1,4 +1,4 @@ -package org.eclipse.ecf.internal.comm; +package org.eclipse.ecf.core.comm; class SuspectConnectionEvent extends ConnectionEvent { @@ -6,4 +6,4 @@ class SuspectConnectionEvent extends ConnectionEvent { super(source, data); } -} +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/SynchConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/SynchConnectionEvent.java new file mode 100644 index 000000000..bd925f33c --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/SynchConnectionEvent.java @@ -0,0 +1,7 @@ +package org.eclipse.ecf.core.comm; + +public class SynchConnectionEvent extends ConnectionEvent { + public SynchConnectionEvent(ISynchConnection conn, Object data) { + super(conn, data); + } +}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/provider/ISynchAsynchConnectionInstantiator.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/provider/ISynchAsynchConnectionInstantiator.java new file mode 100644 index 000000000..1390bc0fa --- /dev/null +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/comm/provider/ISynchAsynchConnectionInstantiator.java @@ -0,0 +1,9 @@ +package org.eclipse.ecf.core.comm.provider; + +import org.eclipse.ecf.core.comm.ConnectionInstantiationException; +import org.eclipse.ecf.core.comm.ISynchAsynchConnection; +import org.eclipse.ecf.core.comm.ISynchAsynchConnectionEventHandler; + +public interface ISynchAsynchConnectionInstantiator { + public ISynchAsynchConnection makeInstance(ISynchAsynchConnectionEventHandler handler, Class [] clazzes, Object [] args) throws ConnectionInstantiationException; +} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/util/queue/SimpleQueueImpl.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/SimpleQueueImpl.java index 00d186d20..34d2e831c 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/util/queue/SimpleQueueImpl.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/SimpleQueueImpl.java @@ -7,12 +7,11 @@ * Contributors: Composent, Inc. - initial API and implementation ******************************************************************************/ -package org.eclipse.ecf.internal.util.queue; +package org.eclipse.ecf.core.util; import java.util.List; import java.util.LinkedList; -import org.eclipse.ecf.core.util.SimpleQueue; public class SimpleQueueImpl implements SimpleQueue { List list; diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/AsynchConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/AsynchConnectionEvent.java deleted file mode 100644 index 6b6caa5f2..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/AsynchConnectionEvent.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -public class AsynchConnectionEvent extends ConnectionEvent { - public AsynchConnectionEvent(IAsynchConnection conn, Object data) { - super(conn, data); - } -}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionEvent.java deleted file mode 100644 index 33eadd630..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionEvent.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -import org.eclipse.ecf.core.util.Event; - -public class ConnectionEvent implements Event { - - Object data = null; - IConnection connection = null; - - public ConnectionEvent(IConnection source, Object data) { - this.connection = source; - this.data = data; - } - public IConnection getConnection() { - return connection; - } - public Object getData() { - return data; - } - -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionFactory.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionFactory.java deleted file mode 100644 index 449db30b3..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ConnectionFactory.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -import java.util.Hashtable; - -import org.eclipse.ecf.core.util.AbstractFactory; - -public class ConnectionFactory { - - private static Hashtable connectiontypes = new Hashtable(); - - static { - ConnectionDescription cd = new ConnectionDescription((ClassLoader)null,"default","org.eclipse.ecf.provider.comm.tcp.Client$Creator"); - addDescription(cd); - } - public final static ConnectionDescription getDescription(ConnectionDescription scd) { - return getDescription0(scd); - } - protected static ConnectionDescription getDescription0(ConnectionDescription scd) { - if (scd == null) - return null; - return (ConnectionDescription) connectiontypes.get(scd.getName()); - } - protected static ConnectionDescription getDescription0(String name) { - if (name == null) - return null; - return (ConnectionDescription) connectiontypes.get(name); - } - public final static ConnectionDescription getDescriptionByName(String name) { - return getDescription0(name); - } - public final static ConnectionDescription removeDescription(ConnectionDescription scd) { - return removeDescription0(scd); - } - - protected static ConnectionDescription removeDescription0(ConnectionDescription n) { - if (n == null) - return null; - return (ConnectionDescription) connectiontypes.remove(n.getName()); - } - public final static ConnectionDescription addDescription(ConnectionDescription scd) { - return addDescription0(scd); - } - - protected static ConnectionDescription addDescription0(ConnectionDescription n) { - if (n == null) - return null; - return (ConnectionDescription) connectiontypes.put(n.getName(), n); - } - public final static boolean containsDescription(ConnectionDescription scd) { - return containsDescription0(scd); - } - protected static boolean containsDescription0(ConnectionDescription scd) { - if (scd == null) - return false; - return connectiontypes.containsKey(scd.getName()); - } - - public static ISynchAsynchConnection makeSynchAsynchConnection(ConnectionDescription desc, - String[] argTypes, - Object[] args) - throws ConnectionInstantiationException { - - if (desc == null) - throw new ConnectionInstantiationException("ConnectionDescription cannot be null"); - ConnectionDescription cd = getDescription0(desc); - if (cd == null) - throw new ConnectionInstantiationException( - "ConnectionDescription " + desc.getName() + " not found"); - IAsynchConnectionInstantiator instantiator = null; - Class clazzes[] = null; - try { - instantiator = (IAsynchConnectionInstantiator) cd.getInstantiator(); - clazzes = AbstractFactory.getClassesForTypes(argTypes, args, cd.getClassLoader()); - if (instantiator == null) - throw new InstantiationException( - "Instantiator for ConnectionDescription " - + cd.getName() - + " is null"); - } catch (Exception e) { - throw new ConnectionInstantiationException("Exception getting instantiator for '"+desc.getName()+"'",e); - } - // Ask instantiator to actually create instance - return instantiator.makeInstance(clazzes, args); - } - public static ISynchAsynchConnection makeSynchAsynchConnection( - ConnectionDescription desc, - Object[] args) - throws ConnectionInstantiationException { - return makeSynchAsynchConnection(desc, null, args); - } - public static ISynchAsynchConnection makeSynchAsynchConnection( - String descriptionName, - Object[] args) - throws ConnectionInstantiationException { - return makeSynchAsynchConnection( - getDescriptionByName(descriptionName), - args); - } - public static ISynchAsynchConnection makeAsynchConnection( - String descriptionName, - String[] argTypes, - Object[] args) - throws ConnectionInstantiationException { - return makeSynchAsynchConnection( - getDescriptionByName(descriptionName), - argTypes, - args); - } - public static ISynchAsynchConnection makeAsynchConnection( - String descriptionName) - throws ConnectionInstantiationException { - return makeSynchAsynchConnection( - getDescriptionByName(descriptionName), - null, - null); - } - -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/DisconnectConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/DisconnectConnectionEvent.java deleted file mode 100644 index b5947a456..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/DisconnectConnectionEvent.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.eclipse.ecf.internal.comm; - - -public class DisconnectConnectionEvent extends ConnectionEvent { - - Throwable exception = null; - - public DisconnectConnectionEvent( - IAsynchConnection conn, - Throwable e, - Object data) { - super(conn, data); - exception = e; - } - - public Throwable getException() { - return exception; - } -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnectionEventHandler.java deleted file mode 100644 index 6dac3b39d..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnectionEventHandler.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -import java.io.IOException; - -public interface IAsynchConnectionEventHandler extends IConnectionEventHandler { - public void handleAsynchEvent(AsynchConnectionEvent event) throws IOException; -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnectionInstantiator.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnectionInstantiator.java deleted file mode 100644 index d05444b83..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IAsynchConnectionInstantiator.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -import org.eclipse.ecf.internal.comm.ConnectionInstantiationException; - -public interface IAsynchConnectionInstantiator { - public ISynchAsynchConnection makeInstance(Class [] clazzes, Object [] args) throws ConnectionInstantiationException; -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnection.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnection.java deleted file mode 100644 index 6130b3723..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnection.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -import java.io.IOException; -import java.util.Map; - -import org.eclipse.ecf.core.identity.ID; - -public interface IConnection { - - public Object connect(ID remote, Object data, int timeout) throws IOException; - public void disconnect() throws IOException; - public boolean isConnected(); - public ID getLocalID(); - public void start(); - public void stop(); - public boolean isStarted(); - public Map getProperties(); - public void addCommEventListener(IConnectionEventHandler listener); - public void removeCommEventListener(IConnectionEventHandler listener); -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnectionEventHandler.java deleted file mode 100644 index af8405178..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnectionEventHandler.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -public interface IConnectionEventHandler { - - public boolean handleSuspectEvent(ConnectionEvent event); - public void handleDisconnectEvent(DisconnectConnectionEvent event); - public Object getAdapter(Class clazz); -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnectionRequestHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnectionRequestHandler.java deleted file mode 100644 index 8d65c5f1c..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/IConnectionRequestHandler.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.eclipse.ecf.internal.comm; - - -public interface IConnectionRequestHandler -{ - public Object checkConnect(String hostname, Object data, IConnection conn) throws Exception; -}
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchAsynchConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchAsynchConnectionEventHandler.java deleted file mode 100644 index 80cec6b24..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchAsynchConnectionEventHandler.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -public interface ISynchAsynchConnectionEventHandler extends ISynchConnectionEventHandler, IAsynchConnectionEventHandler { - -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchConnectionEventHandler.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchConnectionEventHandler.java deleted file mode 100644 index 9b537b655..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/ISynchConnectionEventHandler.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.eclipse.ecf.internal.comm; - -import java.io.IOException; - -public interface ISynchConnectionEventHandler extends IConnectionEventHandler { - - public Object handleSynchEvent(SynchConnectionEvent event) throws IOException; -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/SynchConnectionEvent.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/SynchConnectionEvent.java deleted file mode 100644 index d89dab156..000000000 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/comm/SynchConnectionEvent.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.eclipse.ecf.internal.comm; - - -public class SynchConnectionEvent extends ConnectionEvent { - public SynchConnectionEvent(ISynchConnection conn, Object data) { - super(conn, data); - } -} diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java index b1fd4776a..22abf4b9e 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java @@ -25,18 +25,15 @@ import org.eclipse.core.runtime.Plugin; import org.eclipse.core.runtime.Status; import org.eclipse.ecf.core.SharedObjectContainerDescription; import org.eclipse.ecf.core.SharedObjectContainerFactory; +import org.eclipse.ecf.core.comm.ConnectionDescription; +import org.eclipse.ecf.core.comm.ConnectionFactory; +import org.eclipse.ecf.core.comm.provider.ISynchAsynchConnectionInstantiator; import org.eclipse.ecf.core.identity.IDFactory; import org.eclipse.ecf.core.identity.Namespace; import org.eclipse.ecf.core.identity.provider.IDInstantiator; import org.eclipse.ecf.core.provider.ISharedObjectContainerInstantiator; import org.osgi.framework.BundleContext; -/* - * Plugin class for Eclipse Communications Framework core - * - * @author slewis - * - */ public class ECFPlugin extends Plugin { public static final String PLUGIN_RESOURCE_BUNDLE = "org.eclipse.ecf.ECFPluginResources"; @@ -53,6 +50,11 @@ public class ECFPlugin extends Plugin { public static final String CONTAINER_FACTORY_EPOINT_NAME_ATTRIBUTE = "name"; public static final String CONTAINER_FACTORY_EPOINT_DESC_ATTRIBUTE = "description"; + public static final String COMM_FACTORY_EPOINT = "org.eclipse.ecf.comm"; + public static final String COMM_FACTORY_EPOINT_CLASS_ATTRIBUTE = "instantiatorClass"; + public static final String COMM_FACTORY_EPOINT_NAME_ATTRIBUTE = "name"; + public static final String COMM_FACTORY_EPOINT_DESC_ATTRIBUTE = "description"; + public static final int FACTORY_DOES_NOT_IMPLEMENT_ERRORCODE = 10; public static final int FACTORY_NAME_COLLISION_ERRORCODE = 20; @@ -257,6 +259,79 @@ public class ECFPlugin extends Plugin { } + protected void setupCommExtensionPoint(BundleContext bc) { + String bundleName = getDefault().getBundle().getSymbolicName(); + IExtensionRegistry reg = Platform.getExtensionRegistry(); + IExtensionPoint extensionPoint = reg + .getExtensionPoint(COMM_FACTORY_EPOINT); + if (extensionPoint == null) { + return; + } + IConfigurationElement[] members = extensionPoint + .getConfigurationElements(); + // For each configuration element + for (int m = 0; m < members.length; m++) { + IConfigurationElement member = members[m]; + // Get the label of the extender plugin and the ID of the extension. + IExtension extension = member.getDeclaringExtension(); + Object exten = null; + try { + // The only required attribute is "instantiatorClass" + exten = member + .createExecutableExtension(COMM_FACTORY_EPOINT_CLASS_ATTRIBUTE); + // Verify that object implements ISynchAsynchConnectionInstantiator + if (!(exten instanceof ISynchAsynchConnectionInstantiator)) { + IStatus s = new Status( + Status.ERROR, + bundleName, + FACTORY_DOES_NOT_IMPLEMENT_ERRORCODE, + getResourceString("ExtPointError.CommNoImplPrefix") + + exten.getClass().getName() + + getResourceString("ExtPointError.CommNoImplSuffix") + + extension + .getExtensionPointUniqueIdentifier(), + null); + throw new CoreException(s); + } + ClassLoader cl = exten.getClass().getClassLoader(); + String clazz = exten.getClass().getName(); + // Get name and get version, if available + String name = member + .getAttribute(COMM_FACTORY_EPOINT_NAME_ATTRIBUTE); + if (name == null) { + name = clazz; + } + String description = member.getAttribute(COMM_FACTORY_EPOINT_DESC_ATTRIBUTE); + if (description == null) { + description = ""; + } + ConnectionDescription cd = new ConnectionDescription( + name, (ISynchAsynchConnectionInstantiator) exten, description); + if (ConnectionFactory.containsDescription(cd)) { + // It's already there...log and throw as we can't use the + // same named factory + IStatus s = new Status( + Status.ERROR, + bundleName, + FACTORY_NAME_COLLISION_ERRORCODE, + getResourceString("ExtPointError.CommNameCollisionPrefix") + + name + + getResourceString("ExtPointError.CommNameCollisionSuffix") + + extension + .getExtensionPointUniqueIdentifier(), + null); + throw new CoreException(s); + } + // Now add the description and we're ready to go. + ConnectionFactory.addDescription(cd); + } catch (CoreException e) { + log(e.getStatus()); + } + } + + } + + /** * This method is called upon plug-in activation */ @@ -264,6 +339,7 @@ public class ECFPlugin extends Plugin { super.start(context); setupContainerExtensionPoint(context); setupIdentityExtensionPoint(context); + setupCommExtensionPoint(context); this.context = context; } diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.properties b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.properties index 3c1744748..aad4225a8 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.properties +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.properties @@ -22,3 +22,9 @@ ExtPointError.IDNameCollisionSuffix=already found. Ignoring registration for na ExtPointError.IDNameLoadErrorPrefix=Could not create namespace with name ExtPointError.IDNameLoadErrorSuffix=Ignoring registration for namespace extension point + +ExtPointError.CommNoImplPrefix=Connection factory with class +ExtPointError.CommNoImplSuffix= does not implement ISynchAsynchInstantiator. Ignoring registration for comm extension point + +ExtPointError.CommNameCollisionPrefix=Connection factory with name +ExtPointError.CommNameCollisionSuffix=already found. Ignoring registration for comm extension point diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/QueueEnqueueImpl.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/QueueEnqueueImpl.java index c860d6069..cb357e890 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/QueueEnqueueImpl.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/QueueEnqueueImpl.java @@ -8,7 +8,7 @@ import org.eclipse.ecf.core.util.EnqueuePredicate; import org.eclipse.ecf.core.util.Event; import org.eclipse.ecf.core.util.QueueEnqueue; import org.eclipse.ecf.core.util.QueueException; -import org.eclipse.ecf.internal.util.queue.SimpleQueueImpl; +import org.eclipse.ecf.core.util.SimpleQueueImpl; public class QueueEnqueueImpl implements QueueEnqueue { diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectContainer.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectContainer.java index 211dacb45..23a6e970a 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectContainer.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectContainer.java @@ -30,19 +30,19 @@ import org.eclipse.ecf.core.SharedObjectDescription; import org.eclipse.ecf.core.SharedObjectDisconnectException; import org.eclipse.ecf.core.SharedObjectInitException; import org.eclipse.ecf.core.SharedObjectNotFoundException; +import org.eclipse.ecf.core.comm.AsynchConnectionEvent; +import org.eclipse.ecf.core.comm.ConnectionEvent; +import org.eclipse.ecf.core.comm.DisconnectConnectionEvent; +import org.eclipse.ecf.core.comm.IAsynchConnection; +import org.eclipse.ecf.core.comm.IAsynchConnectionEventHandler; +import org.eclipse.ecf.core.comm.ISynchConnectionEventHandler; +import org.eclipse.ecf.core.comm.SynchConnectionEvent; import org.eclipse.ecf.core.events.IContainerEvent; import org.eclipse.ecf.core.identity.ID; import org.eclipse.ecf.core.util.AbstractFactory; import org.eclipse.ecf.core.util.Event; -import org.eclipse.ecf.internal.comm.AsynchConnectionEvent; -import org.eclipse.ecf.internal.comm.ConnectionEvent; -import org.eclipse.ecf.internal.comm.DisconnectConnectionEvent; -import org.eclipse.ecf.internal.comm.IAsynchConnection; -import org.eclipse.ecf.internal.comm.IAsynchConnectionEventHandler; -import org.eclipse.ecf.internal.comm.ISynchConnectionEventHandler; -import org.eclipse.ecf.internal.comm.SynchConnectionEvent; +import org.eclipse.ecf.core.util.SimpleQueueImpl; import org.eclipse.ecf.internal.impl.standalone.gmm.Item; -import org.eclipse.ecf.internal.util.queue.SimpleQueueImpl; public abstract class SharedObjectContainer implements ISharedObjectContainer { public static Debug debug = diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectWrapper.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectWrapper.java index b8cdbb8e6..efae671cc 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectWrapper.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/SharedObjectWrapper.java @@ -14,8 +14,8 @@ import org.eclipse.ecf.core.events.SharedObjectDeactivatedEvent; import org.eclipse.ecf.core.identity.ID; import org.eclipse.ecf.core.util.AsynchResult; import org.eclipse.ecf.core.util.Event; +import org.eclipse.ecf.core.util.SimpleQueueImpl; import org.eclipse.ecf.internal.impl.standalone.gmm.Item; -import org.eclipse.ecf.internal.util.queue.SimpleQueueImpl; final class SharedObjectWrapper { static Debug debug = Debug.create(SharedObjectWrapper.class.getName()); diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/StandaloneSharedObjectWrapper.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/StandaloneSharedObjectWrapper.java index 50c986617..80859e24f 100644 --- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/StandaloneSharedObjectWrapper.java +++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/internal/impl/standalone/StandaloneSharedObjectWrapper.java @@ -11,8 +11,8 @@ import org.eclipse.ecf.core.events.SharedObjectContainerJoinedEvent; import org.eclipse.ecf.core.events.SharedObjectDeactivatedEvent; import org.eclipse.ecf.core.identity.ID; import org.eclipse.ecf.core.util.Event; +import org.eclipse.ecf.core.util.SimpleQueueImpl; import org.eclipse.ecf.internal.impl.standalone.gmm.Item; -import org.eclipse.ecf.internal.util.queue.SimpleQueueImpl; final class StandaloneSharedObjectWrapper { static Debug debug = Debug.create(StandaloneSharedObjectWrapper.class.getName()); |
