summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-09-17 11:54:32 (EDT)
committerEike Stepper2007-09-17 11:54:32 (EDT)
commit42897066f45ea3a4f80feaa4c19c9f2864521954 (patch)
tree99025b58dfc0d43917d7d02e72e31c0ac30235ca
downloadcdo.incubator-42897066f45ea3a4f80feaa4c19c9f2864521954.zip
cdo.incubator-42897066f45ea3a4f80feaa4c19c9f2864521954.tar.gz
cdo.incubator-42897066f45ea3a4f80feaa4c19c9f2864521954.tar.bz2
[203406] Develop an ECF provider with Net4j
https://bugs.eclipse.org/bugs/show_bug.cgi?id=203406
-rw-r--r--org.eclipse.ecf.provider.net4j/.classpath7
-rw-r--r--org.eclipse.ecf.provider.net4j/.cvsignore3
-rw-r--r--org.eclipse.ecf.provider.net4j/.options1
-rw-r--r--org.eclipse.ecf.provider.net4j/.project28
-rw-r--r--org.eclipse.ecf.provider.net4j/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.ecf.provider.net4j/about.html42
-rw-r--r--org.eclipse.ecf.provider.net4j/build.properties11
-rw-r--r--org.eclipse.ecf.provider.net4j/copyright.txt8
-rw-r--r--org.eclipse.ecf.provider.net4j/epl-v10.html319
-rw-r--r--org.eclipse.ecf.provider.net4j/license.html319
-rw-r--r--org.eclipse.ecf.provider.net4j/plugin.properties25
-rw-r--r--org.eclipse.ecf.provider.net4j/plugin.xml57
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/AbstractConnection.java196
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/Net4jConnection.java89
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/bundle/OM.java42
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ClientSOContainerFactory.java16
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientContainerInjector.java41
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientSOContainerFactory.java38
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerContainerInjector.java41
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerSOContainerFactory.java29
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ServerSOContainerFactory.java16
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/AsynchMessageIndication.java42
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectIndication.java48
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectRequest.java60
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectResult.java19
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/DisconnectIndication.java48
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocol.java22
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocolFactory.java28
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocol.java45
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocolConstants.java27
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocol.java39
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocolFactory.java28
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/SynchMessageIndication.java48
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/test/InitialTest.java58
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/ECFUtil.java44
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jClientSOContainer.java75
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jServerSOContainer.java60
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jID.java62
-rw-r--r--org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jNamespace.java71
39 files changed, 2172 insertions, 0 deletions
diff --git a/org.eclipse.ecf.provider.net4j/.classpath b/org.eclipse.ecf.provider.net4j/.classpath
new file mode 100644
index 0000000..751c8f2
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.ecf.provider.net4j/.cvsignore b/org.eclipse.ecf.provider.net4j/.cvsignore
new file mode 100644
index 0000000..25b27ca
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/.cvsignore
@@ -0,0 +1,3 @@
+bin
+doc
+.ispace
diff --git a/org.eclipse.ecf.provider.net4j/.options b/org.eclipse.ecf.provider.net4j/.options
new file mode 100644
index 0000000..986b345
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/.options
@@ -0,0 +1 @@
+org.eclipse.ecf.provider.net4j/debug = true
diff --git a/org.eclipse.ecf.provider.net4j/.project b/org.eclipse.ecf.provider.net4j/.project
new file mode 100644
index 0000000..98cae94
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.ecf.provider.net4j</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.ecf.provider.net4j/META-INF/MANIFEST.MF b/org.eclipse.ecf.provider.net4j/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..1e04281
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.ecf.provider.net4j;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.eclipse.ecf.provider.internal.net4j.bundle.OM$Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.ecf;bundle-version="[1.1.0,2.0.0)";visibility:=reexport,
+ org.eclipse.ecf.identity;bundle-version="[1.1.0,2.0.0)";visibility:=reexport,
+ org.eclipse.ecf.provider;bundle-version="[1.1.0,2.0.0)";visibility:=reexport,
+ org.eclipse.ecf.sharedobject;bundle-version="[1.1.0,2.0.0)";visibility:=reexport,
+ org.eclipse.net4j.tcp;bundle-version="[0.8.0,0.9.0)";visibility:=reexport,
+ org.eclipse.net4j.tests
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.ecf.provider.internal.net4j;version="0.8.0",
+ org.eclipse.ecf.provider.internal.net4j.protocol;version="0.8.0",
+ org.eclipse.ecf.provider.net4j;version="0.8.0",
+ org.eclipse.ecf.provider.net4j.container;version="0.8.0",
+ org.eclipse.ecf.provider.net4j.identity;version="0.8.0"
diff --git a/org.eclipse.ecf.provider.net4j/about.html b/org.eclipse.ecf.provider.net4j/about.html
new file mode 100644
index 0000000..81a265f
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/about.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+
+ <head>
+
+ <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="Content-Type"/>
+
+ <title>About</title>
+
+ </head>
+
+ <body lang="EN-US">
+
+ <h2>About This Content</h2>
+
+ <p>May 17, 2007</p>
+
+ <h3>License</h3>
+
+ <p>The Eclipse Foundation makes available all content in this
+ plug-in (&quot;Content&quot;). Unless otherwise indicated below,
+ the Content is provided to you under the terms and conditions of
+ the Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of
+ the EPL is available at
+ <a href="http://www.eclipse.org/legal/epl-v10.html">
+ http://www.eclipse.org/legal/epl-v10.html</a>. For purposes of the
+ EPL, &quot;Program&quot; will mean the Content.</p>
+
+ <p>If you did not receive this Content directly from the Eclipse
+ Foundation, the Content is being redistributed by another party
+ (&quot;Redistributor&quot;) and different terms and conditions may
+ apply to your use of any object code in the Content. Check the
+ Redistributor&apos;s license that was provided with the Content. If
+ no such license exists, contact the Redistributor. Unless otherwise
+ indicated below, the terms and conditions of the EPL still apply to
+ any source code in the Content.</p>
+
+ </body>
+
+</html>
+
diff --git a/org.eclipse.ecf.provider.net4j/build.properties b/org.eclipse.ecf.provider.net4j/build.properties
new file mode 100644
index 0000000..6c1a559
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ about.html,\
+ copyright.txt,\
+ epl-v10.html,\
+ license.html,\
+ plugin.properties,\
+ plugin.xml
diff --git a/org.eclipse.ecf.provider.net4j/copyright.txt b/org.eclipse.ecf.provider.net4j/copyright.txt
new file mode 100644
index 0000000..025f152
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/copyright.txt
@@ -0,0 +1,8 @@
+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 \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/epl-v10.html b/org.eclipse.ecf.provider.net4j/epl-v10.html
new file mode 100644
index 0000000..d7b88e9
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/epl-v10.html
@@ -0,0 +1,319 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+
+
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style></head>
+
+<body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/license.html b/org.eclipse.ecf.provider.net4j/license.html
new file mode 100644
index 0000000..d7b88e9
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/license.html
@@ -0,0 +1,319 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://www.eclipse.org/org/documents/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml"><title>Eclipse Public License - Version 1.0</title><!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+
+
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style></head>
+
+<body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html> \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/plugin.properties b/org.eclipse.ecf.provider.net4j/plugin.properties
new file mode 100644
index 0000000..2606872
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/plugin.properties
@@ -0,0 +1,25 @@
+# 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
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ==============================================================================
+# Do not change the properties between this line and the last line containing:
+# %%% END OF TRANSLATED PROPERTIES %%%
+# Instead, either redefine an existing property, or create a new property,
+# append it to the end of the file, and change the code to use the new name.
+# ==============================================================================
+
+pluginName = ECF Net4j Provider (Incubation)
+providerName = Eclipse.org
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/org.eclipse.ecf.provider.net4j/plugin.xml b/org.eclipse.ecf.provider.net4j/plugin.xml
new file mode 100644
index 0000000..6c3e80e
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/plugin.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.3"?>
+<!--
+ <copyright>
+
+ 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
+
+ </copyright>
+-->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ecf.identity.namespace">
+ <namespace
+ class="org.eclipse.ecf.provider.net4j.identity.Net4jNamespace"
+ description="Net4j Namespace"
+ name="ecf.net4j">
+ </namespace>
+ </extension>
+
+ <extension
+ point="org.eclipse.net4j.util.factories">
+ <factory
+ class="org.eclipse.ecf.provider.internal.net4j.protocol.ECFServerProtocolFactory"
+ productGroup="org.eclipse.net4j.serverProtocols"
+ type="ecf"/>
+ <factory
+ class="org.eclipse.ecf.provider.internal.net4j.protocol.ECFClientProtocolFactory"
+ productGroup="org.eclipse.net4j.clientProtocols"
+ type="ecf"/>
+ <factory
+ class="org.eclipse.ecf.provider.internal.net4j.container.Net4jServerSOContainerFactory"
+ productGroup="org.eclipse.ecf.serverSOContainers"
+ type="ecf"/>
+ <factory
+ class="org.eclipse.ecf.provider.internal.net4j.container.Net4jClientSOContainerFactory"
+ productGroup="org.eclipse.ecf.clientSOContainers"
+ type="ecf"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.net4j.util.elementProcessors">
+ <elementProcessor
+ class="org.eclipse.ecf.provider.internal.net4j.container.Net4jServerContainerInjector"/>
+ <elementProcessor
+ class="org.eclipse.ecf.provider.internal.net4j.container.Net4jClientContainerInjector"/>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/AbstractConnection.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/AbstractConnection.java
new file mode 100644
index 0000000..74a1bb5
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/AbstractConnection.java
@@ -0,0 +1,196 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j;
+
+import org.eclipse.net4j.util.ObjectUtil;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.util.ECFException;
+import org.eclipse.ecf.provider.comm.ConnectionCreateException;
+import org.eclipse.ecf.provider.comm.IConnectionListener;
+import org.eclipse.ecf.provider.comm.ISynchAsynchConnection;
+import org.eclipse.ecf.provider.generic.ClientSOContainer;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class AbstractConnection implements ISynchAsynchConnection
+{
+ private ClientSOContainer soContainer;
+
+ private ID targetID;
+
+ private Object connectData;
+
+ private Map<?, ?> properties;
+
+ private List<IConnectionListener> listeners = new ArrayList<IConnectionListener>(0);
+
+ private boolean connected;
+
+ private boolean started;
+
+ public AbstractConnection(ClientSOContainer soContainer, ID targetID, Object connectData)
+ throws ConnectionCreateException
+ {
+ if (soContainer == null)
+ {
+ throw new ConnectionCreateException("soContainer can't be null");
+ }
+
+ if (targetID == null)
+ {
+ throw new ConnectionCreateException("targetID can't be null");
+ }
+
+ this.soContainer = soContainer;
+ this.targetID = targetID;
+ this.connectData = connectData;
+ }
+
+ public ClientSOContainer getSOContainer()
+ {
+ return soContainer;
+ }
+
+ public ID getLocalID()
+ {
+ return soContainer.getID();
+ }
+
+ public ID getTargetID()
+ {
+ return targetID;
+ }
+
+ public Object getConnectData()
+ {
+ return connectData;
+ }
+
+ public synchronized Map<?, ?> getProperties()
+ {
+ if (properties == null)
+ {
+ properties = new HashMap<Object, Object>();
+ }
+
+ return properties;
+ }
+
+ public void addListener(IConnectionListener listener)
+ {
+ synchronized (listeners)
+ {
+ if (!listeners.contains(listener))
+ {
+ listeners.add(listener);
+ }
+ }
+ }
+
+ public void removeListener(IConnectionListener listener)
+ {
+ synchronized (listeners)
+ {
+ listeners.remove(listener);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter)
+ {
+ return null;
+ }
+
+ public boolean isConnected()
+ {
+ return connected;
+ }
+
+ public synchronized Object connect(ID targetID, Object connectData, int timeout) throws ECFException
+ {
+ if (!ObjectUtil.equals(targetID, this.targetID))
+ {
+ throw new IllegalStateException("targetID mismatch");
+ }
+
+ if (!ObjectUtil.equals(connectData, this.connectData))
+ {
+ throw new IllegalStateException("connectData mismatch");
+ }
+
+ if (!connected)
+ {
+ Object result = doConnect(timeout);
+ connected = true;
+ start();
+ return result;
+ }
+
+ return null;
+ }
+
+ public synchronized void disconnect()
+ {
+ if (connected)
+ {
+ stop();
+ doDisconnect();
+ connected = false;
+ }
+ }
+
+ public boolean isStarted()
+ {
+ return started;
+ }
+
+ public synchronized void start()
+ {
+ if (!started)
+ {
+ if (!connected)
+ {
+ throw new IllegalStateException("not connected");
+ }
+
+ doStart();
+ started = true;
+ }
+ }
+
+ public synchronized void stop()
+ {
+ if (started)
+ {
+ doStop();
+ started = false;
+ }
+ }
+
+ protected abstract Object doConnect(int timeout);
+
+ protected abstract void doDisconnect();
+
+ protected void doStart()
+ {
+ }
+
+ protected void doStop()
+ {
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/Net4jConnection.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/Net4jConnection.java
new file mode 100644
index 0000000..9c9bd56
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/Net4jConnection.java
@@ -0,0 +1,89 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j;
+
+import org.eclipse.net4j.IChannel;
+import org.eclipse.net4j.IConnector;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.provider.comm.ConnectionCreateException;
+import org.eclipse.ecf.provider.internal.net4j.protocol.ConnectRequest;
+import org.eclipse.ecf.provider.net4j.container.Net4jClientSOContainer;
+import org.eclipse.ecf.provider.net4j.identity.Net4jID;
+import org.eclipse.internal.net4j.ConnectorFactory;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class Net4jConnection extends AbstractConnection
+{
+ private IChannel channel;
+
+ public Net4jConnection(Net4jClientSOContainer soContainer, Net4jID targetID, Object data)
+ throws ConnectionCreateException
+ {
+ super(soContainer, targetID, data);
+ }
+
+ @Override
+ public Net4jClientSOContainer getSOContainer()
+ {
+ return (Net4jClientSOContainer)super.getSOContainer();
+ }
+
+ public IChannel getChannel()
+ {
+ return channel;
+ }
+
+ @Override
+ public Net4jID getTargetID()
+ {
+ return (Net4jID)super.getTargetID();
+ }
+
+ public void sendAsynch(ID receiver, byte[] data) throws IOException
+ {
+ // TODO Implement method Net4jConnection.sendAsynch()
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ public Object sendSynch(ID receiver, byte[] data) throws IOException
+ {
+ // TODO Implement method Net4jConnection.sendSynch()
+ throw new UnsupportedOperationException("Not yet implemented");
+ }
+
+ @Override
+ protected Object doConnect(int timeout)
+ {
+ Net4jID id = getTargetID();
+ IConnector connector = getConnector(id.getConnectorType(), id.getConnectorDescription());
+ channel = connector.openChannel("ecf", this);
+ new ConnectRequest(channel, "");
+ return null;
+ }
+
+ @Override
+ protected void doDisconnect()
+ {
+ channel.close();
+ }
+
+ protected IConnector getConnector(String type, String description)
+ {
+ IManagedContainer container = getSOContainer().getNet4jContainer();
+ return (IConnector)container.getElement(ConnectorFactory.PRODUCT_GROUP, type, description);
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/bundle/OM.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/bundle/OM.java
new file mode 100644
index 0000000..eb7dbb1
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/bundle/OM.java
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.bundle;
+
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.ecf.provider.net4j"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends OSGiActivator
+ {
+ public Activator()
+ {
+ super(BUNDLE);
+ }
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ClientSOContainerFactory.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ClientSOContainerFactory.java
new file mode 100644
index 0000000..cca2b71
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ClientSOContainerFactory.java
@@ -0,0 +1,16 @@
+package org.eclipse.ecf.provider.internal.net4j.container;
+
+import org.eclipse.net4j.internal.util.factory.Factory;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class ClientSOContainerFactory extends Factory
+{
+ public static final String PRODUCT_GROUP = "org.eclipse.ecf.clientSOContainers";
+
+ public ClientSOContainerFactory(String type)
+ {
+ super(PRODUCT_GROUP, type);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientContainerInjector.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientContainerInjector.java
new file mode 100644
index 0000000..bd3823c
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientContainerInjector.java
@@ -0,0 +1,41 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.container;
+
+import org.eclipse.net4j.util.container.IElementProcessor;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.provider.net4j.container.Net4jClientSOContainer;
+
+/**
+ * @author Eike Stepper
+ */
+public class Net4jClientContainerInjector implements IElementProcessor
+{
+ public Net4jClientContainerInjector()
+ {
+ }
+
+ public Object process(IManagedContainer container, String productGroup, String factoryType, String description,
+ Object element)
+ {
+ if (element instanceof Net4jClientSOContainer)
+ {
+ Net4jClientSOContainer soContainer = (Net4jClientSOContainer)element;
+ if (soContainer.getNet4jContainer() == null)
+ {
+ soContainer.setNet4jContainer(container);
+ }
+ }
+
+ return element;
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientSOContainerFactory.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientSOContainerFactory.java
new file mode 100644
index 0000000..bdf3475
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jClientSOContainerFactory.java
@@ -0,0 +1,38 @@
+package org.eclipse.ecf.provider.internal.net4j.container;
+
+import org.eclipse.net4j.util.WrappedException;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.core.identity.IDCreateException;
+import org.eclipse.ecf.provider.internal.net4j.protocol.ECFProtocolConstants;
+import org.eclipse.ecf.provider.net4j.container.Net4jClientSOContainer;
+
+/**
+ * @author Eike Stepper
+ */
+public final class Net4jClientSOContainerFactory extends ClientSOContainerFactory
+{
+ public static final String TYPE = ECFProtocolConstants.PROTOCOL_NAME;
+
+ public Net4jClientSOContainerFactory()
+ {
+ super(TYPE);
+ }
+
+ public Net4jClientSOContainer create(String description)
+ {
+ try
+ {
+ return new Net4jClientSOContainer();
+ }
+ catch (IDCreateException ex)
+ {
+ throw WrappedException.wrap(ex);
+ }
+ }
+
+ public static Net4jClientSOContainer get(IManagedContainer container, String description)
+ {
+ return (Net4jClientSOContainer)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerContainerInjector.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerContainerInjector.java
new file mode 100644
index 0000000..743e0b1
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerContainerInjector.java
@@ -0,0 +1,41 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.container;
+
+import org.eclipse.net4j.util.container.IElementProcessor;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.provider.net4j.container.Net4jServerSOContainer;
+
+/**
+ * @author Eike Stepper
+ */
+public class Net4jServerContainerInjector implements IElementProcessor
+{
+ public Net4jServerContainerInjector()
+ {
+ }
+
+ public Object process(IManagedContainer container, String productGroup, String factoryType, String description,
+ Object element)
+ {
+ if (element instanceof Net4jServerSOContainer)
+ {
+ Net4jServerSOContainer soContainer = (Net4jServerSOContainer)element;
+ if (soContainer.getNet4jContainer() == null)
+ {
+ soContainer.setNet4jContainer(container);
+ }
+ }
+
+ return element;
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerSOContainerFactory.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerSOContainerFactory.java
new file mode 100644
index 0000000..340b622
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/Net4jServerSOContainerFactory.java
@@ -0,0 +1,29 @@
+package org.eclipse.ecf.provider.internal.net4j.container;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.provider.internal.net4j.protocol.ECFProtocolConstants;
+import org.eclipse.ecf.provider.net4j.container.Net4jServerSOContainer;
+
+/**
+ * @author Eike Stepper
+ */
+public final class Net4jServerSOContainerFactory extends ServerSOContainerFactory
+{
+ public static final String TYPE = ECFProtocolConstants.PROTOCOL_NAME;
+
+ public Net4jServerSOContainerFactory()
+ {
+ super(TYPE);
+ }
+
+ public Net4jServerSOContainer create(String description)
+ {
+ return new Net4jServerSOContainer(null, null);
+ }
+
+ public static Net4jServerSOContainer get(IManagedContainer container, String description)
+ {
+ return (Net4jServerSOContainer)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ServerSOContainerFactory.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ServerSOContainerFactory.java
new file mode 100644
index 0000000..0d76180
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/container/ServerSOContainerFactory.java
@@ -0,0 +1,16 @@
+package org.eclipse.ecf.provider.internal.net4j.container;
+
+import org.eclipse.net4j.internal.util.factory.Factory;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class ServerSOContainerFactory extends Factory
+{
+ public static final String PRODUCT_GROUP = "org.eclipse.ecf.serverSOContainers";
+
+ public ServerSOContainerFactory(String type)
+ {
+ super(PRODUCT_GROUP, type);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/AsynchMessageIndication.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/AsynchMessageIndication.java
new file mode 100644
index 0000000..88e81c0
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/AsynchMessageIndication.java
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
+import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+
+import org.eclipse.ecf.provider.internal.net4j.bundle.OM;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class AsynchMessageIndication extends Indication
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, AsynchMessageIndication.class);
+
+ public AsynchMessageIndication()
+ {
+ }
+
+ @Override
+ protected short getSignalID()
+ {
+ return ECFProtocolConstants.SIGNAL_ASYNCH_MESSAGE;
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws IOException
+ {
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectIndication.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectIndication.java
new file mode 100644
index 0000000..efa67e3
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectIndication.java
@@ -0,0 +1,48 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import org.eclipse.ecf.provider.internal.net4j.bundle.OM;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class ConnectIndication extends IndicationWithResponse
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, ConnectIndication.class);
+
+ public ConnectIndication()
+ {
+ }
+
+ @Override
+ protected short getSignalID()
+ {
+ return ECFProtocolConstants.SIGNAL_CONNECT;
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws IOException
+ {
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws IOException
+ {
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectRequest.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectRequest.java
new file mode 100644
index 0000000..d35bd51
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectRequest.java
@@ -0,0 +1,60 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.IChannel;
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
+import org.eclipse.net4j.signal.RequestWithConfirmation;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import org.eclipse.ecf.provider.internal.net4j.bundle.OM;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class ConnectRequest extends RequestWithConfirmation<ConnectResult>
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, ConnectRequest.class);
+
+ private String repositoryName;
+
+ public ConnectRequest(IChannel channel, String repositoryName)
+ {
+ super(channel);
+ this.repositoryName = repositoryName;
+ }
+
+ @Override
+ protected short getSignalID()
+ {
+ return ECFProtocolConstants.SIGNAL_CONNECT;
+ }
+
+ @Override
+ protected void requesting(ExtendedDataOutputStream out) throws IOException
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.format("Writing repositoryName: {0}", repositoryName);
+ }
+
+ out.writeString(repositoryName);
+ }
+
+ @Override
+ protected ConnectResult confirming(ExtendedDataInputStream in) throws IOException
+ {
+ return new ConnectResult();
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectResult.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectResult.java
new file mode 100644
index 0000000..b02e19d
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ConnectResult.java
@@ -0,0 +1,19 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+/**
+ * @author Eike Stepper
+ */
+public final class ConnectResult
+{
+
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/DisconnectIndication.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/DisconnectIndication.java
new file mode 100644
index 0000000..876a568
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/DisconnectIndication.java
@@ -0,0 +1,48 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import org.eclipse.ecf.provider.internal.net4j.bundle.OM;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class DisconnectIndication extends IndicationWithResponse
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, DisconnectIndication.class);
+
+ public DisconnectIndication()
+ {
+ }
+
+ @Override
+ protected short getSignalID()
+ {
+ return ECFProtocolConstants.SIGNAL_DISCONNECT;
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws IOException
+ {
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws IOException
+ {
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocol.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocol.java
new file mode 100644
index 0000000..7b432b1
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocol.java
@@ -0,0 +1,22 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+
+/**
+ * @author Eike Stepper
+ */
+public class ECFClientProtocol extends ECFProtocol
+{
+ public ECFClientProtocol()
+ {
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocolFactory.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocolFactory.java
new file mode 100644
index 0000000..a826d1b
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFClientProtocolFactory.java
@@ -0,0 +1,28 @@
+package org.eclipse.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.internal.net4j.ClientProtocolFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class ECFClientProtocolFactory extends ClientProtocolFactory
+{
+ public static final String TYPE = ECFProtocolConstants.PROTOCOL_NAME;
+
+ public ECFClientProtocolFactory()
+ {
+ super(TYPE);
+ }
+
+ public ECFClientProtocol create(String description)
+ {
+ return new ECFClientProtocol();
+ }
+
+ public static ECFClientProtocol get(IManagedContainer container, String description)
+ {
+ return (ECFClientProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocol.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocol.java
new file mode 100644
index 0000000..6f2a4f8
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocol.java
@@ -0,0 +1,45 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.signal.SignalProtocol;
+import org.eclipse.net4j.signal.SignalReactor;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class ECFProtocol extends SignalProtocol
+{
+ protected ECFProtocol()
+ {
+ }
+
+ public String getType()
+ {
+ return ECFProtocolConstants.PROTOCOL_NAME;
+ }
+
+ @Override
+ protected SignalReactor doCreateSignalReactor(short signalID)
+ {
+ switch (signalID)
+ {
+ case ECFProtocolConstants.SIGNAL_ASYNCH_MESSAGE:
+ return new AsynchMessageIndication();
+
+ case ECFProtocolConstants.SIGNAL_SYNCH_MESSAGE:
+ return new SynchMessageIndication();
+
+ default:
+ return null;
+ }
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocolConstants.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocolConstants.java
new file mode 100644
index 0000000..de768fb
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFProtocolConstants.java
@@ -0,0 +1,27 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+/**
+ * @author Eike Stepper
+ */
+public interface ECFProtocolConstants
+{
+ public static final String PROTOCOL_NAME = "ecf";
+
+ public static final short SIGNAL_CONNECT = 1;
+
+ public static final short SIGNAL_DISCONNECT = 2;
+
+ public static final short SIGNAL_ASYNCH_MESSAGE = 3;
+
+ public static final short SIGNAL_SYNCH_MESSAGE = 4;
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocol.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocol.java
new file mode 100644
index 0000000..4da68c9
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocol.java
@@ -0,0 +1,39 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.signal.SignalReactor;
+
+/**
+ * @author Eike Stepper
+ */
+public class ECFServerProtocol extends ECFProtocol
+{
+ public ECFServerProtocol()
+ {
+ }
+
+ @Override
+ protected SignalReactor doCreateSignalReactor(short signalID)
+ {
+ switch (signalID)
+ {
+ case ECFProtocolConstants.SIGNAL_CONNECT:
+ return new ConnectIndication();
+
+ case ECFProtocolConstants.SIGNAL_DISCONNECT:
+ return new DisconnectIndication();
+
+ default:
+ return super.doCreateSignalReactor(signalID);
+ }
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocolFactory.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocolFactory.java
new file mode 100644
index 0000000..aa22397
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/ECFServerProtocolFactory.java
@@ -0,0 +1,28 @@
+package org.eclipse.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.internal.net4j.ServerProtocolFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class ECFServerProtocolFactory extends ServerProtocolFactory
+{
+ public static final String TYPE = ECFProtocolConstants.PROTOCOL_NAME;
+
+ public ECFServerProtocolFactory()
+ {
+ super(TYPE);
+ }
+
+ public ECFServerProtocol create(String description)
+ {
+ return new ECFServerProtocol();
+ }
+
+ public static ECFServerProtocol get(IManagedContainer container, String description)
+ {
+ return (ECFServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/SynchMessageIndication.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/SynchMessageIndication.java
new file mode 100644
index 0000000..74d4ca4
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/protocol/SynchMessageIndication.java
@@ -0,0 +1,48 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.protocol;
+
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import org.eclipse.ecf.provider.internal.net4j.bundle.OM;
+
+import java.io.IOException;
+
+/**
+ * @author Eike Stepper
+ */
+public class SynchMessageIndication extends IndicationWithResponse
+{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, SynchMessageIndication.class);
+
+ public SynchMessageIndication()
+ {
+ }
+
+ @Override
+ protected short getSignalID()
+ {
+ return ECFProtocolConstants.SIGNAL_SYNCH_MESSAGE;
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws IOException
+ {
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws IOException
+ {
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/test/InitialTest.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/test/InitialTest.java
new file mode 100644
index 0000000..84cf722
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/internal/net4j/test/InitialTest.java
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * 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.ecf.provider.internal.net4j.test;
+
+import org.eclipse.net4j.tests.AbstractTransportTest;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.core.sharedobject.ISharedObjectContainerConfig;
+import org.eclipse.ecf.provider.generic.SOContainerConfig;
+import org.eclipse.ecf.provider.generic.TCPServerSOContainer;
+import org.eclipse.ecf.provider.internal.net4j.container.Net4jClientSOContainerFactory;
+import org.eclipse.ecf.provider.internal.net4j.container.Net4jServerSOContainerFactory;
+import org.eclipse.ecf.provider.net4j.ECFUtil;
+import org.eclipse.ecf.provider.net4j.container.Net4jClientSOContainer;
+import org.eclipse.ecf.provider.net4j.container.Net4jServerSOContainer;
+import org.eclipse.internal.net4j.Acceptor;
+
+/**
+ * @author Eike Stepper
+ */
+public class InitialTest extends AbstractTransportTest
+{
+ @Override
+ protected IManagedContainer createContainer()
+ {
+ IManagedContainer container = super.createContainer();
+ ECFUtil.prepareServerContainer(container);
+ ECFUtil.prepareClientContainer(container);
+ return container;
+ }
+
+ public void testFirst() throws Exception
+ {
+ Acceptor acceptor = getAcceptor();
+ acceptor.activate();
+
+ Net4jServerSOContainer server = Net4jServerSOContainerFactory.get(container, "group1");
+ Net4jClientSOContainer client = Net4jClientSOContainerFactory.get(container, "tcp://localhost/group1");
+ client.connect(server.getID(), null);
+
+ ISharedObjectContainerConfig config = new SOContainerConfig(IDFactory.getDefault().createGUID());
+ Net4jClientSOContainer container = new Net4jClientSOContainer(config);
+ // now join group
+ ID serverID = IDFactory.getDefault().createStringID(TCPServerSOContainer.getDefaultServerURL());
+ container.connect(serverID, null);
+ Thread.sleep(200000);
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/ECFUtil.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/ECFUtil.java
new file mode 100644
index 0000000..49ef780
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/ECFUtil.java
@@ -0,0 +1,44 @@
+/***************************************************************************
+ * 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.ecf.provider.net4j;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.provider.internal.net4j.container.Net4jClientContainerInjector;
+import org.eclipse.ecf.provider.internal.net4j.container.Net4jClientSOContainerFactory;
+import org.eclipse.ecf.provider.internal.net4j.container.Net4jServerContainerInjector;
+import org.eclipse.ecf.provider.internal.net4j.container.Net4jServerSOContainerFactory;
+import org.eclipse.ecf.provider.internal.net4j.protocol.ECFClientProtocolFactory;
+import org.eclipse.ecf.provider.internal.net4j.protocol.ECFServerProtocolFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class ECFUtil
+{
+ private ECFUtil()
+ {
+ }
+
+ public static void prepareServerContainer(IManagedContainer container)
+ {
+ container.registerFactory(new ECFServerProtocolFactory());
+ container.registerFactory(new Net4jServerSOContainerFactory());
+ container.addPostProcessor(new Net4jServerContainerInjector());
+ }
+
+ public static void prepareClientContainer(IManagedContainer container)
+ {
+ container.registerFactory(new ECFClientProtocolFactory());
+ container.registerFactory(new Net4jClientSOContainerFactory());
+ container.addPostProcessor(new Net4jClientContainerInjector());
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jClientSOContainer.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jClientSOContainer.java
new file mode 100644
index 0000000..bf11221
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jClientSOContainer.java
@@ -0,0 +1,75 @@
+/***************************************************************************
+ * 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.ecf.provider.net4j.container;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDCreateException;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.core.sharedobject.ISharedObjectContainerConfig;
+import org.eclipse.ecf.provider.comm.ConnectionCreateException;
+import org.eclipse.ecf.provider.comm.ISynchAsynchConnection;
+import org.eclipse.ecf.provider.generic.ClientSOContainer;
+import org.eclipse.ecf.provider.generic.SOContainerConfig;
+import org.eclipse.ecf.provider.internal.net4j.Net4jConnection;
+import org.eclipse.ecf.provider.net4j.identity.Net4jID;
+
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class Net4jClientSOContainer extends ClientSOContainer
+{
+ private IManagedContainer net4jContainer;
+
+ public Net4jClientSOContainer(ISharedObjectContainerConfig config)
+ {
+ super(config);
+ }
+
+ public Net4jClientSOContainer(ID id, Map<?, ?> properties) throws IDCreateException
+ {
+ this(new SOContainerConfig(id, properties));
+ }
+
+ public Net4jClientSOContainer(Map<?, ?> properties) throws IDCreateException
+ {
+ this(IDFactory.getDefault().createGUID(), properties);
+ }
+
+ public Net4jClientSOContainer(ID id) throws IDCreateException
+ {
+ this(id, null);
+ }
+
+ public Net4jClientSOContainer() throws IDCreateException
+ {
+ this(IDFactory.getDefault().createGUID(), null);
+ }
+
+ public IManagedContainer getNet4jContainer()
+ {
+ return net4jContainer;
+ }
+
+ public void setNet4jContainer(IManagedContainer net4jContainer)
+ {
+ this.net4jContainer = net4jContainer;
+ }
+
+ @Override
+ protected ISynchAsynchConnection createConnection(ID targetID, Object data) throws ConnectionCreateException
+ {
+ return new Net4jConnection(this, (Net4jID)targetID, data);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jServerSOContainer.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jServerSOContainer.java
new file mode 100644
index 0000000..c41e9ac
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/container/Net4jServerSOContainer.java
@@ -0,0 +1,60 @@
+/***************************************************************************
+ * 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.ecf.provider.net4j.container;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.provider.generic.SOContainerConfig;
+import org.eclipse.ecf.provider.generic.ServerSOContainer;
+
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ */
+public class Net4jServerSOContainer extends ServerSOContainer
+{
+ private IManagedContainer net4jContainer;
+
+ @Deprecated
+ public Net4jServerSOContainer(ID id, Map<?, ?> properties)
+ {
+ super(new Config(id, properties));
+ }
+
+ @Override
+ public Config getConfig()
+ {
+ return (Config)super.getConfig();
+ }
+
+ public IManagedContainer getNet4jContainer()
+ {
+ return net4jContainer;
+ }
+
+ public void setNet4jContainer(IManagedContainer net4jContainer)
+ {
+ this.net4jContainer = net4jContainer;
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Config extends SOContainerConfig
+ {
+ public Config(ID id, Map<?, ?> properties)
+ {
+ super(id, properties);
+ }
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jID.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jID.java
new file mode 100644
index 0000000..9e43bd2
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jID.java
@@ -0,0 +1,62 @@
+/***************************************************************************
+ * 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.ecf.provider.net4j.identity;
+
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.identity.StringID;
+
+/**
+ * @author Eike Stepper
+ */
+public class Net4jID extends StringID
+{
+ private static final long serialVersionUID = 1L;
+
+ private String connectorType;
+
+ private String connectorDescription;
+
+ private String groupName;
+
+ protected Net4jID(Namespace n, String s)
+ {
+ super(n, s);
+ init();
+ }
+
+ @Override
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer("NET4JID["); //$NON-NLS-1$
+ sb.append(getName()).append("]"); //$NON-NLS-1$
+ return sb.toString();
+ }
+
+ public String getConnectorType()
+ {
+ return connectorType;
+ }
+
+ public String getConnectorDescription()
+ {
+ return connectorDescription;
+ }
+
+ public String getGroupName()
+ {
+ return groupName;
+ }
+
+ private void init()
+ {
+ String name = getName();
+ }
+}
diff --git a/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jNamespace.java b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jNamespace.java
new file mode 100644
index 0000000..c157189
--- /dev/null
+++ b/org.eclipse.ecf.provider.net4j/src/org/eclipse/ecf/provider/net4j/identity/Net4jNamespace.java
@@ -0,0 +1,71 @@
+/***************************************************************************
+ * 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.ecf.provider.net4j.identity;
+
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDCreateException;
+import org.eclipse.ecf.core.identity.Namespace;
+
+import java.net.URI;
+
+/**
+ * @author Eike Stepper
+ */
+public class Net4jNamespace extends Namespace
+{
+ private static final long serialVersionUID = 1L;
+
+ private static final String SCHEME = "net4j"; //$NON-NLS-1$
+
+ public static final String NAME = "ecf.net4j"; //$NON-NLS-1$
+
+ public Net4jNamespace()
+ {
+ super(NAME, null);
+ }
+
+ @Override
+ public ID createInstance(Object[] args) throws IDCreateException
+ {
+ try
+ {
+ if (args.length == 1)
+ {
+ if (args[0] instanceof String)
+ {
+ return new Net4jID(this, (String)args[0]);
+ }
+ else if (args[0] instanceof URI)
+ {
+ return new Net4jID(this, ((URI)args[0]).toString());
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new IDCreateException(e);
+ }
+
+ throw new IDCreateException("Net4j ID constructor arguments invalid");
+ }
+
+ @Override
+ public String getScheme()
+ {
+ return SCHEME;
+ }
+
+ @Override
+ public Class<?>[][] getSupportedParameterTypes()
+ {
+ return new Class[][] { { String.class }, { URI.class } };
+ }
+}