Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.net4j.tests')
-rw-r--r--plugins/org.eclipse.net4j.tests/.classpath7
-rw-r--r--plugins/org.eclipse.net4j.tests/.cvsignore3
-rw-r--r--plugins/org.eclipse.net4j.tests/.project28
-rw-r--r--plugins/org.eclipse.net4j.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.net4j.tests/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF19
-rw-r--r--plugins/org.eclipse.net4j.tests/Net4j AllTests.launch20
-rw-r--r--plugins/org.eclipse.net4j.tests/Net4j OSGi.launch462
-rw-r--r--plugins/org.eclipse.net4j.tests/about.html28
-rw-r--r--plugins/org.eclipse.net4j.tests/about.ini15
-rw-r--r--plugins/org.eclipse.net4j.tests/about.mappings6
-rw-r--r--plugins/org.eclipse.net4j.tests/about.properties31
-rw-r--r--plugins/org.eclipse.net4j.tests/build.properties25
-rw-r--r--plugins/org.eclipse.net4j.tests/copyright.txt8
-rw-r--r--plugins/org.eclipse.net4j.tests/epl-v10.html319
-rw-r--r--plugins/org.eclipse.net4j.tests/license.html319
-rw-r--r--plugins/org.eclipse.net4j.tests/modeling32.pngbin2414 -> 0 bytes
-rw-r--r--plugins/org.eclipse.net4j.tests/plugin.properties25
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java130
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AllTests.java44
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/BufferPoolTest.java97
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java33
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ConnectorTest.java291
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java87
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/HugeData.java245
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/Performance.java132
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java37
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java38
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java72
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPTransportTest.java416
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPUnitTest.java28
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java44
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java41
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/bundle/Activator.java28
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java43
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java50
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java41
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java43
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java52
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java50
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java43
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java50
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java43
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java50
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java33
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java60
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java33
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java120
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MonitorTest.java155
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MultiMapTest.java291
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ReferenceValueMapTest.java43
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java233
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java108
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SynchronizingCorrelatorTest.java151
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java65
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ZipTest.java34
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/CacheTest.java54
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/Revision.java83
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/RevisionManager.java162
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java84
-rw-r--r--plugins/org.eclipse.net4j.tests/test.xml47
61 files changed, 0 insertions, 5309 deletions
diff --git a/plugins/org.eclipse.net4j.tests/.classpath b/plugins/org.eclipse.net4j.tests/.classpath
deleted file mode 100644
index 304e86186a..0000000000
--- a/plugins/org.eclipse.net4j.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.net4j.tests/.cvsignore b/plugins/org.eclipse.net4j.tests/.cvsignore
deleted file mode 100644
index 4824d73869..0000000000
--- a/plugins/org.eclipse.net4j.tests/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-*.zip
-testMap.dat
diff --git a/plugins/org.eclipse.net4j.tests/.project b/plugins/org.eclipse.net4j.tests/.project
deleted file mode 100644
index 513e06956d..0000000000
--- a/plugins/org.eclipse.net4j.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.net4j.tests</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/plugins/org.eclipse.net4j.tests/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.net4j.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5610326f1a..0000000000
--- a/plugins/org.eclipse.net4j.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Sun Dec 17 20:01:15 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.net4j.tests/.settings/org.eclipse.pde.core.prefs b/plugins/org.eclipse.net4j.tests/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 66347c68f0..0000000000
--- a/plugins/org.eclipse.net4j.tests/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Oct 20 11:53:34 CEST 2006
-eclipse.preferences.version=1
-pluginProject.extensions=false
diff --git a/plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 5bdde62917..0000000000
--- a/plugins/org.eclipse.net4j.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.net4j.tests
-Bundle-Version: 0.8.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Activator: org.eclipse.net4j.tests.bundle.Activator
-Bundle-ClassPath: .
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.net4j.tcp;bundle-version="[0.8.0,0.9.0)";visibility:=reexport,
- org.eclipse.net4j.jvm;bundle-version="[0.8.0,0.9.0)";visibility:=reexport,
- org.junit;visibility:=reexport
-Export-Package: org.eclipse.net4j.tests,
- org.eclipse.net4j.tests.signal,
- org.eclipse.net4j.util.tests,
- org.eclipse.net4j.util.tests.cache
-Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.net4j.tests/Net4j AllTests.launch b/plugins/org.eclipse.net4j.tests/Net4j AllTests.launch
deleted file mode 100644
index 4a82821baf..0000000000
--- a/plugins/org.eclipse.net4j.tests/Net4j AllTests.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<stringAttribute key="bad_container_name" value="\org.eclipse.net4.tests"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;org.eclipse.emf.cdo&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.net4j.tests.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.net4j.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Ddebug=true"/>
-</launchConfiguration>
diff --git a/plugins/org.eclipse.net4j.tests/Net4j OSGi.launch b/plugins/org.eclipse.net4j.tests/Net4j OSGi.launch
deleted file mode 100644
index 8fed774488..0000000000
--- a/plugins/org.eclipse.net4j.tests/Net4j OSGi.launch
+++ /dev/null
@@ -1,462 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="true"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="org.eclipse.net4j"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.emf.cdo.dbgen.editor,org.eclipse.emf.cdo.utilities.migrator,template,org.eclipse.emf.cdo.examples.server,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.examples.client,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.examples.ui,org.eclipse.emf.cdo.client,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.server,org.eclipse.emf.cdo.client.ocl,org.eclipse.emf.cdo.dbgen.edit,org.eclipse.emf.cdo.examples.library,org.eclipse.emf.cdo.examples.library.ui,org.eclipse.emf.cdo.client.edit,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.net4j.tests.SignalTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-Ddebug&#13;&#10;-Dconsole&#13;&#10;-DconsoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.net4j.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="selectedPlugin" value="org.eclipse.net4j"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.jobs,org.eclipse.core.runtime,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.emf.common,org.eclipse.equinox.app,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.jdt.junit.runtime,org.eclipse.jface,org.eclipse.osgi,org.eclipse.osgi.services,org.eclipse.osgi.util,org.eclipse.pde.junit.runtime,org.eclipse.swt,org.eclipse.swt.win32.win32.x86,org.eclipse.ui,org.eclipse.ui.workbench,org.junit"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.net4j.tests,org.eclipse.net4j"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="true"/>
-<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/dnd/tracing" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug" value="true"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
-<mapEntry key="org.eclipse.emf.query.ocl/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.emf.transaction/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.emf.ocl/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
-<mapEntry key="org.eclipse.emf.query.ocl/debug" value="true"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/constraints" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/dnd/tracing" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.emf.transaction/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/services/execute" value="false"/>
-<mapEntry key="org.eclipse.emf.query/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/services/config" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
-<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
-<mapEntry key="org.eclipse.emf.validation/debug/parsers" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.emf.workspace/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/resources" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/events/tracing" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.emf.workspace/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
-<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/showSystemJobs" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug" value="true"/>
-<mapEntry key="org.eclipse.emf.validation/debug/constraints/disabled" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/plugin/ondemand/loading" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.emf.query.ocl/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.net4j/perf" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/services/activate" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug" value="true"/>
-<mapEntry key="org.eclipse.net4j/debug" value="true"/>
-<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.emf.query/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/dnd/tracing" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/formatter/enable_new" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/execute" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/model/operations" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/services/config" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug" value="true"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/filter/events" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/actions/run" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/events/tracing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.emf.workspace/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
-<mapEntry key="org.eclipse.net4j/debug.lifecycle.dump" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
-<mapEntry key="org.eclipse.emf.transaction/debug/transactions" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="com.soyatec.uml.core/trace/level" value="error"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
-<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
-<mapEntry key="com.soyatec.uml.core/trace/module/UMLPlugin" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui.properties/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/redo" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/listeners" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.net4j/debug.connector" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/filter/persistencemgr" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.clipboard.core/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/dnd/tracing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/grouping" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/dnd/tracing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.ui/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/cache" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug" value="true"/>
-<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
-<mapEntry key="org.eclipse.emf.validation/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
-<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
-<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
-<mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/xml" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.emf.workspace/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
-<mapEntry key="org.eclipse.emf.query/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.emf.ocl/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
-<mapEntry key="org.eclipse.emf.transaction/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.notation.providers/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/monitorbundles" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.figures/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.emf.workspace/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.emf.query.ocl/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/dnd/tracing" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.commands.core/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
-<mapEntry key="org.eclipse.emf.transaction/debug/locking" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/providers" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/actions/run" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render/debug/exceptions/catching" value="false"/>
-<mapEntry key="com.soyatec.uml.core/trace/module/viewEvent" value="false"/>
-<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
-<mapEntry key="org.eclipse.emf.ocl/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug" value="true"/>
-<mapEntry key="org.eclipse.emf.query/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui/debug/filter/canonical" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.action/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
-<mapEntry key="org.eclipse.emf.query/debug" value="true"/>
-<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/actions/admin" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
-<mapEntry key="org.eclipse.net4j/debug.lifecycle" value="true"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
-<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
-<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/services/config" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
-<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug/actions/admin" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.printing/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.type.core/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
-<mapEntry key="org.eclipse.emf.transaction/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/debug/services" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/actions/repeat" value="false"/>
-<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="com.soyatec.uml.std/trace/module/modelMapper" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.ui.actions/debug" value="true"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.emf.ocl/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.emf.core/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.services.dnd/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui.action/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.draw2d.ui.render.awt/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/constraints/evaluation" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="com.soyatec.uml.std/trace/module/modelJavaEvent" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.gef.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/undo" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.core/debug/commands/admin" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
-<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.emf.query.ocl/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.emf.transaction/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.emf.ocl/debug" value="true"/>
-<mapEntry key="org.eclipse.gmf.runtime.common.ui/debug/resource/tracing" value="false"/>
-<mapEntry key="org.eclipse.gmf.runtime.diagram.core/debug/methods/exiting" value="false"/>
-</mapAttribute>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
diff --git a/plugins/org.eclipse.net4j.tests/about.html b/plugins/org.eclipse.net4j.tests/about.html
deleted file mode 100644
index d35d5aed64..0000000000
--- a/plugins/org.eclipse.net4j.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 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'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
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/plugins/org.eclipse.net4j.tests/about.ini b/plugins/org.eclipse.net4j.tests/about.ini
deleted file mode 100644
index b7e87ca285..0000000000
--- a/plugins/org.eclipse.net4j.tests/about.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%featureText
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=modeling32.png
-
-# Property "appName" contains name of the application (translated)
-appName=%featureName
-
diff --git a/plugins/org.eclipse.net4j.tests/about.mappings b/plugins/org.eclipse.net4j.tests/about.mappings
deleted file mode 100644
index bddaab4310..0000000000
--- a/plugins/org.eclipse.net4j.tests/about.mappings
+++ /dev/null
@@ -1,6 +0,0 @@
-# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
-0=@build@ \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.tests/about.properties b/plugins/org.eclipse.net4j.tests/about.properties
deleted file mode 100644
index 47cce04221..0000000000
--- a/plugins/org.eclipse.net4j.tests/about.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (c) 2004 - 2008 Eike Stepper, Germany.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Eike Stepper - initial API and implementation
-
-# 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.
-# ==============================================================================
-
-featureName = Net4j Tests(Incubation)
-featureText = Net4j Tests\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-Copyright (c) 2004 - 2008 Eike Stepper, Germany. All rights reserved.\n\
-\n\
-Visit http://wiki.eclipse.org/Net4j
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
diff --git a/plugins/org.eclipse.net4j.tests/build.properties b/plugins/org.eclipse.net4j.tests/build.properties
deleted file mode 100644
index e842be8eed..0000000000
--- a/plugins/org.eclipse.net4j.tests/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (c) 2004 - 2008 Eike Stepper, Germany.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Eike Stepper - initial API and implementation
-
-# NLS_MESSAGEFORMAT_VAR
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- copyright.txt,\
- epl-v10.html,\
- license.html,\
- plugin.properties,\
- test.xml,\
- about.ini,\
- about.mappings,\
- about.properties,\
- modeling32.png
diff --git a/plugins/org.eclipse.net4j.tests/copyright.txt b/plugins/org.eclipse.net4j.tests/copyright.txt
deleted file mode 100644
index 529118d99e..0000000000
--- a/plugins/org.eclipse.net4j.tests/copyright.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright (c) 2004 - 2008 Eike Stepper, Germany.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
- Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.tests/epl-v10.html b/plugins/org.eclipse.net4j.tests/epl-v10.html
deleted file mode 100644
index d7b88e9416..0000000000
--- a/plugins/org.eclipse.net4j.tests/epl-v10.html
+++ /dev/null
@@ -1,319 +0,0 @@
-<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/plugins/org.eclipse.net4j.tests/license.html b/plugins/org.eclipse.net4j.tests/license.html
deleted file mode 100644
index d7b88e9416..0000000000
--- a/plugins/org.eclipse.net4j.tests/license.html
+++ /dev/null
@@ -1,319 +0,0 @@
-<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/plugins/org.eclipse.net4j.tests/modeling32.png b/plugins/org.eclipse.net4j.tests/modeling32.png
deleted file mode 100644
index 6b08de2ada..0000000000
--- a/plugins/org.eclipse.net4j.tests/modeling32.png
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.net4j.tests/plugin.properties b/plugins/org.eclipse.net4j.tests/plugin.properties
deleted file mode 100644
index 2b46fc1ebf..0000000000
--- a/plugins/org.eclipse.net4j.tests/plugin.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (c) 2004 - 2008 Eike Stepper, Germany.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Eike Stepper - initial API and implementation
-
-# 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 = Net4j Tests (Incubation)
-providerName = Eclipse.org
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java
deleted file mode 100644
index 2850dbe7b7..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AbstractTransportTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.Net4jUtil;
-import org.eclipse.net4j.acceptor.IAcceptor;
-import org.eclipse.net4j.connector.IConnector;
-import org.eclipse.net4j.internal.util.container.ManagedContainer;
-import org.eclipse.net4j.jvm.JVMUtil;
-import org.eclipse.net4j.tcp.TCPUtil;
-import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
-import org.eclipse.internal.net4j.acceptor.Acceptor;
-import org.eclipse.internal.net4j.connector.Connector;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractTransportTest extends AbstractOMTest
-{
- protected static final String HOST = "localhost";
-
- protected IManagedContainer container;
-
- private IAcceptor acceptor;
-
- private IConnector connector;
-
- @Override
- protected void doSetUp() throws Exception
- {
- super.doSetUp();
- container = createContainer();
- LifecycleUtil.activate(container);
- }
-
- @Override
- protected void doTearDown() throws Exception
- {
- try
- {
- sleep(20);
- LifecycleUtil.deactivate(container);
- }
- finally
- {
- connector = null;
- acceptor = null;
- container = null;
- super.doTearDown();
- }
- }
-
- protected boolean useJVMTransport()
- {
- return false;
- }
-
- protected IManagedContainer createContainer()
- {
- IManagedContainer container = new ManagedContainer();
- Net4jUtil.prepareContainer(container);
- if (useJVMTransport())
- {
- JVMUtil.prepareContainer(container);
- }
- else
- {
- TCPUtil.prepareContainer(container);
- }
-
- return container;
- }
-
- protected IAcceptor getAcceptor()
- {
- if (acceptor == null)
- {
- if (useJVMTransport())
- {
- acceptor = (Acceptor)JVMUtil.getAcceptor(container, "default");
- }
- else
- {
- acceptor = (Acceptor)TCPUtil.getAcceptor(container, null);
- }
- }
-
- return acceptor;
- }
-
- protected IConnector getConnector()
- {
- if (connector == null)
- {
- if (useJVMTransport())
- {
- connector = (Connector)JVMUtil.getConnector(container, "default");
- }
- else
- {
- connector = (Connector)TCPUtil.getConnector(container, HOST);
- }
- }
-
- return connector;
- }
-
- protected void startTransport() throws Exception
- {
- if (container != null)
- {
- IAcceptor acceptor = getAcceptor();
- LifecycleUtil.activate(acceptor);
-
- IConnector connector = getConnector();
- LifecycleUtil.activate(connector);
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AllTests.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AllTests.java
deleted file mode 100644
index 1f12f78712..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/AllTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.util.tests.MonitorTest;
-import org.eclipse.net4j.util.tests.MultiMapTest;
-import org.eclipse.net4j.util.tests.ReferenceValueMapTest;
-import org.eclipse.net4j.util.tests.SortedFileMapTest;
-import org.eclipse.net4j.util.tests.SynchronizingCorrelatorTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author Eike Stepper
- */
-public class AllTests
-{
- public static Test suite()
- {
- TestSuite suite = new TestSuite("Tests for Net4j");
-
- // $JUnit-BEGIN$
- suite.addTestSuite(MonitorTest.class);
- suite.addTestSuite(MultiMapTest.class);
- suite.addTestSuite(SortedFileMapTest.class);
- suite.addTestSuite(SynchronizingCorrelatorTest.class);
- suite.addTestSuite(ReferenceValueMapTest.class);
- suite.addTestSuite(BufferPoolTest.class);
- // suite.addTestSuite(SecurityTest.class);
- // TODO suite.addTestSuite(ConnectorTest.class);
- // $JUnit-END$
-
- return suite;
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/BufferPoolTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/BufferPoolTest.java
deleted file mode 100644
index 2bc848e01e..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/BufferPoolTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.Net4jUtil;
-import org.eclipse.net4j.buffer.IBuffer;
-import org.eclipse.net4j.buffer.IBufferPool;
-import org.eclipse.net4j.util.ReflectUtil;
-import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * @author Eike Stepper
- */
-public class BufferPoolTest extends AbstractOMTest
-{
- private static IBufferPool bufferPool = Net4jUtil.createBufferPool();
-
- private static Collection<byte[]> memory = new ArrayList<byte[]>();
-
- @Override
- protected void doTearDown() throws Exception
- {
- memory.clear();
- super.doTearDown();
- }
-
- public void testBufferPool() throws Exception
- {
- LifecycleUtil.activate(bufferPool);
-
- IBuffer[] buffers = new IBuffer[10];
- for (int i = 0; i < buffers.length; i++)
- {
- buffers[i] = bufferPool.provideBuffer();
- }
-
- for (int i = 0; i < buffers.length; i++)
- {
- bufferPool.retainBuffer(buffers[i]);
- buffers[i] = null;
- }
-
- while (Net4jUtil.getPooledBuffers(bufferPool) > 0 && allocate())
- {
- sleep(200);
- ReflectUtil.dump(bufferPool);
- }
-
- LifecycleUtil.deactivate(bufferPool);
- }
-
- private static void msg()
- {
- msg("pooledBuffers = " + Net4jUtil.getPooledBuffers(bufferPool));
- }
-
- private static boolean allocate()
- {
- try
- {
- IOUtil.OUT().println("allocating from " + Runtime.getRuntime().freeMemory());
- for (int i = 0; i < 10; i++)
- {
- memory.add(new byte[1000000]);
- }
-
- msg();
- return true;
- }
- catch (Throwable t)
- {
- return false;
- }
- }
-
- @SuppressWarnings("unused")
- private static void gc()
- {
- msg();
- IOUtil.OUT().println("collecting garbage");
- System.gc();
- msg();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java
deleted file mode 100644
index ed8c9f2242..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ClientTestProtocolFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.util.factory.ProductCreationException;
-
-import org.eclipse.internal.net4j.protocol.ClientProtocolFactory;
-
-/**
- * @author Eike Stepper
- */
-public class ClientTestProtocolFactory extends ClientProtocolFactory
-{
- public static final String TYPE = ServerTestProtocolFactory.TYPE;
-
- public ClientTestProtocolFactory()
- {
- super(TYPE);
- }
-
- public TestProtocol create(String description) throws ProductCreationException
- {
- return new TestProtocol(null);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ConnectorTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ConnectorTest.java
deleted file mode 100644
index b012edcc68..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ConnectorTest.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.Net4jUtil;
-import org.eclipse.net4j.buffer.IBufferPool;
-import org.eclipse.net4j.internal.tcp.TCPAcceptor;
-import org.eclipse.net4j.internal.tcp.TCPClientConnector;
-import org.eclipse.net4j.internal.tcp.TCPSelector;
-import org.eclipse.net4j.internal.util.security.ChallengeNegotiator;
-import org.eclipse.net4j.internal.util.security.PasswordCredentials;
-import org.eclipse.net4j.internal.util.security.PasswordCredentialsProvider;
-import org.eclipse.net4j.internal.util.security.Randomizer;
-import org.eclipse.net4j.internal.util.security.ResponseNegotiator;
-import org.eclipse.net4j.internal.util.security.UserManager;
-import org.eclipse.net4j.tcp.ITCPSelector;
-import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
-import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
-import java.nio.channels.ServerSocketChannel;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @author Eike Stepper
- */
-public class ConnectorTest extends AbstractOMTest
-{
- private static final int TIMEOUT = 10000;
-
- private static final String USER_ID = "stepper";
-
- private static final char[] PASSWORD1 = "eike2007".toCharArray();
-
- private static final char[] PASSWORD2 = "invalid".toCharArray();
-
- private static final PasswordCredentials CREDENTIALS = new PasswordCredentials(USER_ID, PASSWORD1);
-
- private ExecutorService threadPool;
-
- private IBufferPool bufferPool;
-
- private TCPSelector selector;
-
- private TCPAcceptor acceptor;
-
- private TCPClientConnector connector;
-
- private Randomizer randomizer;
-
- private UserManager userManager;
-
- private ChallengeNegotiator challengeNegotiator;
-
- private PasswordCredentialsProvider credentialsProvider;
-
- private ResponseNegotiator responseNegotiator;
-
- @Override
- protected void doTearDown() throws Exception
- {
- cleanup();
- super.doTearDown();
- }
-
- private void cleanup() throws Exception
- {
- sleep(100);
- LifecycleUtil.deactivate(connector);
- LifecycleUtil.deactivate(responseNegotiator);
- LifecycleUtil.deactivate(credentialsProvider);
- connector = null;
- responseNegotiator = null;
- credentialsProvider = null;
-
- LifecycleUtil.deactivate(acceptor);
- LifecycleUtil.deactivate(challengeNegotiator);
- LifecycleUtil.deactivate(userManager);
- LifecycleUtil.deactivate(randomizer);
- acceptor = null;
- challengeNegotiator = null;
- userManager = null;
- randomizer = null;
-
- LifecycleUtil.deactivate(selector);
- LifecycleUtil.deactivate(bufferPool);
- LifecycleUtil.deactivate(threadPool);
- selector = null;
- bufferPool = null;
- threadPool = null;
- }
-
- public void testDeferredActivation() throws Exception
- {
- final long DELAY = 500L;
- threadPool = Executors.newCachedThreadPool();
- LifecycleUtil.activate(threadPool);
-
- bufferPool = Net4jUtil.createBufferPool();
- LifecycleUtil.activate(bufferPool);
-
- selector = new TCPSelector();
- selector.activate();
-
- acceptor = new TCPAcceptor()
- {
- @Override
- public void handleAccept(ITCPSelector selector, ServerSocketChannel serverSocketChannel)
- {
- ConcurrencyUtil.sleep(DELAY);
- super.handleAccept(selector, serverSocketChannel);
- }
- };
-
- acceptor.setStartSynchronously(true);
- acceptor.setSynchronousStartTimeout(TIMEOUT);
- acceptor.setBufferProvider(bufferPool);
- acceptor.setReceiveExecutor(threadPool);
- acceptor.setSelector(selector);
- acceptor.setAddress("0.0.0.0");
- acceptor.setPort(2036);
- acceptor.activate();
-
- connector = new TCPClientConnector();
- connector.setBufferProvider(bufferPool);
- connector.setReceiveExecutor(threadPool);
- connector.setSelector(selector);
- connector.setHost("localhost");
- connector.setPort(2036);
- connector.activate();
- assertEquals(false, connector.isActive());
-
- boolean connected = connector.waitForConnection(DELAY + TIMEOUT);
- assertEquals(true, connected);
- assertEquals(true, connector.isActive());
- }
-
- public void testDeferredActivation100() throws Exception
- {
- for (int i = 0; i < 100; i++)
- {
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- IOUtil.OUT().println("#####################################################");
- IOUtil.OUT().println(" RUN = " + i);
- IOUtil.OUT().println("#####################################################");
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- testDeferredActivation();
- cleanup();
- }
- }
-
- public void testNegotiationSuccess() throws Exception
- {
- threadPool = Executors.newCachedThreadPool();
- LifecycleUtil.activate(threadPool);
-
- bufferPool = Net4jUtil.createBufferPool();
- LifecycleUtil.activate(bufferPool);
-
- randomizer = new Randomizer();
- randomizer.activate();
-
- userManager = new UserManager();
- userManager.activate();
- userManager.addUser(USER_ID, PASSWORD1);
-
- challengeNegotiator = new ChallengeNegotiator();
- challengeNegotiator.setRandomizer(randomizer);
- challengeNegotiator.setUserManager(userManager);
- challengeNegotiator.activate();
-
- selector = new TCPSelector();
- selector.activate();
-
- acceptor = new TCPAcceptor();
- acceptor.setStartSynchronously(true);
- acceptor.setSynchronousStartTimeout(TIMEOUT);
- acceptor.setBufferProvider(bufferPool);
- acceptor.setReceiveExecutor(threadPool);
- // acceptor.setNegotiator(challengeNegotiator);
- acceptor.setSelector(selector);
- acceptor.setAddress("0.0.0.0");
- acceptor.setPort(2036);
- acceptor.activate();
-
- credentialsProvider = new PasswordCredentialsProvider(CREDENTIALS);
- LifecycleUtil.activate(credentialsProvider);
-
- responseNegotiator = new ResponseNegotiator();
- responseNegotiator.setCredentialsProvider(credentialsProvider);
- responseNegotiator.activate();
-
- connector = new TCPClientConnector();
- connector.setBufferProvider(bufferPool);
- connector.setReceiveExecutor(threadPool);
- // connector.setNegotiator(responseNegotiator);
- connector.setSelector(selector);
- connector.setHost("localhost");
- connector.setPort(2036);
- connector.activate();
-
- boolean connected = connector.waitForConnection(TIMEOUT);
- assertEquals(true, connected);
- }
-
- public void testNegotiationSuccess100() throws Exception
- {
- for (int i = 0; i < 100; i++)
- {
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- IOUtil.OUT().println("#####################################################");
- IOUtil.OUT().println(" RUN = " + i);
- IOUtil.OUT().println("#####################################################");
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- testNegotiationSuccess();
- cleanup();
- }
- }
-
- public void testNegotiationFailure() throws Exception
- {
- ExecutorService threadPool = Executors.newCachedThreadPool();
- LifecycleUtil.activate(threadPool);
-
- IBufferPool bufferPool = Net4jUtil.createBufferPool();
- LifecycleUtil.activate(bufferPool);
-
- Randomizer randomizer = new Randomizer();
- randomizer.activate();
-
- UserManager userManager = new UserManager();
- userManager.activate();
- userManager.addUser(USER_ID, PASSWORD2);
-
- ChallengeNegotiator challengeNegotiator = new ChallengeNegotiator();
- challengeNegotiator.setRandomizer(randomizer);
- challengeNegotiator.setUserManager(userManager);
- challengeNegotiator.activate();
-
- TCPSelector selector = new TCPSelector();
- selector.activate();
-
- acceptor = new TCPAcceptor();
- acceptor.setStartSynchronously(true);
- acceptor.setSynchronousStartTimeout(TIMEOUT);
- acceptor.setBufferProvider(bufferPool);
- acceptor.setReceiveExecutor(threadPool);
- acceptor.setNegotiator(challengeNegotiator);
- acceptor.setSelector(selector);
- acceptor.setAddress("0.0.0.0");
- acceptor.setPort(2036);
- acceptor.activate();
-
- PasswordCredentialsProvider credentialsProvider = new PasswordCredentialsProvider(CREDENTIALS);
- LifecycleUtil.activate(credentialsProvider);
-
- ResponseNegotiator responseNegotiator = new ResponseNegotiator();
- responseNegotiator.setCredentialsProvider(credentialsProvider);
- responseNegotiator.activate();
-
- TCPClientConnector connector = new TCPClientConnector();
- connector.setBufferProvider(bufferPool);
- connector.setReceiveExecutor(threadPool);
- connector.setNegotiator(responseNegotiator);
- connector.setSelector(selector);
- connector.setHost("localhost");
- connector.setPort(2036);
- connector.activate();
-
- boolean connected = connector.waitForConnection(TIMEOUT);
- assertEquals(false, connected);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java
deleted file mode 100644
index 5d3f9d8497..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/FailOverTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.signal.failover.IFailOverStrategy;
-import org.eclipse.net4j.signal.failover.RetryFailOverStrategy;
-import org.eclipse.net4j.tests.signal.IntFailRequest;
-import org.eclipse.net4j.tests.signal.IntRequest;
-import org.eclipse.net4j.tests.signal.TestSignalClientProtocolFactory;
-import org.eclipse.net4j.tests.signal.TestSignalServerProtocolFactory;
-import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
-
-/**
- * @author Eike Stepper
- */
-public class FailOverTest extends AbstractTransportTest
-{
- @Override
- protected IManagedContainer createContainer()
- {
- IManagedContainer container = super.createContainer();
- container.registerFactory(new TestSignalServerProtocolFactory());
- container.registerFactory(new TestSignalClientProtocolFactory());
- return container;
- }
-
- public void testFailingBefore() throws Exception
- {
- startTransport();
- IChannel channel = getConnector().openChannel(TestSignalClientProtocolFactory.TYPE, null);
-
- // Simulate a disconnect from the server.
- LifecycleUtil.deactivate(getAcceptor());
-
- int data = 0x0a;
- IFailOverStrategy failOverStrategy = new RetryFailOverStrategy(getConnector());
-
- // Exception HERE
- IntRequest request = new IntRequest(channel, data);
-
- int result = failOverStrategy.send(request);
- assertEquals(data, result);
- }
-
- public void testFailingDuring() throws Exception
- {
- startTransport();
- IChannel channel = getConnector().openChannel(TestSignalClientProtocolFactory.TYPE, null);
-
- int data = 0x0a;
- IFailOverStrategy failOverStrategy = new RetryFailOverStrategy(getConnector());
-
- // Exception HERE
- IntRequest request = new IntRequest(channel, data);
-
- // Simulate a disconnect from the server.
- LifecycleUtil.deactivate(getAcceptor());
-
- int result = failOverStrategy.send(request);
- assertEquals(data, result);
- }
-
- public void testFailingDuring2() throws Exception
- {
- startTransport();
- IChannel channel = getConnector().openChannel(TestSignalClientProtocolFactory.TYPE, null);
-
- int data = 0x0a;
- IFailOverStrategy failOverStrategy = new RetryFailOverStrategy(getConnector());
-
- // Exception HERE
- IntFailRequest request = new IntFailRequest(channel, data);
-
- int result = failOverStrategy.send(request, 1000);
- assertEquals(data, result);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/HugeData.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/HugeData.java
deleted file mode 100644
index 0908455e7b..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/HugeData.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import java.util.StringTokenizer;
-
-/**
- * @author Eike Stepper
- */
-public final class HugeData
-{
- public static final String NL = System.getProperty("line.separator");
-
- public static StringTokenizer getTokenizer()
- {
- return new StringTokenizer(getText(), NL);
- }
-
- public static String[] getArray()
- {
- return getText().split(NL);
- }
-
- public static byte[] getBytes()
- {
- return getText().getBytes();
- }
-
- public static String getText()
- {
- return "/***************************************************************************" + NL
- + " * COPYRIGHT (C) 2004 - 2008 EIKE STEPPER, GERMANY." + NL
- + " * ALL RIGHTS RESERVED. THIS PROGRAM AND THE ACCOMPANYING MATERIALS" + NL
- + " * ARE MADE AVAILABLE UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE V1.0" + NL
- + " * WHICH ACCOMPANIES THIS DISTRIBUTION, AND IS AVAILABLE AT" + NL
- + " * HTTP://WWW.ECLIPSE.ORG/LEGAL/EPL-V10.HTML" + NL + " * " + NL + " * CONTRIBUTORS:" + NL
- + " * EIKE STEPPER - INITIAL API AND IMPLEMENTATION" + NL
- + " **************************************************************************/" + NL
- + "PACKAGE ORG.ECLIPSE.INTERNAL.NET4J.TRANSPORT.CONNECTOR;" + NL + "" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.BUFFER.BUFFERPROVIDER;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.CHANNEL.CHANNEL;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.CHANNEL.MULTIPLEXER;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.CONNECTOR.CONNECTOR;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.CONNECTOR.CONNECTOREXCEPTION;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.CONNECTOR.CREDENTIALS;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.CONNECTOR.PROTOCOL;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.TRANSPORT.CONNECTOR.PROTOCOLFACTORY;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.UTIL.LIFECYCLE.LIFECYCLELISTENER;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.UTIL.LIFECYCLE.LIFECYCLENOTIFIER;" + NL
- + "IMPORT ORG.ECLIPSE.NET4J.UTIL.REGISTRY.IREGISTRY;" + NL + "" + NL
- + "IMPORT ORG.ECLIPSE.INTERNAL.NET4J.TRANSPORT.CHANNEL.CHANNELIMPL;" + NL
- + "IMPORT ORG.ECLIPSE.INTERNAL.NET4J.UTIL.STREAM.BUFFERQUEUE;" + NL
- + "IMPORT ORG.ECLIPSE.INTERNAL.NET4J.UTIL.LIFECYCLE.ABSTRACTCOMPONENT;" + NL
- + "IMPORT ORG.ECLIPSE.INTERNAL.NET4J.UTIL.LIFECYCLE.LIFECYCLEUTIL;" + NL + "" + NL
- + "IMPORT JAVA.UTIL.ARRAYLIST;" + NL + "IMPORT JAVA.UTIL.LIST;" + NL + "IMPORT JAVA.UTIL.QUEUE;" + NL
- + "IMPORT JAVA.UTIL.CONCURRENT.CONCURRENTLINKEDQUEUE;" + NL + "IMPORT JAVA.UTIL.CONCURRENT.COUNTDOWNLATCH;"
- + NL + "IMPORT JAVA.UTIL.CONCURRENT.EXECUTORSERVICE;" + NL + "IMPORT JAVA.UTIL.CONCURRENT.TIMEUNIT;" + NL + ""
- + NL + "/**" + NL + " * @AUTHOR EIKE STEPPER" + NL + " */" + NL
- + "PUBLIC ABSTRACT CLASS ABSTRACTCONNECTOR EXTENDS ABSTRACTLIFECYCLE IMPLEMENTS CONNECTOR, CHANNELMULTIPLEXER"
- + NL + "{" + NL + " PRIVATE STATIC FINAL CHANNELIMPL NULL_CHANNEL = NEW CHANNELIMPL(NULL);" + NL + "" + NL
- + " PRIVATE CONNECTORCREDENTIALS CREDENTIALS;" + NL + "" + NL
- + " PRIVATE IREGISTRY<STRING, PROTOCOLFACTORY> PROTOCOLFACTORYREGISTRY;" + NL + "" + NL
- + " PRIVATE BUFFERPROVIDER BUFFERPROVIDER;" + NL + "" + NL + " /**" + NL
- + " * AN OPTIONAL EXECUTOR TO BE USED BY THE {@LINK CHANNEL}S TO PROCESS THEIR" + NL
- + " * {@LINK CHANNELIMPL#RECEIVEQUEUE} INSTEAD OF THE CURRENT THREAD. IF NOT" + NL
- + " * <CODE>NULL</CODE> THE SENDER AND THE RECEIVER PEERS BECOME DECOUPLED." + NL + " * <P>" + NL + " */"
- + NL + " PRIVATE EXECUTORSERVICE RECEIVEEXECUTOR;" + NL + "" + NL + " /**" + NL
- + " * TODO SYNCHRONIZE ON CHANNELS?" + NL + " */" + NL
- + " PRIVATE LIST<CHANNELIMPL> CHANNELS = NEW ARRAYLIST();" + NL + "" + NL
- + " PRIVATE STATE STATE = STATE.DISCONNECTED;" + NL + "" + NL + " /**" + NL
- + " * DON\'T INITIALIZE LAZILY TO CIRCUMVENT SYNCHRONIZATION!" + NL + " */" + NL
- + " PRIVATE QUEUE<STATELISTENER> STATELISTENERS = NEW CONCURRENTLINKEDQUEUE();" + NL + "" + NL + " /**" + NL
- + " * DON\'T INITIALIZE LAZILY TO CIRCUMVENT SYNCHRONIZATION!" + NL + " */" + NL
- + " PRIVATE QUEUE<CHANNELLISTENER> CHANNELLISTENERS = NEW CONCURRENTLINKEDQUEUE();" + NL + "" + NL + " /**"
- + NL + " * IS REGISTERED WITH EACH {@LINK CHANNEL} OF THIS {@LINK CONNECTOR}." + NL + " * <P>" + NL
- + " */" + NL + " PRIVATE LIFECYCLELISTENER CHANNELLIFECYCLELISTENER = NEW CHANNELLIFECYCLELISTENER();" + NL
- + "" + NL + " PRIVATE COUNTDOWNLATCH FINISHEDCONNECTING;" + NL + "" + NL
- + " PRIVATE COUNTDOWNLATCH FINISHEDNEGOTIATING;" + NL + "" + NL + " PUBLIC ABSTRACTCONNECTOR()" + NL + " {"
- + NL + " }" + NL + "" + NL + " PUBLIC EXECUTORSERVICE GETRECEIVEEXECUTOR()" + NL + " {" + NL
- + " RETURN RECEIVEEXECUTOR;" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID SETRECEIVEEXECUTOR(EXECUTORSERVICE RECEIVEEXECUTOR)" + NL + " {" + NL
- + " THIS.RECEIVEEXECUTOR = RECEIVEEXECUTOR;" + NL + " }" + NL + "" + NL
- + " PUBLIC IREGISTRY<STRING, PROTOCOLFACTORY> GETPROTOCOLFACTORYREGISTRY()" + NL + " {" + NL
- + " RETURN PROTOCOLFACTORYREGISTRY;" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID SETPROTOCOLFACTORYREGISTRY(IREGISTRY<STRING, PROTOCOLFACTORY> PROTOCOLFACTORYREGISTRY)" + NL
- + " {" + NL + " THIS.PROTOCOLFACTORYREGISTRY = PROTOCOLFACTORYREGISTRY;" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID ADDSTATELISTENER(STATELISTENER LISTENER)" + NL + " {" + NL
- + " STATELISTENERS.ADD(LISTENER);" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID REMOVESTATELISTENER(STATELISTENER LISTENER)" + NL + " {" + NL
- + " STATELISTENERS.REMOVE(LISTENER);" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID ADDCHANNELLISTENER(CHANNELLISTENER LISTENER)" + NL + " {" + NL
- + " CHANNELLISTENERS.ADD(LISTENER);" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID REMOVECHANNELLISTENER(CHANNELLISTENER LISTENER)" + NL + " {" + NL
- + " CHANNELLISTENERS.REMOVE(LISTENER);" + NL + " }" + NL + "" + NL
- + " PUBLIC BUFFERPROVIDER GETBUFFERPROVIDER()" + NL + " {" + NL + " RETURN BUFFERPROVIDER;" + NL + " }"
- + NL + "" + NL + " PUBLIC VOID SETBUFFERPROVIDER(BUFFERPROVIDER BUFFERPROVIDER)" + NL + " {" + NL
- + " THIS.BUFFERPROVIDER = BUFFERPROVIDER;" + NL + " }" + NL + "" + NL + " PUBLIC BOOLEAN ISCLIENT()" + NL
- + " {" + NL + " RETURN GETTYPE() == TYPE.CLIENT;" + NL + " }" + NL + "" + NL
- + " PUBLIC BOOLEAN ISSERVER()" + NL + " {" + NL + " RETURN GETTYPE() == TYPE.SERVER;" + NL + " }" + NL
- + "" + NL + " PUBLIC CONNECTORCREDENTIALS GETCREDENTIALS()" + NL + " {" + NL + " RETURN CREDENTIALS;" + NL
- + " }" + NL + "" + NL + " PUBLIC VOID SETCREDENTIALS(CONNECTORCREDENTIALS CREDENTIALS)" + NL + " {" + NL
- + " THIS.CREDENTIALS = CREDENTIALS;" + NL + " }" + NL + "" + NL + " PUBLIC STATE GETSTATE()" + NL + " {"
- + NL + " RETURN STATE;" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID SETSTATE(STATE NEWSTATE) THROWS CONNECTOREXCEPTION" + NL + " {" + NL
- + " STATE OLDSTATE = GETSTATE();" + NL + " IF (NEWSTATE != OLDSTATE)" + NL + " {" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": SETTING STATE \" + NEWSTATE + \" (WAS \"" + NL
- + " + OLDSTATE.TOSTRING().TOLOWERCASE() + \")\");" + NL + " STATE = NEWSTATE;" + NL
- + " FIRESTATECHANGED(NEWSTATE, OLDSTATE);" + NL + "" + NL + " SWITCH (NEWSTATE)" + NL + " {"
- + NL + " CASE DISCONNECTED:" + NL + " IF (FINISHEDCONNECTING != NULL)" + NL + " {" + NL
- + " FINISHEDCONNECTING.COUNTDOWN();" + NL + " FINISHEDCONNECTING = NULL;" + NL + " }"
- + NL + "" + NL + " IF (FINISHEDNEGOTIATING != NULL)" + NL + " {" + NL
- + " FINISHEDNEGOTIATING.COUNTDOWN();" + NL + " FINISHEDNEGOTIATING = NULL;" + NL
- + " }" + NL + " BREAK;" + NL + "" + NL + " CASE CONNECTING:" + NL
- + " FINISHEDCONNECTING = NEW COUNTDOWNLATCH(1);" + NL
- + " FINISHEDNEGOTIATING = NEW COUNTDOWNLATCH(1);" + NL + " IF (GETTYPE() == TYPE.SERVER)" + NL
- + " {" + NL + " SETSTATE(STATE.NEGOTIATING);" + NL + " }" + NL + " BREAK;" + NL
- + "" + NL + " CASE NEGOTIATING:" + NL + " FINISHEDCONNECTING.COUNTDOWN();" + NL
- + " SETSTATE(STATE.CONNECTED); // TODO IMPLEMENT NEGOTIATION" + NL + " BREAK;" + NL + "" + NL
- + " CASE CONNECTED:" + NL + " FINISHEDCONNECTING.COUNTDOWN(); // JUST IN CASE OF SUSPICION" + NL
- + " FINISHEDNEGOTIATING.COUNTDOWN();" + NL + " BREAK;" + NL + "" + NL + " }" + NL + " }"
- + NL + " }" + NL + "" + NL + " PUBLIC BOOLEAN ISCONNECTED()" + NL + " {" + NL
- + " RETURN GETSTATE() == STATE.CONNECTED;" + NL + " }" + NL + "" + NL
- + " PUBLIC VOID CONNECTASYNC() THROWS CONNECTOREXCEPTION" + NL + " {" + NL + " TRY" + NL + " {" + NL
- + " ACTIVATE();" + NL + " }" + NL + " CATCH (CONNECTOREXCEPTION EX)" + NL + " {" + NL
- + " THROW EX;" + NL + " }" + NL + " CATCH (EXCEPTION EX)" + NL + " {" + NL
- + " THROW NEW CONNECTOREXCEPTION(EX);" + NL + " }" + NL + " }" + NL + "" + NL
- + " PUBLIC BOOLEAN WAITFORCONNECTION(LONG TIMEOUT) THROWS CONNECTOREXCEPTION" + NL + " {" + NL
- + " STATE STATE = GETSTATE();" + NL + " IF (STATE == STATE.DISCONNECTED)" + NL + " {" + NL
- + " RETURN FALSE;" + NL + " }" + NL + "" + NL + " TRY" + NL + " {" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": WAITING FOR CONNECTION...\");" + NL
- + " RETURN FINISHEDNEGOTIATING.AWAIT(TIMEOUT, TIMEUNIT.MILLISECONDS);" + NL + " }" + NL
- + " CATCH (INTERRUPTEDEXCEPTION EX)" + NL + " {" + NL + " RETURN FALSE;" + NL + " }" + NL + " }"
- + NL + "" + NL + " PUBLIC BOOLEAN CONNECT(LONG TIMEOUT) THROWS CONNECTOREXCEPTION" + NL + " {" + NL
- + " CONNECTASYNC();" + NL + " RETURN WAITFORCONNECTION(TIMEOUT);" + NL + " }" + NL + "" + NL
- + " PUBLIC CONNECTOREXCEPTION DISCONNECT()" + NL + " {" + NL + " EXCEPTION EX = DEACTIVATE();" + NL
- + " IF (EX == NULL)" + NL + " {" + NL + " RETURN NULL;" + NL + " }" + NL + "" + NL
- + " IF (EX INSTANCEOF CONNECTOREXCEPTION)" + NL + " {" + NL + " RETURN (CONNECTOREXCEPTION)EX;" + NL
- + " }" + NL + "" + NL + " RETURN NEW CONNECTOREXCEPTION(EX);" + NL + " }" + NL + "" + NL
- + " PUBLIC CHANNEL[] GETCHANNELS()" + NL + " {" + NL
- + " FINAL LIST<CHANNEL> RESULT = NEW ARRAYLIST<CHANNEL>();" + NL + " SYNCHRONIZED (CHANNELS)" + NL
- + " {" + NL + " FOR (FINAL CHANNELIMPL CHANNEL : CHANNELS)" + NL + " {" + NL
- + " IF (CHANNEL != NULL_CHANNEL)" + NL + " {" + NL + " RESULT.ADD(CHANNEL);" + NL
- + " }" + NL + " }" + NL + " }" + NL + "" + NL
- + " RETURN RESULT.TOARRAY(NEW CHANNEL[RESULT.SIZE()]);" + NL + " }" + NL + "" + NL
- + " PUBLIC CHANNEL OPENCHANNEL() THROWS CONNECTOREXCEPTION" + NL + " {" + NL
- + " RETURN OPENCHANNEL(NULL);" + NL + " }" + NL + "" + NL
- + " PUBLIC CHANNEL OPENCHANNEL(STRING PROTOCOLID) THROWS CONNECTOREXCEPTION" + NL + " {" + NL
- + " SHORT CHANNELINDEX = FINDFREECHANNELINDEX();" + NL
- + " CHANNELIMPL CHANNEL = CREATECHANNEL(CHANNELINDEX, PROTOCOLID);" + NL
- + " REGISTERCHANNELWITHPEER(CHANNELINDEX, PROTOCOLID);" + NL + "" + NL + " TRY" + NL + " {" + NL
- + " CHANNEL.ACTIVATE();" + NL + " }" + NL + " CATCH (CONNECTOREXCEPTION EX)" + NL + " {" + NL
- + " THROW EX;" + NL + " }" + NL + " CATCH (EXCEPTION EX)" + NL + " {" + NL
- + " THROW NEW CONNECTOREXCEPTION(EX);" + NL + " }" + NL + "" + NL + " RETURN CHANNEL;" + NL + " }"
- + NL + "" + NL + " PUBLIC CHANNELIMPL CREATECHANNEL(SHORT CHANNELINDEX, STRING PROTOCOLID)" + NL + " {" + NL
- + " PROTOCOL PROTOCOL = CREATEPROTOCOL(PROTOCOLID);" + NL + " IF (PROTOCOL == NULL)" + NL + " {" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": OPENING CHANNEL WITHOUT PROTOCOL\");" + NL + " }" + NL
- + " ELSE" + NL + " {" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": OPENING CHANNEL WITH PROTOCOL \" + PROTOCOLID);" + NL + " }"
- + NL + "" + NL + " CHANNELIMPL CHANNEL = NEW CHANNELIMPL(RECEIVEEXECUTOR);" + NL
- + " CHANNEL.SETCHANNELINDEX(CHANNELINDEX);" + NL + " CHANNEL.SETMULTIPLEXER(THIS);" + NL
- + " CHANNEL.SETRECEIVEHANDLER(PROTOCOL);" + NL
- + " CHANNEL.ADDLIFECYCLELISTENER(CHANNELLIFECYCLELISTENER);" + NL + " ADDCHANNEL(CHANNEL);" + NL
- + " RETURN CHANNEL;" + NL + " }" + NL + "" + NL + " PUBLIC CHANNELIMPL GETCHANNEL(SHORT CHANNELINDEX)"
- + NL + " {" + NL + " TRY" + NL + " {" + NL + " CHANNELIMPL CHANNEL = CHANNELS.GET(CHANNELINDEX);"
- + NL + " IF (CHANNEL == NULL || CHANNEL == NULL_CHANNEL)" + NL + " {" + NL
- + " THROW NEW NULLPOINTEREXCEPTION();" + NL + " }" + NL + "" + NL + " RETURN CHANNEL;" + NL
- + " }" + NL + " CATCH (INDEXOUTOFBOUNDSEXCEPTION EX)" + NL + " {" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": INVALID CHANNELINDEX \" + CHANNELINDEX);" + NL
- + " RETURN NULL;" + NL + " }" + NL + " }" + NL + "" + NL
- + " PROTECTED LIST<BUFFERQUEUE> GETCHANNELBUFFERQUEUES()" + NL + " {" + NL
- + " FINAL LIST<BUFFERQUEUE> RESULT = NEW ARRAYLIST<BUFFERQUEUE>();" + NL + " SYNCHRONIZED (CHANNELS)"
- + NL + " {" + NL + " FOR (FINAL CHANNELIMPL CHANNEL : CHANNELS)" + NL + " {" + NL
- + " IF (CHANNEL != NULL_CHANNEL)" + NL + " {" + NL
- + " BUFFERQUEUE BUFFERQUEUE = CHANNEL.GETSENDQUEUE();" + NL + " RESULT.ADD(BUFFERQUEUE);"
- + NL + " }" + NL + " }" + NL + " }" + NL + "" + NL + " RETURN RESULT;" + NL + " }" + NL + ""
- + NL + " PROTECTED SHORT FINDFREECHANNELINDEX()" + NL + " {" + NL + " SYNCHRONIZED (CHANNELS)" + NL
- + " {" + NL + " INT SIZE = CHANNELS.SIZE();" + NL + " FOR (SHORT I = 0; I < SIZE; I++)" + NL
- + " {" + NL + " IF (CHANNELS.GET(I) == NULL_CHANNEL)" + NL + " {" + NL
- + " RETURN I;" + NL + " }" + NL + " }" + NL + "" + NL
- + " CHANNELS.ADD(NULL_CHANNEL);" + NL + " RETURN (SHORT)SIZE;" + NL + " }" + NL + " }" + NL + ""
- + NL + " PROTECTED VOID ADDCHANNEL(CHANNELIMPL CHANNEL)" + NL + " {" + NL
- + " SHORT CHANNELINDEX = CHANNEL.GETCHANNELINDEX();" + NL + " WHILE (CHANNELINDEX >= CHANNELS.SIZE())"
- + NL + " {" + NL + " CHANNELS.ADD(NULL_CHANNEL);" + NL + " }" + NL + "" + NL
- + " CHANNELS.SET(CHANNELINDEX, CHANNEL);" + NL + " }" + NL + "" + NL
- + " PROTECTED VOID REMOVECHANNEL(CHANNELIMPL CHANNEL)" + NL + " {" + NL
- + " CHANNEL.REMOVELIFECYCLELISTENER(CHANNELLIFECYCLELISTENER);" + NL
- + " INT CHANNELINDEX = CHANNEL.GETCHANNELINDEX();" + NL + "" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": REMOVING CHANNEL \" + CHANNELINDEX);" + NL
- + " CHANNELS.SET(CHANNELINDEX, NULL_CHANNEL);" + NL + " }" + NL + "" + NL
- + " PROTECTED PROTOCOL CREATEPROTOCOL(STRING PROTOCOLID)" + NL + " {" + NL
- + " IF (PROTOCOLID == NULL || PROTOCOLID.LENGTH() == 0)" + NL + " {" + NL + " RETURN NULL;" + NL
- + " }" + NL + "" + NL + " IREGISTRY<STRING, PROTOCOLFACTORY> REGISTRY = GETPROTOCOLFACTORYREGISTRY();"
- + NL + " IF (REGISTRY == NULL)" + NL + " {" + NL + " RETURN NULL;" + NL + " }" + NL + "" + NL
- + " PROTOCOLFACTORY FACTORY = REGISTRY.LOOKUP(PROTOCOLID);" + NL + " IF (FACTORY == NULL)" + NL + " {"
- + NL + " RETURN NULL;" + NL + " }" + NL + "" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": CREATING PROTOCOL \" + PROTOCOLID);" + NL
- + " RETURN FACTORY.CREATEPROTOCOL();" + NL + " }" + NL + "" + NL
- + " PROTECTED VOID FIRECHANNELOPENED(CHANNEL CHANNEL)" + NL + " {" + NL
- + " FOR (CHANNELLISTENER LISTENER : CHANNELLISTENERS)" + NL + " {" + NL + " TRY" + NL + " {"
- + NL + " LISTENER.NOTIFYCHANNELOPENED(CHANNEL);" + NL + " }" + NL + " CATCH (EXCEPTION EX)"
- + NL + " {" + NL + " EX.PRINTSTACKTRACE();" + NL + " }" + NL + " }" + NL + " }" + NL + ""
- + NL + " PROTECTED VOID FIRECHANNELCLOSING(CHANNEL CHANNEL)" + NL + " {" + NL
- + " FOR (CHANNELLISTENER LISTENER : CHANNELLISTENERS)" + NL + " {" + NL + " TRY" + NL + " {"
- + NL + " LISTENER.NOTIFYCHANNELCLOSING(CHANNEL);" + NL + " }" + NL + " CATCH (EXCEPTION EX)"
- + NL + " {" + NL + " EX.PRINTSTACKTRACE();" + NL + " }" + NL + " }" + NL + " }" + NL + ""
- + NL + " PROTECTED VOID FIRESTATECHANGED(STATE NEWSTATE, STATE OLDSTATE)" + NL + " {" + NL
- + " FOR (STATELISTENER LISTENER : STATELISTENERS)" + NL + " {" + NL + " TRY" + NL + " {" + NL
- + " LISTENER.NOTIFYSTATECHANGED(THIS, NEWSTATE, OLDSTATE);" + NL + " }" + NL
- + " CATCH (EXCEPTION EX)" + NL + " {" + NL + " EX.PRINTSTACKTRACE();" + NL + " }" + NL
- + " }" + NL + " }" + NL + "" + NL + " @OVERRIDE" + NL
- + " PROTECTED VOID ONACCESSBEFOREACTIVATE() THROWS EXCEPTION" + NL + " {" + NL
- + " SUPER.ONACCESSBEFOREACTIVATE();" + NL + " IF (BUFFERPROVIDER == NULL)" + NL + " {" + NL
- + " THROW NEW ILLEGALSTATEEXCEPTION(\"BUFFERPROVIDER == NULL\");" + NL + " }" + NL + "" + NL
- + " IF (PROTOCOLFACTORYREGISTRY == NULL)" + NL + " {" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": (INFO) PROTOCOLFACTORYREGISTRY == NULL\");" + NL + " }" + NL
- + "" + NL + " IF (RECEIVEEXECUTOR == NULL)" + NL + " {" + NL
- + " IOUTIL.OUT().PRINTLN(TOSTRING() + \": (INFO) RECEIVEEXECUTOR == NULL\");" + NL + " }" + NL + " }"
- + NL + "" + NL + " @OVERRIDE" + NL + " PROTECTED VOID ONACTIVATE() THROWS EXCEPTION" + NL + " {" + NL
- + " SUPER.ONACTIVATE();" + NL + " SETSTATE(STATE.CONNECTING);" + NL + " }" + NL + "" + NL
- + " @OVERRIDE" + NL + " PROTECTED VOID ONDEACTIVATE() THROWS EXCEPTION" + NL + " {" + NL
- + " SETSTATE(STATE.DISCONNECTED);" + NL + " FOR (SHORT I = 0; I < CHANNELS.SIZE(); I++)" + NL + " {"
- + NL + " CHANNELIMPL CHANNEL = CHANNELS.GET(I);" + NL + " IF (CHANNEL != NULL)" + NL + " {" + NL
- + " LIFECYCLEUTIL.DEACTIVATE(CHANNEL);" + NL + " }" + NL + " }" + NL + "" + NL
- + " CHANNELS.CLEAR();" + NL + " SUPER.ONDEACTIVATE();" + NL + " }" + NL + "" + NL
- + " PROTECTED ABSTRACT VOID REGISTERCHANNELWITHPEER(SHORT CHANNELINDEX, STRING PROTOCOLID)" + NL
- + " THROWS CONNECTOREXCEPTION;" + NL + "" + NL + " /**" + NL
- + " * IS REGISTERED WITH EACH {@LINK CHANNEL} OF THIS {@LINK CONNECTOR}." + NL + " * <P>" + NL + " * "
- + NL + " * @AUTHOR EIKE STEPPER" + NL + " */" + NL
- + " PRIVATE FINAL CLASS CHANNELLIFECYCLELISTENER IMPLEMENTS LIFECYCLELISTENER" + NL + " {" + NL
- + " PUBLIC VOID NOTIFYLIFECYCLEACTIVATED(LIFECYCLENOTIFIER NOTIFIER)" + NL + " {" + NL
- + " CHANNELIMPL CHANNEL = (CHANNELIMPL)NOTIFIER;" + NL + " FIRECHANNELOPENED(CHANNEL);" + NL
- + " }" + NL + "" + NL + " PUBLIC VOID NOTIFYLIFECYCLEDEACTIVATING(LIFECYCLENOTIFIER NOTIFIER)" + NL
- + " {" + NL + " CHANNELIMPL CHANNEL = (CHANNELIMPL)NOTIFIER;" + NL
- + " FIRECHANNELCLOSING(CHANNEL);" + NL + " REMOVECHANNEL(CHANNEL);" + NL + " }" + NL + " }" + NL
- + "}" + NL;
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/Performance.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/Performance.java
deleted file mode 100644
index 6b3a4572b4..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/Performance.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.eclipse.net4j.tests;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Proxy;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.nio.channels.Selector;
-import java.nio.channels.spi.SelectorProvider;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * @author Eike Stepper
- */
-public class Performance
-{
- public static void main(String[] args) throws Exception
- {
- testInetAddress();
- testServerSocket();
- // testRouter();
- testSocket();
- testSelector();
- }
-
- public static void testInetAddress() throws Exception
- {
- System.out.println(InetAddress.class.getName());
- for (int i = 0; i < 2; i++)
- {
- long start = System.currentTimeMillis();
- InetAddress inet = InetAddress.getByName("localhost");
- inet.getHostAddress();
- long duration = System.currentTimeMillis() - start;
-
- System.out.println(duration);
- }
- }
-
- public static void testServerSocket() throws IOException
- {
- System.out.println(ServerSocket.class.getName());
- for (int i = 0; i < 2; i++)
- {
- long start = System.currentTimeMillis();
- ServerSocket serverSocket = new ServerSocket(2036);
- long duration = System.currentTimeMillis() - start;
-
- System.out.println(duration);
- serverSocket.close();
- }
- }
-
- public static void testRouter() throws Exception
- {
- System.out.println(Socket.class.getName() + " (ROUTER)");
- for (int i = 0; i < 2; i++)
- {
- final SocketAddress endpoint = new InetSocketAddress(InetAddress.getByName("192.168.1.1"), 80);
- Socket socket = new Socket(Proxy.NO_PROXY);
-
- long start = System.currentTimeMillis();
- socket.connect(endpoint);
- long duration = System.currentTimeMillis() - start;
-
- System.out.println(duration);
- socket.close();
- Thread.sleep(500);
- }
- }
-
- public static void testSocket() throws Exception
- {
- System.out.println(Socket.class.getName() + " (LOOPBACK)");
- for (int i = 0; i < 2; i++)
- {
- final SocketAddress endpoint = new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 2036);
- final CountDownLatch latch = new CountDownLatch(1);
- new Thread()
- {
- @Override
- public void run()
- {
- try
- {
- ServerSocket serverSocket = new ServerSocket();
- serverSocket.bind(endpoint);
- latch.countDown();
-
- Socket socket = serverSocket.accept();
- socket.close();
- serverSocket.close();
- }
- catch (IOException ex)
- {
- ex.printStackTrace();
- latch.countDown();
- }
- }
- }.start();
-
- latch.await();
- Thread.sleep(500);
- Socket socket = new Socket(Proxy.NO_PROXY);
-
- long start = System.currentTimeMillis();
- socket.connect(endpoint);
- long duration = System.currentTimeMillis() - start;
-
- System.out.println(duration);
- socket.close();
- Thread.sleep(500);
- }
- }
-
- public static void testSelector() throws IOException
- {
- SelectorProvider provider = SelectorProvider.provider();
- System.out.println(provider.getClass().getName());
- for (int i = 0; i < 2; i++)
- {
- long start = System.currentTimeMillis();
- Selector selector = provider.openSelector();
- long duration = System.currentTimeMillis() - start;
-
- System.out.println(duration);
- selector.close();
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java
deleted file mode 100644
index 21b6622c30..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SelectorTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import java.nio.channels.Selector;
-import java.nio.channels.spi.SelectorProvider;
-
-import junit.framework.TestCase;
-
-/**
- * @author Eike Stepper
- */
-public class SelectorTest extends TestCase
-{
- public void testOpen() throws Exception
- {
- SelectorProvider provider = SelectorProvider.provider();
- System.out.println(provider.getClass().getName());
- for (int i = 0; i < 5; i++)
- {
- long start = System.currentTimeMillis();
- Selector selector = provider.openSelector();
- long duration = System.currentTimeMillis() - start;
-
- System.out.println(duration);
- selector.close();
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java
deleted file mode 100644
index 6a5495ee8a..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/ServerTestProtocolFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.util.factory.ProductCreationException;
-
-import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
-
-import java.util.concurrent.CountDownLatch;
-
-/**
- * @author Eike Stepper
- */
-public class ServerTestProtocolFactory extends ServerProtocolFactory
-{
- public static final String TYPE = "test.protocol";
-
- private CountDownLatch counter;
-
- public ServerTestProtocolFactory(CountDownLatch counter)
- {
- super(TYPE);
- this.counter = counter;
- }
-
- public TestProtocol create(String description) throws ProductCreationException
- {
- return new TestProtocol(counter);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java
deleted file mode 100644
index f9fd894d35..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/SignalTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.tests.signal.ArrayRequest;
-import org.eclipse.net4j.tests.signal.AsyncRequest;
-import org.eclipse.net4j.tests.signal.IntRequest;
-import org.eclipse.net4j.tests.signal.StringRequest;
-import org.eclipse.net4j.tests.signal.TestSignalClientProtocolFactory;
-import org.eclipse.net4j.tests.signal.TestSignalProtocol;
-import org.eclipse.net4j.tests.signal.TestSignalServerProtocolFactory;
-import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.om.OMPlatform;
-
-import java.util.Arrays;
-
-/**
- * @author Eike Stepper
- */
-public class SignalTest extends AbstractTransportTest
-{
- @Override
- protected IManagedContainer createContainer()
- {
- IManagedContainer container = super.createContainer();
- container.registerFactory(new TestSignalClientProtocolFactory());
- container.registerFactory(new TestSignalServerProtocolFactory());
- return container;
- }
-
- public void testInteger() throws Exception
- {
- startTransport();
- IChannel channel = getConnector().openChannel(TestSignalProtocol.PROTOCOL_NAME, null);
- int data = 0x0a;
- int result = new IntRequest(channel, data).send();
- assertEquals(data, result);
- }
-
- public void testArray() throws Exception
- {
- startTransport();
- IChannel channel = getConnector().openChannel(TestSignalProtocol.PROTOCOL_NAME, null);
- byte[] data = TinyData.getBytes();
- byte[] result = new ArrayRequest(channel, data).send();
- assertTrue(Arrays.equals(data, result));
- }
-
- public void testAsync() throws Exception
- {
- startTransport();
- OMPlatform.INSTANCE.setDebugging(false);
- IChannel channel = getConnector().openChannel(TestSignalProtocol.PROTOCOL_NAME, null);
- String data = TinyData.getText();
- for (int i = 0; i < 10000; i++)
- {
- msg("Loop " + i);
- new AsyncRequest(channel, data).send();
- String result = new StringRequest(channel, data).send();
- assertEquals(data, result);
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPTransportTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPTransportTest.java
deleted file mode 100644
index e70682f898..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPTransportTest.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.Net4jUtil;
-import org.eclipse.net4j.buffer.IBuffer;
-import org.eclipse.net4j.buffer.IBufferProvider;
-import org.eclipse.net4j.channel.ChannelInputStream;
-import org.eclipse.net4j.channel.ChannelOutputStream;
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.connector.IConnector;
-import org.eclipse.net4j.internal.util.container.ManagedContainer;
-import org.eclipse.net4j.tests.signal.TestSignalServerProtocolFactory;
-import org.eclipse.net4j.util.container.IContainerDelta;
-import org.eclipse.net4j.util.container.IContainerEvent;
-import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.event.IEvent;
-import org.eclipse.net4j.util.event.IListener;
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.nio.ByteBuffer;
-import java.util.StringTokenizer;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-/**
- * @author Eike Stepper
- */
-@SuppressWarnings("unchecked")
-public class TCPTransportTest extends AbstractTransportTest
-{
- @Override
- protected IManagedContainer createContainer()
- {
- IManagedContainer container = new ManagedContainer();
- container.registerFactory(new TestSignalServerProtocolFactory());
- return container;
- }
-
- protected IBuffer provideBuffer()
- {
- IBufferProvider bufferProvider = Net4jUtil.getBufferProvider(container);
- return bufferProvider.provideBuffer();
- }
-
- public void testConnect() throws Exception
- {
- startTransport();
- }
-
- public void testSendBuffer() throws Exception
- {
- startTransport();
- IChannel channel = getConnector().openChannel();
- for (int i = 0; i < 3; i++)
- {
- IBuffer buffer = provideBuffer();
- ByteBuffer byteBuffer = buffer.startPutting(channel.getChannelIndex());
- byteBuffer.putInt(1970);
- channel.sendBuffer(buffer);
- }
- }
-
- public void testHandleBuffer() throws Exception
- {
- final int COUNT = 3;
- final CountDownLatch counter = new CountDownLatch(COUNT);
- container.registerFactory(new ServerTestProtocolFactory(counter));
- container.registerFactory(new ClientTestProtocolFactory());
- startTransport();
-
- IChannel channel = getConnector().openChannel(ClientTestProtocolFactory.TYPE, null);
- for (int i = 0; i < COUNT; i++)
- {
- IBuffer buffer = provideBuffer();
- ByteBuffer byteBuffer = buffer.startPutting(channel.getChannelIndex());
- byteBuffer.putInt(1970);
- channel.sendBuffer(buffer);
- sleep(50);
- }
-
- assertTrue(counter.await(2, TimeUnit.SECONDS));
- }
-
- // public void testLocalRegistry() throws Exception
- // {
- // final int COUNT = 3;
- // final CountDownLatch counter = new CountDownLatch(COUNT);
- //
- // IRegistry<String, ProtocolFactory> global = new HashMapRegistry();
- // IRegistry<String, ProtocolFactory> local = new HashCacheRegistry(global);
- // local.register(new TestProtocolFactory(counter));
- // assertEquals(0, global.size());
- // assertEquals(1, local.size());
- //
- // acceptor.setProtocolFactoryRegistry(local);
- // acceptor.activate();
- // assertTrue(acceptor.isActive());
- // assertTrue(connector.connect(5000));
- //
- // Channel channel = connector.openChannel(TestProtocolFactory.PROTOCOL_ID);
- // for (int i = 0; i < COUNT; i++)
- // {
- // Buffer buffer = provideBuffer();
- // ByteBuffer byteBuffer = buffer.startPutting(channel.getChannelIndex());
- // byteBuffer.putInt(1970);
- // channel.handleBuffer(buffer);
- // }
- //
- // assertTrue(counter.await(2, TimeUnit.SECONDS));
- // }
-
- // public void testGlobalRegistry() throws Exception
- // {
- // final int COUNT = 3;
- // final CountDownLatch counter = new CountDownLatch(COUNT);
- //
- // IRegistry<String, ProtocolFactory> global = new HashMapRegistry();
- // IRegistry<String, ProtocolFactory> local = new HashCacheRegistry(global);
- // global.register(new TestProtocolFactory(counter));
- // assertEquals(1, global.size());
- // assertEquals(1, local.size());
- //
- // acceptor.setProtocolFactoryRegistry(local);
- // acceptor.activate();
- // assertTrue(acceptor.isActive());
- // assertTrue(connector.connect(5000));
- //
- // Channel channel = connector.openChannel(TestProtocolFactory.PROTOCOL_ID);
- // for (int i = 0; i < COUNT; i++)
- // {
- // Buffer buffer = provideBuffer();
- // ByteBuffer byteBuffer = buffer.startPutting(channel.getChannelIndex());
- // byteBuffer.putInt(1970);
- // channel.handleBuffer(buffer);
- // }
- //
- // assertTrue(counter.await(2, TimeUnit.SECONDS));
- // }
-
- public void testStreaming() throws Exception
- {
- final int COUNT = 1;
- final CountDownLatch counter = new CountDownLatch(COUNT);
- final ChannelInputStream[] inputStream = new ChannelInputStream[1];
-
- getAcceptor().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IConnector> e = (IContainerEvent)event;
- e.getDeltaElement().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IChannel> e = (IContainerEvent)event;
- if (e.getDeltaKind() == IContainerDelta.Kind.ADDED)
- {
- inputStream[0] = new ChannelInputStream(e.getDeltaElement(), 2000);
- counter.countDown();
- }
- }
- }
- });
- }
- }
- });
-
- IChannel channel = getConnector().openChannel();
- assertTrue(counter.await(2, TimeUnit.SECONDS));
- assertNotNull(inputStream[0]);
-
- ChannelOutputStream outputStream = new ChannelOutputStream(channel);
- outputStream.write(HugeData.getBytes());
- outputStream.flushWithEOS();
- outputStream.close();
-
- try
- {
- InputStreamReader isr = new InputStreamReader(inputStream[0]);
- BufferedReader reader = new BufferedReader(isr);
- String line;
- while ((line = reader.readLine()) != null)
- {
- msg(line);
- }
-
- isr.close();
- }
- catch (RuntimeException ex)
- {
- ex.printStackTrace();
- }
- }
-
- /**
- * TODO Fails occasionally ;-( Caused by: java.lang.IllegalStateException: selectionKey == null
- */
- public void testTextStreaming() throws Exception
- {
- final int COUNT = 1;
- final CountDownLatch counter = new CountDownLatch(COUNT);
- final ChannelInputStream[] inputStream = new ChannelInputStream[1];
-
- getAcceptor().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IConnector> e = (IContainerEvent)event;
- e.getDeltaElement().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IChannel> e = (IContainerEvent)event;
- if (e.getDeltaKind() == IContainerDelta.Kind.ADDED)
- {
- inputStream[0] = new ChannelInputStream(e.getDeltaElement(), 2000);
- counter.countDown();
- }
- }
- }
- });
- }
- }
- });
-
- IChannel channel = getConnector().openChannel();
- assertTrue(counter.await(2, TimeUnit.SECONDS));
- assertNotNull(inputStream[0]);
-
- ChannelOutputStream outputStream = new ChannelOutputStream(channel);
- PrintStream printer = new PrintStream(outputStream);
- StringTokenizer tokenizer = HugeData.getTokenizer();
- while (tokenizer.hasMoreTokens())
- {
- String token = tokenizer.nextToken();
- printer.println(token);
- }
-
- outputStream.flushWithEOS();
- outputStream.close();
-
- try
- {
- InputStreamReader isr = new InputStreamReader(inputStream[0]);
- BufferedReader reader = new BufferedReader(isr);
- String line;
- while ((line = reader.readLine()) != null)
- {
- msg(line);
- }
-
- isr.close();
- }
- catch (RuntimeException ex)
- {
- ex.printStackTrace();
- }
- }
-
- public void testTextStreamingDecoupled() throws Exception
- {
- final int COUNT = 1;
- final CountDownLatch counter = new CountDownLatch(COUNT);
- final ChannelInputStream[] inputStream = new ChannelInputStream[1];
-
- getAcceptor().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IConnector> e = (IContainerEvent)event;
- e.getDeltaElement().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IChannel> e = (IContainerEvent)event;
- if (e.getDeltaKind() == IContainerDelta.Kind.ADDED)
- {
- inputStream[0] = new ChannelInputStream(e.getDeltaElement(), 2000);
- counter.countDown();
- }
- }
- }
- });
- }
- }
- });
-
- final IChannel channel = getConnector().openChannel();
- assertTrue(counter.await(2, TimeUnit.SECONDS));
- assertNotNull(inputStream[0]);
-
- new Thread()
- {
- @Override
- public void run()
- {
- try
- {
- IBufferProvider bufferProvider = Net4jUtil.getBufferProvider(container);
- ChannelOutputStream outputStream = new ChannelOutputStream(channel, bufferProvider);
- PrintStream printer = new PrintStream(outputStream);
- StringTokenizer tokenizer = HugeData.getTokenizer();
- while (tokenizer.hasMoreTokens())
- {
- String token = tokenizer.nextToken();
- printer.println(token);
- }
-
- outputStream.flushWithEOS();
- outputStream.close();
- }
- catch (IOException ex)
- {
- ex.printStackTrace();
- fail(ex.getLocalizedMessage());
- }
- }
- }.start();
-
- try
- {
- InputStreamReader isr = new InputStreamReader(inputStream[0]);
- BufferedReader reader = new BufferedReader(isr);
- String line;
- while ((line = reader.readLine()) != null)
- {
- msg(line);
- }
-
- isr.close();
- }
- catch (RuntimeException ex)
- {
- ex.printStackTrace();
- }
- }
-
- public void testDataStreaming() throws Exception
- {
- final int COUNT = 1;
- final CountDownLatch counter = new CountDownLatch(COUNT);
- final ChannelInputStream[] inputStream = new ChannelInputStream[1];
-
- getAcceptor().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IConnector> e = (IContainerEvent)event;
- e.getDeltaElement().addListener(new IListener()
- {
- public void notifyEvent(IEvent event)
- {
- if (event instanceof IContainerEvent)
- {
- IContainerEvent<IChannel> e = (IContainerEvent)event;
- if (e.getDeltaKind() == IContainerDelta.Kind.ADDED)
- {
- inputStream[0] = new ChannelInputStream(e.getDeltaElement(), 2000);
- counter.countDown();
- }
- }
- }
- });
- }
- }
- });
-
- IChannel channel = getConnector().openChannel();
- assertTrue(counter.await(2, TimeUnit.SECONDS));
-
- ChannelOutputStream outputStream = new ChannelOutputStream(channel);
- DataOutputStream dataOutput = new DataOutputStream(outputStream);
- byte[] data = HugeData.getBytes();
- dataOutput.writeInt(data.length);
- dataOutput.write(data);
- dataOutput.flush();
- dataOutput.close();
- outputStream.flush();
-
- DataInputStream dataInput = new DataInputStream(inputStream[0]);
- int size = dataInput.readInt();
- byte[] b = new byte[size];
- dataInput.read(b);
- dataInput.close();
-
- msg(new String(b));
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPUnitTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPUnitTest.java
deleted file mode 100644
index 6d4280a6e0..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TCPUnitTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
-/**
- * @author Eike Stepper
- */
-public class TCPUnitTest extends AbstractOMTest
-{
- public TCPUnitTest()
- {
- }
-
- public void test()
- {
-
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java
deleted file mode 100644
index b165acc27b..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TestProtocol.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import org.eclipse.net4j.buffer.IBuffer;
-import org.eclipse.net4j.util.io.IOUtil;
-
-import org.eclipse.internal.net4j.protocol.Protocol;
-
-import java.util.concurrent.CountDownLatch;
-
-/**
- * @author Eike Stepper
- */
-public final class TestProtocol extends Protocol
-{
- public TestProtocol(CountDownLatch counter)
- {
- setInfraStructure(counter);
- }
-
- public String getType()
- {
- return ServerTestProtocolFactory.TYPE;
- }
-
- public void handleBuffer(IBuffer buffer)
- {
- IOUtil.OUT().println("BUFFER ARRIVED");
- buffer.release();
- if (getInfraStructure() instanceof CountDownLatch)
- {
- ((CountDownLatch)getInfraStructure()).countDown();
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java
deleted file mode 100644
index 83fce51a33..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/TinyData.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests;
-
-import java.util.StringTokenizer;
-
-/**
- * @author Eike Stepper
- */
-public final class TinyData
-{
- public static final String NL = System.getProperty("line.separator");
-
- public static StringTokenizer getTokenizer()
- {
- return new StringTokenizer(getText(), NL);
- }
-
- public static String[] getArray()
- {
- return getText().split(NL);
- }
-
- public static byte[] getBytes()
- {
- return getText().getBytes();
- }
-
- public static String getText()
- {
- return "COPYRIGHT (C) 2004 - 2008 EIKE STEPPER, GERMANY. ALL RIGHTS RESERVED.";
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/bundle/Activator.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/bundle/Activator.java
deleted file mode 100644
index 0b79912c40..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/bundle/Activator.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.bundle;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author Eike Stepper
- */
-public class Activator implements BundleActivator
-{
- public void start(BundleContext context) throws Exception
- {
- }
-
- public void stop(BundleContext context) throws Exception
- {
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java
deleted file mode 100644
index 4b0c65d68f..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayIndication.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class ArrayIndication extends IndicationWithResponse
-{
- private byte[] data;
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_ARRAY;
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws IOException
- {
- data = in.readByteArray();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws IOException
- {
- out.writeByteArray(data);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java
deleted file mode 100644
index 826e5df5ca..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/ArrayRequest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.signal.RequestWithConfirmation;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class ArrayRequest extends RequestWithConfirmation<byte[]>
-{
- private byte[] data;
-
- public ArrayRequest(IChannel channel, byte[] data)
- {
- super(channel);
- this.data = data;
- }
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_ARRAY;
- }
-
- @Override
- protected void requesting(ExtendedDataOutputStream out) throws IOException
- {
- out.writeByteArray(data);
- }
-
- @Override
- protected byte[] confirming(ExtendedDataInputStream in) throws IOException
- {
- return in.readByteArray();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java
deleted file mode 100644
index 3fc12d10e7..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncIndication.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.signal.Indication;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class AsyncIndication extends Indication
-{
- private String data;
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_ASYNC;
- }
-
- public String getData()
- {
- return data;
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws IOException
- {
- data = in.readString();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java
deleted file mode 100644
index 5b9bada13a..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/AsyncRequest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.signal.Request;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class AsyncRequest extends Request
-{
- private String data;
-
- public AsyncRequest(IChannel channel, String data)
- {
- super(channel);
- this.data = data;
- }
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_ASYNC;
- }
-
- @Override
- protected void requesting(ExtendedDataOutputStream out) throws IOException
- {
- out.writeString(data);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java
deleted file mode 100644
index 0911916593..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailIndication.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class IntFailIndication extends IndicationWithResponse
-{
- private int data;
-
- public IntFailIndication()
- {
- }
-
- public int getData()
- {
- return data;
- }
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_INT_FAIL;
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws IOException
- {
- data = in.readInt();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws IOException
- {
- getProtocol().deactivate();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java
deleted file mode 100644
index f06def6211..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntFailRequest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.signal.RequestWithConfirmation;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class IntFailRequest extends RequestWithConfirmation<Integer>
-{
- private int data;
-
- public IntFailRequest(IChannel channel, int data)
- {
- super(channel);
- this.data = data;
- }
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_INT_FAIL;
- }
-
- @Override
- protected void requesting(ExtendedDataOutputStream out) throws IOException
- {
- out.writeInt(data);
- }
-
- @Override
- protected Integer confirming(ExtendedDataInputStream in) throws IOException
- {
- return in.readInt();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java
deleted file mode 100644
index cbf0cb9bee..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntIndication.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class IntIndication extends IndicationWithResponse
-{
- private int data;
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_INT;
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws IOException
- {
- data = in.readInt();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws IOException
- {
- out.writeInt(data);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java
deleted file mode 100644
index c79435b544..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/IntRequest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.signal.RequestWithConfirmation;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class IntRequest extends RequestWithConfirmation<Integer>
-{
- private int data;
-
- public IntRequest(IChannel channel, int data)
- {
- super(channel);
- this.data = data;
- }
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_INT;
- }
-
- @Override
- protected void requesting(ExtendedDataOutputStream out) throws IOException
- {
- out.writeInt(data);
- }
-
- @Override
- protected Integer confirming(ExtendedDataInputStream in) throws IOException
- {
- return in.readInt();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java
deleted file mode 100644
index f750b2cef4..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringIndication.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class StringIndication extends IndicationWithResponse
-{
- private String data;
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_STRING;
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws IOException
- {
- data = in.readString();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws IOException
- {
- out.writeString(data);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java
deleted file mode 100644
index 2b98f93818..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/StringRequest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.channel.IChannel;
-import org.eclipse.net4j.signal.RequestWithConfirmation;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class StringRequest extends RequestWithConfirmation<String>
-{
- private String data;
-
- public StringRequest(IChannel channel, String data)
- {
- super(channel);
- this.data = data;
- }
-
- @Override
- protected short getSignalID()
- {
- return TestSignalProtocol.SIGNAL_STRING;
- }
-
- @Override
- protected void requesting(ExtendedDataOutputStream out) throws IOException
- {
- out.writeString(data);
- }
-
- @Override
- protected String confirming(ExtendedDataInputStream in) throws IOException
- {
- return in.readString();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java
deleted file mode 100644
index 0613e6a1cf..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalClientProtocolFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.util.factory.ProductCreationException;
-
-import org.eclipse.internal.net4j.protocol.ClientProtocolFactory;
-
-/**
- * @author Eike Stepper
- */
-public class TestSignalClientProtocolFactory extends ClientProtocolFactory
-{
- public static final String TYPE = TestSignalServerProtocolFactory.TYPE;
-
- public TestSignalClientProtocolFactory()
- {
- super(TYPE);
- }
-
- public TestSignalProtocol create(String description) throws ProductCreationException
- {
- return new TestSignalProtocol();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
deleted file mode 100644
index 82ea5bd03f..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalProtocol.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.signal.SignalProtocol;
-import org.eclipse.net4j.signal.SignalReactor;
-
-/**
- * @author Eike Stepper
- */
-public class TestSignalProtocol extends SignalProtocol
-{
- public static final String PROTOCOL_NAME = "signal.protocol";
-
- public static final short SIGNAL_INT = 1;
-
- public static final short SIGNAL_INT_FAIL = 2;
-
- public static final short SIGNAL_ARRAY = 3;
-
- public static final short SIGNAL_STRING = 4;
-
- public static final short SIGNAL_ASYNC = 5;
-
- public TestSignalProtocol()
- {
- }
-
- public String getType()
- {
- return PROTOCOL_NAME;
- }
-
- @Override
- protected SignalReactor doCreateSignalReactor(short signalID)
- {
- switch (signalID)
- {
- case SIGNAL_INT:
- return new IntIndication();
- case SIGNAL_INT_FAIL:
- return new IntFailIndication();
- case SIGNAL_ARRAY:
- return new ArrayIndication();
- case SIGNAL_STRING:
- return new StringIndication();
- case SIGNAL_ASYNC:
- return new AsyncIndication();
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java
deleted file mode 100644
index c5a908c074..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/tests/signal/TestSignalServerProtocolFactory.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.tests.signal;
-
-import org.eclipse.net4j.util.factory.ProductCreationException;
-
-import org.eclipse.internal.net4j.protocol.ServerProtocolFactory;
-
-/**
- * @author Eike Stepper
- */
-public class TestSignalServerProtocolFactory extends ServerProtocolFactory
-{
- public static final String TYPE = TestSignalProtocol.PROTOCOL_NAME;
-
- public TestSignalServerProtocolFactory()
- {
- super(TYPE);
- }
-
- public TestSignalProtocol create(String description) throws ProductCreationException
- {
- return new TestSignalProtocol();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java
deleted file mode 100644
index 17b52acc9c..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/AbstractOMTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.internal.util.om.log.PrintLogHandler;
-import org.eclipse.net4j.internal.util.om.trace.PrintTraceHandler;
-import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
-import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.net4j.util.om.OMPlatform;
-
-import junit.framework.TestCase;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractOMTest extends TestCase
-{
- private static boolean consoleEnabled;
-
- protected AbstractOMTest()
- {
- }
-
- @Override
- public final void setUp() throws Exception
- {
- super.setUp();
- IOUtil.OUT().println("************************************************");
- IOUtil.OUT().println(getName());
- IOUtil.OUT().println("************************************************");
-
- OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
- OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
- OMPlatform.INSTANCE.setDebugging(true);
- enableConsole();
-
- doSetUp();
- IOUtil.OUT().println();
- IOUtil.OUT().println("------------------------ START ------------------------");
- }
-
- @Override
- public final void tearDown() throws Exception
- {
- sleep(200);
- IOUtil.OUT().println("------------------------ END --------------------------");
- IOUtil.OUT().println();
-
- doTearDown();
- super.tearDown();
- IOUtil.OUT().println();
- IOUtil.OUT().println();
- }
-
- @Override
- protected void runTest() throws Throwable
- {
- try
- {
- super.runTest();
- }
- catch (Throwable t)
- {
- t.printStackTrace(IOUtil.OUT());
- throw t;
- }
- }
-
- protected void enableConsole()
- {
- if (!consoleEnabled)
- {
- PrintTraceHandler.CONSOLE.setShortContext(true);
- OMPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
- OMPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
- OMPlatform.INSTANCE.setDebugging(true);
- consoleEnabled = true;
- }
- }
-
- protected void disableConsole()
- {
- if (consoleEnabled)
- {
- consoleEnabled = false;
- OMPlatform.INSTANCE.setDebugging(false);
- OMPlatform.INSTANCE.removeTraceHandler(PrintTraceHandler.CONSOLE);
- OMPlatform.INSTANCE.removeLogHandler(PrintLogHandler.CONSOLE);
- }
- }
-
- protected void doSetUp() throws Exception
- {
- }
-
- protected void doTearDown() throws Exception
- {
- }
-
- protected static void msg(Object m)
- {
- if (consoleEnabled)
- {
- IOUtil.OUT().println("--> " + m);
- }
- }
-
- protected static void sleep(long millis)
- {
- ConcurrencyUtil.sleep(millis);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MonitorTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MonitorTest.java
deleted file mode 100644
index 8bcab480bd..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MonitorTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.util.om.monitor.IllegalMonitorNestingException;
-import org.eclipse.net4j.util.om.monitor.MonitorAlreadyBegunException;
-import org.eclipse.net4j.util.om.monitor.MonitorUtil;
-import org.eclipse.net4j.util.om.monitor.OMMonitor;
-import org.eclipse.net4j.util.om.monitor.OMSubMonitor;
-
-/**
- * @author Eike Stepper
- */
-public class MonitorTest extends AbstractOMTest
-{
- private static final String[] CLASSES = { "Pair", "Triple" };
-
- private static final String[][] FIELDS = { { "x", "y" }, { "x", "y", "z" } };
-
- public void testJoined() throws Exception
- {
- MonitorUtil.Legacy.startMonitoring();
- try
- {
- readClasses(CLASSES, FIELDS, true, true);
- }
- finally
- {
- MonitorUtil.Legacy.stopMonitoring();
- }
- }
-
- public void testJoinedNotStarted() throws Exception
- {
- readClasses(CLASSES, FIELDS, true, true);
- }
-
- public void testJoinedStopNotStarted() throws Exception
- {
- readClasses(CLASSES, FIELDS, true, true);
- MonitorUtil.Legacy.stopMonitoring();
- }
-
- public void testUnjoined() throws Exception
- {
- MonitorUtil.Legacy.startMonitoring();
- try
- {
- readClasses(CLASSES, FIELDS, true, false);
- fail("IllegalMonitorNestingException expected");
- }
- catch (IllegalMonitorNestingException ex)
- {
- }
- finally
- {
- MonitorUtil.Legacy.stopMonitoring();
- }
- }
-
- public void testUnjoinedNotStarted() throws Exception
- {
- readClasses(CLASSES, FIELDS, true, false);
- }
-
- public void testNotForked() throws Exception
- {
- MonitorUtil.Legacy.startMonitoring();
- try
- {
- readClasses(CLASSES, FIELDS, false, false);
- fail("MonitorAlreadyBegunException expected");
- }
- catch (MonitorAlreadyBegunException ex)
- {
- }
- finally
- {
- MonitorUtil.Legacy.stopMonitoring();
- }
- }
-
- /**
- * Supports {@link MonitorUtil progress monitoring}.
- */
- private static void readClasses(String[] classes, String[][] fields, boolean fork, boolean join)
- {
- int num = classes.length;
- OMMonitor monitor = MonitorUtil.begin(2 * num, "Reading " + num + " classes");
- for (int i = 0; i < num; i++)
- {
- // Create class buffer
- monitor.worked(1, "Created class buffer for " + classes[i]);
-
- // Read class
- OMSubMonitor subMonitor = fork ? monitor.fork() : null;
- try
- {
- readFields(fields[i], fork, join);
- }
- finally
- {
- if (join)
- {
- subMonitor.join("Read class " + classes[i]);
- }
- }
- }
- }
-
- /**
- * Supports {@link MonitorUtil progress monitoring}.
- */
- private static void readFields(String[] fields, boolean fork, boolean join)
- {
- int num = fields.length;
- OMMonitor monitor = MonitorUtil.begin(2 * num, "Reading " + num + " fields");
- for (int i = 0; i < num; i++)
- {
- // Read field
- monitor.worked(1, "Read field " + fields[i]);
-
- OMSubMonitor subMonitor = fork ? monitor.fork() : null;
- try
- {
- readSetting();
- }
- finally
- {
- if (join)
- {
- subMonitor.join();
- }
- }
- }
- }
-
- /**
- * Supports {@link MonitorUtil progress monitoring}.
- */
- private static void readSetting()
- {
- OMMonitor monitor = MonitorUtil.begin(1, "Reading setting");
- // Read setting
- monitor.worked("Read setting");
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MultiMapTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MultiMapTest.java
deleted file mode 100644
index 5c650ab6b6..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/MultiMapTest.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.util.collection.MapEntry;
-import org.eclipse.net4j.util.collection.MultiMap.ListBased;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Eike Stepper
- */
-public class MultiMapTest extends AbstractOMTest
-{
- public void testListBased() throws Exception
- {
- ListBased<Integer, String> multiMap = new ListBased<Integer, String>();
- assertEquals(true, multiMap.isEmpty());
- assertEquals(0, multiMap.size());
- assertEquals(false, multiMap.containsKey(1));
- assertEquals(false, multiMap.containsValue("value" + 1));
- assertEquals(null, multiMap.get(1));
-
- addDelegate(multiMap, 0, 0);
- assertEquals(true, multiMap.isEmpty());
- assertEquals(0, multiMap.size());
- assertEquals(false, multiMap.containsKey(1));
- assertEquals(false, multiMap.containsValue("value" + 1));
- assertEquals(null, multiMap.get(1));
-
- addDelegate(multiMap, 1, 10);
- addDelegate(multiMap, 11, 10);
- addDelegate(multiMap, 21, 10);
- assertEquals(false, multiMap.isEmpty());
- assertEquals(30, multiMap.size());
- assertEquals(true, multiMap.containsKey(1));
- assertEquals(true, multiMap.containsValue("value" + 1));
- assertEquals("value" + 1, multiMap.get(1));
- assertEquals("value" + 6, multiMap.get(6));
-
- addDelegate(multiMap, 6, 10);
- assertEquals(false, multiMap.isEmpty());
- assertEquals(30, multiMap.size());
- assertEquals(true, multiMap.containsKey(1));
- assertEquals(true, multiMap.containsValue("value" + 1));
- assertEquals("value" + 1, multiMap.get(1));
- assertEquals("value" + 6, multiMap.get(6));
- assertEquals(null, multiMap.get(35));
-
- addDelegate(multiMap, 26, 10);
- assertEquals(false, multiMap.isEmpty());
- assertEquals(35, multiMap.size());
- assertEquals(true, multiMap.containsKey(1));
- assertEquals(true, multiMap.containsValue("value" + 1));
- assertEquals("value" + 1, multiMap.get(1));
- assertEquals("value" + 6, multiMap.get(6));
- assertEquals("value" + 35, multiMap.get(35));
- }
-
- public void testEntrySet() throws Exception
- {
- ListBased<Integer, String> multiMap = new ListBased<Integer, String>();
- assertEquals(true, multiMap.entrySet().isEmpty());
- assertEquals(0, multiMap.entrySet().size());
- assertEquals(false, multiMap.entrySet().contains(new MapEntry<Integer, String>(1, "value1")));
-
- addDelegate(multiMap, 0, 0);
- assertEquals(true, multiMap.entrySet().isEmpty());
- assertEquals(0, multiMap.entrySet().size());
- assertEquals(false, multiMap.entrySet().contains(new MapEntry<Integer, String>(1, "value1")));
-
- addDelegate(multiMap, 1, 10);
- addDelegate(multiMap, 11, 10);
- addDelegate(multiMap, 21, 10);
- assertEquals(false, multiMap.entrySet().isEmpty());
- assertEquals(30, multiMap.entrySet().size());
- assertEquals(true, multiMap.entrySet().contains(new MapEntry<Integer, String>(1, "value1")));
-
- addDelegate(multiMap, 6, 10);
- assertEquals(false, multiMap.entrySet().isEmpty());
- assertEquals(30, multiMap.entrySet().size());
- assertEquals(true, multiMap.entrySet().contains(new MapEntry<Integer, String>(1, "value1")));
- assertEquals(false, multiMap.entrySet().contains(new MapEntry<Integer, String>(35, "value35")));
-
- addDelegate(multiMap, 26, 10);
- assertEquals(false, multiMap.entrySet().isEmpty());
- assertEquals(35, multiMap.entrySet().size());
- assertEquals(true, multiMap.entrySet().contains(new MapEntry<Integer, String>(1, "value1")));
- assertEquals(true, multiMap.entrySet().contains(new MapEntry<Integer, String>(35, "value35")));
- }
-
- public void testKeySet() throws Exception
- {
- ListBased<Integer, String> multiMap = new ListBased<Integer, String>();
- assertEquals(true, multiMap.keySet().isEmpty());
- assertEquals(0, multiMap.keySet().size());
- assertEquals(false, multiMap.keySet().contains(1));
-
- addDelegate(multiMap, 0, 0);
- assertEquals(true, multiMap.keySet().isEmpty());
- assertEquals(0, multiMap.keySet().size());
- assertEquals(false, multiMap.keySet().contains(1));
-
- addDelegate(multiMap, 1, 10);
- addDelegate(multiMap, 11, 10);
- addDelegate(multiMap, 21, 10);
- assertEquals(false, multiMap.keySet().isEmpty());
- assertEquals(30, multiMap.keySet().size());
- assertEquals(true, multiMap.keySet().contains(1));
-
- addDelegate(multiMap, 6, 10);
- assertEquals(false, multiMap.keySet().isEmpty());
- assertEquals(30, multiMap.keySet().size());
- assertEquals(true, multiMap.keySet().contains(1));
- assertEquals(false, multiMap.keySet().contains(35));
-
- addDelegate(multiMap, 26, 10);
- assertEquals(false, multiMap.keySet().isEmpty());
- assertEquals(35, multiMap.keySet().size());
- assertEquals(true, multiMap.keySet().contains(1));
- assertEquals(true, multiMap.keySet().contains(35));
- }
-
- public void testValues() throws Exception
- {
- ListBased<Integer, String> multiMap = new ListBased<Integer, String>();
- assertEquals(true, multiMap.values().isEmpty());
- assertEquals(0, multiMap.values().size());
- assertEquals(false, multiMap.values().contains("value1"));
-
- addDelegate(multiMap, 0, 0);
- assertEquals(true, multiMap.values().isEmpty());
- assertEquals(0, multiMap.values().size());
- assertEquals(false, multiMap.values().contains("value1"));
-
- addDelegate(multiMap, 1, 10);
- addDelegate(multiMap, 11, 10);
- addDelegate(multiMap, 21, 10);
- assertEquals(false, multiMap.values().isEmpty());
- assertEquals(30, multiMap.values().size());
- assertEquals(true, multiMap.values().contains("value1"));
-
- addDelegate(multiMap, 6, 10);
- assertEquals(false, multiMap.values().isEmpty());
- assertEquals(30, multiMap.values().size());
- assertEquals(true, multiMap.values().contains("value1"));
- assertEquals(false, multiMap.values().contains("value35"));
-
- addDelegate(multiMap, 26, 10);
- assertEquals(false, multiMap.values().isEmpty());
- assertEquals(35, multiMap.values().size());
- assertEquals(true, multiMap.values().contains("value1"));
- assertEquals(true, multiMap.values().contains("value35"));
- }
-
- public void testEntrySetIterator() throws Exception
- {
- ListBased<Integer, String> multiMap = new ListBased<Integer, String>();
- assertIterator(new HashSet<Object>(), multiMap.entrySet());
-
- addDelegate(multiMap, 0, 0);
- assertIterator(new HashSet<Object>(), multiMap.entrySet());
-
- addDelegate(multiMap, 1, 10);
- addDelegate(multiMap, 11, 10);
- addDelegate(multiMap, 21, 10);
- assertIterator(createMapEntries(1, 30), multiMap.entrySet());
-
- addDelegate(multiMap, 6, 10);
- assertIterator(createMapEntries(1, 30), multiMap.entrySet());
-
- addDelegate(multiMap, 26, 10);
- assertIterator(createMapEntries(1, 35), multiMap.entrySet());
- }
-
- public void testKeySetIterator() throws Exception
- {
- ListBased<Integer, String> multiMap = new ListBased<Integer, String>();
- assertIterator(new HashSet<Object>(), multiMap.keySet());
-
- addDelegate(multiMap, 0, 0);
- assertIterator(new HashSet<Object>(), multiMap.keySet());
-
- addDelegate(multiMap, 1, 10);
- addDelegate(multiMap, 11, 10);
- addDelegate(multiMap, 21, 10);
- assertIterator(createKeys(1, 30), multiMap.keySet());
-
- addDelegate(multiMap, 6, 10);
- assertIterator(createKeys(1, 30), multiMap.keySet());
-
- addDelegate(multiMap, 26, 10);
- assertIterator(createKeys(1, 35), multiMap.keySet());
- }
-
- public void testValuesIterator() throws Exception
- {
- ListBased<Integer, String> multiMap = new ListBased<Integer, String>();
- assertIterator(new HashSet<Object>(), multiMap.values());
-
- addDelegate(multiMap, 0, 0);
- assertIterator(new HashSet<Object>(), multiMap.values());
-
- addDelegate(multiMap, 1, 10);
- addDelegate(multiMap, 11, 10);
- addDelegate(multiMap, 21, 10);
- assertIterator(createValues(1, 30), multiMap.values());
-
- addDelegate(multiMap, 6, 10);
- assertIterator(createValues(1, 30), multiMap.values());
-
- addDelegate(multiMap, 26, 10);
- assertIterator(createValues(1, 35), multiMap.values());
- }
-
- private void addDelegate(ListBased<Integer, String> multiMap, int start, int count)
- {
- Map<Integer, String> map = new HashMap<Integer, String>();
- for (int i = 0; i < count; i++)
- {
- int key = start + i;
- map.put(key, "value" + key);
- }
-
- multiMap.getDelegates().add(map);
- }
-
- private void assertIterator(Set<?> expectedObjects, Collection<?> actualObjects)
- {
- for (Object actualObject : actualObjects)
- {
- if (!expectedObjects.remove(actualObject))
- {
- fail("Unexpected object: " + actualObject);
- }
- }
-
- if (!expectedObjects.isEmpty())
- {
- fail("Missing objects: " + expectedObjects);
- }
- }
-
- private Set<Object> createMapEntries(int start, int count)
- {
- Set<Object> result = new HashSet<Object>();
- for (int i = 0; i < count; i++)
- {
- int key = start + i;
- result.add(new MapEntry<Integer, String>(key, "value" + key));
- }
-
- return result;
- }
-
- private Set<Object> createKeys(int start, int count)
- {
- Set<Object> result = new HashSet<Object>();
- for (int i = 0; i < count; i++)
- {
- int key = start + i;
- result.add(key);
- }
-
- return result;
- }
-
- private Set<Object> createValues(int start, int count)
- {
- Set<Object> result = new HashSet<Object>();
- for (int i = 0; i < count; i++)
- {
- int key = start + i;
- result.add("value" + key);
- }
-
- return result;
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ReferenceValueMapTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ReferenceValueMapTest.java
deleted file mode 100644
index 9dbb7419ad..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ReferenceValueMapTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.util.ref.ReferenceValueMap;
-
-/**
- * @author Eike Stepper
- */
-public class ReferenceValueMapTest extends AbstractOMTest
-{
- public void testSameKey() throws Exception
- {
- ReferenceValueMap<String, Object> map = new ReferenceValueMap.Weak<String, Object>();
- for (int i = 0; i < 10; i++)
- {
- map.put("SIMON", new Object());
- System.gc();
- map.put("SIMON", new Object());
- assertTrue(map.size() >= 0);
- }
- }
-
- public void testDifferentKey() throws Exception
- {
- ReferenceValueMap<String, Object> map = new ReferenceValueMap.Weak<String, Object>();
- for (int i = 0; i < 10; i++)
- {
- map.put("SIMON", new Object());
- System.gc();
- map.put("SIMON2", new Object());
- assertTrue(map.size() >= 1);
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java
deleted file mode 100644
index af9ded8930..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.internal.util.security.ChallengeNegotiator;
-import org.eclipse.net4j.internal.util.security.NegotiationContext;
-import org.eclipse.net4j.internal.util.security.PasswordCredentials;
-import org.eclipse.net4j.internal.util.security.PasswordCredentialsProvider;
-import org.eclipse.net4j.internal.util.security.Randomizer;
-import org.eclipse.net4j.internal.util.security.ResponseNegotiator;
-import org.eclipse.net4j.internal.util.security.UserManager;
-import org.eclipse.net4j.util.WrappedException;
-import org.eclipse.net4j.util.security.IChallengeResponse;
-import org.eclipse.net4j.util.security.IPasswordCredentialsProvider;
-
-import java.nio.ByteBuffer;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-/**
- * @author Eike Stepper
- */
-public class SecurityTest extends AbstractOMTest
-{
- private static final int TIMEOUT = 1000;
-
- private static final String USER_ID = "stepper";
-
- private static final char[] PASSWORD1 = "eike2007".toCharArray();
-
- private static final char[] PASSWORD2 = "invalid".toCharArray();
-
- private static final PasswordCredentials CREDENTIALS = new PasswordCredentials(USER_ID, PASSWORD1);
-
- private IPasswordCredentialsProvider credentialsProvider = new PasswordCredentialsProvider(CREDENTIALS);
-
- public void testSuccess() throws Exception
- {
- // Prepare randomizer
- Randomizer randomizer = new Randomizer();
- randomizer.activate();
-
- // Prepare user manager
- UserManager userManager = new UserManager();
- userManager.activate();
- userManager.addUser(USER_ID, PASSWORD1);
-
- // Create negotiation contexts
- PeerNegotiationContext challengeContext = new PeerNegotiationContext();
- PeerNegotiationContext responseContext = new PeerNegotiationContext();
-
- // Prepare challenge context
- challengeContext.setPeer(responseContext);
- Thread challengeThread = new Thread(challengeContext, "challengeThread");
- challengeThread.start();
-
- // Prepare response context
- responseContext.setPeer(challengeContext);
- Thread responseThread = new Thread(responseContext, "responseThread");
- responseThread.start();
-
- // Prepare response negotiator
- ResponseNegotiator responseNegotiator = new ResponseNegotiator();
- responseNegotiator.setCredentialsProvider(credentialsProvider);
- responseNegotiator.activate();
- responseNegotiator.negotiate(responseContext);
-
- // Prepare challenge negotiator
- ChallengeNegotiator challengeNegotiator = new ChallengeNegotiator();
- challengeNegotiator.setRandomizer(randomizer);
- challengeNegotiator.setUserManager(userManager);
- challengeNegotiator.activate();
- challengeNegotiator.negotiate(challengeContext);
-
- Enum<?> responseState = responseContext.waitUntilFinished(TIMEOUT);
- assertEquals(IChallengeResponse.State.SUCCESS, responseState);
-
- Enum<?> challengeState = challengeContext.waitUntilFinished(TIMEOUT);
- assertEquals(IChallengeResponse.State.SUCCESS, challengeState);
-
- challengeContext.deactivate();
- responseContext.deactivate();
- challengeNegotiator.deactivate();
- responseNegotiator.deactivate();
- userManager.deactivate();
- randomizer.deactivate();
- }
-
- public void testFailure() throws Exception
- {
- // Prepare randomizer
- Randomizer randomizer = new Randomizer();
- randomizer.activate();
-
- // Prepare user manager
- UserManager userManager = new UserManager();
- userManager.activate();
- userManager.addUser(USER_ID, PASSWORD2);
-
- // Create negotiation contexts
- PeerNegotiationContext challengeContext = new PeerNegotiationContext();
- PeerNegotiationContext responseContext = new PeerNegotiationContext();
-
- // Prepare challenge context
- challengeContext.setPeer(responseContext);
- Thread challengeThread = new Thread(challengeContext, "challengeThread");
- challengeThread.start();
-
- // Prepare response context
- responseContext.setPeer(challengeContext);
- Thread responseThread = new Thread(responseContext, "responseThread");
- responseThread.start();
-
- // Prepare response negotiator
- ResponseNegotiator responseNegotiator = new ResponseNegotiator();
- responseNegotiator.setCredentialsProvider(credentialsProvider);
- responseNegotiator.activate();
- responseNegotiator.negotiate(responseContext);
-
- // Prepare challenge negotiator
- ChallengeNegotiator challengeNegotiator = new ChallengeNegotiator();
- challengeNegotiator.setRandomizer(randomizer);
- challengeNegotiator.setUserManager(userManager);
- challengeNegotiator.activate();
- challengeNegotiator.negotiate(challengeContext);
-
- Enum<?> responseState = responseContext.waitUntilFinished(TIMEOUT);
- assertEquals(IChallengeResponse.State.FAILURE, responseState);
-
- Enum<?> challengeState = challengeContext.waitUntilFinished(TIMEOUT);
- assertEquals(IChallengeResponse.State.FAILURE, challengeState);
-
- challengeContext.deactivate();
- responseContext.deactivate();
- challengeNegotiator.deactivate();
- responseNegotiator.deactivate();
- userManager.deactivate();
- randomizer.deactivate();
- }
-
- /**
- * @author Eike Stepper
- */
- private final class PeerNegotiationContext extends NegotiationContext implements Runnable
- {
- private PeerNegotiationContext peer;
-
- private String userID;
-
- private BlockingQueue<ByteBuffer> queue = new LinkedBlockingQueue<ByteBuffer>();
-
- private boolean running;
-
- public PeerNegotiationContext()
- {
- }
-
- public PeerNegotiationContext getPeer()
- {
- return peer;
- }
-
- public void setPeer(PeerNegotiationContext peer)
- {
- this.peer = peer;
- }
-
- public String getUserID()
- {
- return userID;
- }
-
- public void setUserID(String userID)
- {
- this.userID = userID;
- }
-
- public ByteBuffer getBuffer()
- {
- return ByteBuffer.allocateDirect(4096);
- }
-
- public void transmitBuffer(ByteBuffer buffer)
- {
- buffer.flip();
- queue.add(buffer);
- }
-
- public void deactivate()
- {
- running = false;
- }
-
- public void run()
- {
- running = true;
- while (running)
- {
- if (peer != null)
- {
- Receiver receiver = peer.getReceiver();
- if (receiver != null)
- {
- ByteBuffer buffer = null;
-
- try
- {
- buffer = queue.poll(20, TimeUnit.MILLISECONDS);
- }
- catch (InterruptedException ex)
- {
- throw WrappedException.wrap(ex);
- }
-
- if (buffer != null)
- {
- receiver.receiveBuffer(peer, buffer);
- }
- }
- }
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java
deleted file mode 100644
index 4601b4ed82..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SortedFileMapTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.util.io.ExtendedDataInput;
-import org.eclipse.net4j.util.io.ExtendedDataOutput;
-import org.eclipse.net4j.util.io.IOUtil;
-import org.eclipse.net4j.util.io.SortedFileMap;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class SortedFileMapTest extends AbstractOMTest
-{
- public void testMap() throws Exception
- {
- File file = new File("testMap.dat");
- if (file.exists())
- {
- file.delete();
- }
-
- SortedFileMap<Integer, String> map = null;
-
- try
- {
- map = new TestMap(file);
- for (int i = 0; i < 500; i++)
- {
- map.put(i, "Value " + i);
- }
-
- for (int i = 0; i < 500; i++)
- {
- String value = map.get(i);
- IOUtil.OUT().println(value);
- }
- }
- finally
- {
- IOUtil.close(map);
- }
- }
-
- /**
- * @author Eike Stepper
- */
- public static final class TestMap extends SortedFileMap<Integer, String>
- {
- public TestMap(File file)
- {
- super(file, "rw");
- }
-
- @Override
- public int getKeySize()
- {
- return 4;
- }
-
- @Override
- protected Integer readKey(ExtendedDataInput in) throws IOException
- {
- return in.readInt();
- }
-
- @Override
- protected void writeKey(ExtendedDataOutput out, Integer key) throws IOException
- {
- out.writeInt(key);
- }
-
- @Override
- public int getValueSize()
- {
- return 20;
- }
-
- @Override
- protected String readValue(ExtendedDataInput in) throws IOException
- {
- return in.readString();
- }
-
- @Override
- protected void writeValue(ExtendedDataOutput out, String value) throws IOException
- {
- byte[] bytes = value.getBytes();
- if (bytes.length + 4 > getValueSize())
- {
- throw new IllegalArgumentException("Value size of " + getValueSize() + " exceeded: " + value);
- }
-
- out.writeByteArray(bytes);
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SynchronizingCorrelatorTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SynchronizingCorrelatorTest.java
deleted file mode 100644
index 6215d43f8c..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SynchronizingCorrelatorTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.internal.util.concurrent.SynchronizingCorrelator;
-import org.eclipse.net4j.util.concurrent.ISynchronizer;
-
-/**
- * @author Eike Stepper
- */
-public class SynchronizingCorrelatorTest extends AbstractOMTest
-{
- public void testPutConsumerFirst() throws Exception
- {
- final Boolean[] result = { false };
- final SynchronizingCorrelator<String, Boolean> correlator = new SynchronizingCorrelator<String, Boolean>();
- final Thread consumer = new Thread()
- {
- @Override
- public void run()
- {
- ISynchronizer<Boolean> eike = correlator.correlate("eike");
- result[0] = eike.get(5000);
- msg("RESULT: " + result[0]);
- }
- };
-
- consumer.start();
- sleep(50);
-
- correlator.put("eike", true);
- consumer.join(100);
- assertEquals(Boolean.TRUE, result[0]);
- }
-
- public void testPutConsumerFirst100() throws Exception
- {
- for (int i = 0; i < 100; i++)
- {
- testPutConsumerFirst();
- }
- }
-
- public void testBlockingPutConsumerFirst() throws Exception
- {
- final Boolean[] result = { false };
- final SynchronizingCorrelator<String, Boolean> correlator = new SynchronizingCorrelator<String, Boolean>();
- final Thread consumer = new Thread()
- {
- @Override
- public void run()
- {
- ISynchronizer<Boolean> eike = correlator.correlate("eike");
- result[0] = eike.get(5000);
- msg("RESULT: " + result[0]);
- }
- };
-
- consumer.start();
- Thread.sleep(10);
-
- boolean consumed = correlator.put("eike", true, 1000);
- msg("Consumed: " + consumed);
- assertTrue(consumed);
-
- consumer.join(100);
- assertEquals(Boolean.TRUE, result[0]);
- }
-
- public void testBlockingPutConsumerFirst100() throws Exception
- {
- for (int i = 0; i < 100; i++)
- {
- testBlockingPutConsumerFirst();
- }
- }
-
- public void testPutProducerFirst() throws Exception
- {
- final Boolean[] result = { false };
- final SynchronizingCorrelator<String, Boolean> correlator = new SynchronizingCorrelator<String, Boolean>();
- correlator.put("eike", true);
-
- final Thread consumer = new Thread()
- {
- @Override
- public void run()
- {
- ISynchronizer<Boolean> eike = correlator.correlate("eike");
- result[0] = eike.get(5000);
- msg("RESULT: " + result[0]);
- }
- };
-
- consumer.start();
- Thread.sleep(10);
-
- consumer.join(100);
- assertEquals(Boolean.TRUE, result[0]);
- }
-
- public void testPutProducerFirst100() throws Exception
- {
- for (int i = 0; i < 100; i++)
- {
- testPutProducerFirst();
- }
- }
-
- public void testBlockingPutProducerFirst() throws Exception
- {
- final Boolean[] result = { false };
- final SynchronizingCorrelator<String, Boolean> correlator = new SynchronizingCorrelator<String, Boolean>();
- boolean consumed = correlator.put("eike", true, 50);
- msg("Consumed: " + consumed);
- assertFalse(consumed);
-
- final Thread consumer = new Thread()
- {
- @Override
- public void run()
- {
- ISynchronizer<Boolean> eike = correlator.correlate("eike");
- result[0] = eike.get(5000);
- msg("RESULT: " + result[0]);
- }
- };
-
- consumer.start();
- Thread.sleep(10);
-
- consumer.join(50);
- assertEquals(Boolean.TRUE, result[0]);
- }
-
- public void testBlockingPutProducerFirst50() throws Exception
- {
- for (int i = 0; i < 50; i++)
- {
- testBlockingPutProducerFirst();
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java
deleted file mode 100644
index fd0375e551..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/UTFTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class UTFTest extends AbstractOMTest
-{
- private static final int UNSIGNED_SHORT_MAX = (1 << 16) - 1;
-
- public void testUTF8_OneOctet() throws Exception
- {
- final int MAX = UNSIGNED_SHORT_MAX / 10 + 1;
- String part = "0123456789";
- assertEquals(10, part.length());
-
- StringBuilder builder = new StringBuilder();
- for (int i = 0; i < MAX; i++)
- {
- builder.append(part);
- }
-
- String str = builder.toString();
- assertTrue(str.length() > UNSIGNED_SHORT_MAX);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(baos);
- dos.writeUTF(str);
-
- String received = baos.toString("UTF-8");
- assertEquals(str, received);
- }
-
- public void testUTF8_ThreeOctets() throws Exception
- {
- final int MAX = UNSIGNED_SHORT_MAX >> 1;
- StringBuilder builder = new StringBuilder();
- for (int i = 0; i < MAX; i++)
- {
- builder.append("\u6771");
- }
-
- String str = builder.toString();
- assertEquals(MAX, str.length());
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(baos);
- dos.writeUTF(str);
-
- String received = baos.toString("UTF-8");
- assertEquals(str, received);
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ZipTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ZipTest.java
deleted file mode 100644
index 5efe0c5264..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/ZipTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests;
-
-import org.eclipse.net4j.util.io.ZIPUtil;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * @author Eike Stepper
- */
-public class ZipTest extends AbstractOMTest
-{
- public void testZip() throws Exception
- {
- File zipFile = newFile("src.zip");
- File sourceFolder = newFile("src");
- ZIPUtil.zip(sourceFolder, false, zipFile);
- }
-
- private static File newFile(String path) throws IOException
- {
- return new File(path).getCanonicalFile();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/CacheTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/CacheTest.java
deleted file mode 100644
index 17cf10ef43..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/CacheTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests.cache;
-
-import org.eclipse.net4j.internal.util.cache.CacheMonitor;
-import org.eclipse.net4j.internal.util.cache.ThresholdConditionPolicy;
-import org.eclipse.net4j.util.cache.ICacheMonitor.ConditionPolicy;
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
-/**
- * @author Eike Stepper
- */
-public class CacheTest extends AbstractOMTest
-{
- public void testLifecycle() throws Exception
- {
- ConditionPolicy conditionPolicy = new ThresholdConditionPolicy(1000000L, 10000000L);
-
- CacheMonitor cacheMonitor = new CacheMonitor();
- cacheMonitor.setConditionPolicy(conditionPolicy);
- cacheMonitor.setPauseRED(100L);
- cacheMonitor.setPauseYELLOW(100L);
- cacheMonitor.setPauseGREEN(100L);
- cacheMonitor.setDaemon(true);
- cacheMonitor.activate();
-
- RevisionManager revisionManager = new RevisionManager();
- revisionManager.setCacheMonitor(cacheMonitor);
- revisionManager.activate();
-
- for (int version = 1; version <= 10; version++)
- {
- for (int id = 1; id <= 100; id++)
- {
- revisionManager.getRevision(id, version);
- sleep(200);
- }
-
- System.gc();
- sleep(1000);
- }
-
- revisionManager.deactivate();
- cacheMonitor.deactivate();
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/Revision.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/Revision.java
deleted file mode 100644
index 2f3d325ca5..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/Revision.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests.cache;
-
-/**
- * @author Eike Stepper
- */
-public class Revision
-{
- private RevisionManager revisionManager;
-
- private int id;
-
- private int version;
-
- private byte[] data = new byte[100000];
-
- public Revision(RevisionManager revisionManager, int id, int version)
- {
- this.revisionManager = revisionManager;
- this.id = id;
- this.version = version;
- }
-
- public RevisionManager getRevisionManager()
- {
- return revisionManager;
- }
-
- public int getID()
- {
- return id;
- }
-
- public int getVersion()
- {
- return version;
- }
-
- public byte[] getData()
- {
- return data;
- }
-
- @Override
- public String toString()
- {
- return "R" + id + "v" + version;
- }
-
- // @SuppressWarnings("unchecked")
- // private static Set finalized = new HashSet();
- //
- // @SuppressWarnings("unchecked")
- // private static List refs = new ArrayList();
- //
- // @SuppressWarnings("unchecked")
- // private static ReferenceQueue queue = new ReferenceQueue();
- //
- @Override
- protected void finalize() throws Throwable
- {
- System.err.println("FINALIZE " + this);
- revisionManager.finalizeRevision(this);
- // long token = id;
- // token <<= 32;
- // token |= version;
- // if (!finalized.add(token))
- // {
- // System.err.println("************************************************************************");
- // }
- //
- // refs.add(new PhantomReference<Revision>(this, queue));
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/RevisionManager.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/RevisionManager.java
deleted file mode 100644
index 80365dc399..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/RevisionManager.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests.cache;
-
-import org.eclipse.net4j.internal.util.cache.Cache;
-
-import java.lang.ref.Reference;
-import java.lang.ref.ReferenceQueue;
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Eike Stepper
- */
-public class RevisionManager extends Cache<Revision>
-{
- private Map<Integer, TimeLine> timeLines = new HashMap<Integer, TimeLine>();
-
- public RevisionManager()
- {
- }
-
- public Revision getRevision(int id, int version)
- {
- TimeLine timeLine = getTimeLine(id);
- return timeLine.getRevision(version);
- }
-
- public void evictElements(int elementCount)
- {
- }
-
- protected TimeLine getTimeLine(int id)
- {
- TimeLine timeLine = timeLines.get(id);
- if (timeLine == null)
- {
- timeLine = new TimeLine(id);
- timeLines.put(id, timeLine);
- }
-
- return timeLine;
- }
-
- protected Revision loadRevision(int id, int version)
- {
- Revision revision = new Revision(this, id, version);
- return revision;
- }
-
- protected void finalizeRevision(Revision revision)
- {
- // TimeLine timeLine = getTimeLine(revision.getID());
- // timeLine.addRevision(revision);
- }
-
- @Override
- protected void unreachableElement(Reference<? extends Revision> reference)
- {
- }
-
- /**
- * @author Eike Stepper
- */
- private class TimeLine
- {
- private int id;
-
- private List<Reference<Revision>> revisions = new ArrayList<Reference<Revision>>();
-
- public TimeLine(int id)
- {
- this.id = id;
- }
-
- public int getID()
- {
- return id;
- }
-
- public Revision getRevision(int version)
- {
- for (Iterator<Reference<Revision>> it = revisions.iterator(); it.hasNext();)
- {
- Reference<Revision> reference = it.next();
- Revision revision = reference.get();
- if (revision != null)
- {
- if (revision.getVersion() == version)
- {
- return revision;
- }
- }
- else
- {
- it.remove();
- break;
- }
- }
-
- long time = System.currentTimeMillis();
- Revision revision = loadRevision(id, version);
- time = System.currentTimeMillis() - time;
-
- addRevision(revision);
- return revision;
- }
-
- public void addRevision(Revision revision)
- {
- revisions.add(new CacheElement(revision, getReferenceQueue()));
- }
- }
-
- /**
- * @author Eike Stepper
- */
- private static final class CacheElement extends SoftReference<Revision>
- {
- private int id;
-
- private int version;
-
- // private Reference<Revision> ref;
-
- public CacheElement(Revision revision, ReferenceQueue<Revision> queue)
- {
- super(revision, queue);
- // ref = new WeakReference<Revision>(revision, queue);
- id = revision.getID();
- version = revision.getVersion();
- }
-
- public int getID()
- {
- return id;
- }
-
- public int getVersion()
- {
- return version;
- }
-
- @Override
- public String toString()
- {
- return "R" + id + "v" + version + (get() == null ? "" : " UNCLEARED");
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java
deleted file mode 100644
index 183f79dfcd..0000000000
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.tests.cache;
-
-import org.eclipse.net4j.util.ref.KeyedWeakReference;
-import org.eclipse.net4j.util.tests.AbstractOMTest;
-
-import java.lang.ref.ReferenceQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Eike Stepper
- */
-public class SensitiveProtoTest extends AbstractOMTest
-{
- @SuppressWarnings("unchecked")
- public void testSensitiveCacheWithEvictionPolicy() throws Exception
- {
- ConcurrentMap<Integer, KeyedAndValuedWeakReference<Integer, String>> map //
- = new ConcurrentHashMap<Integer, KeyedAndValuedWeakReference<Integer, String>>();
-
- ReferenceQueue<String> queue //
- = new ReferenceQueue<String>();
-
- for (int i = 0; i < 20; i++)
- {
- map.put(i, new KeyedAndValuedWeakReference<Integer, String>(i, String.valueOf(i), queue));
- }
-
- for (int gc = 0; gc < 10; gc++)
- {
- System.gc();
- sleep(100);
- }
-
- KeyedAndValuedWeakReference<Integer, String> ref;
- while ((ref = (KeyedAndValuedWeakReference<Integer, String>)queue.poll()) != null)
- {
- int i = ref.getKey();
- System.out.println("Dequeued i=" + i);
- if (i < 10)
- {
- map.put(i, new KeyedAndValuedWeakReference<Integer, String>(i, ref.getValue(), queue));
- }
- else
- {
- map.remove(i, ref);
- }
- }
-
- assertEquals(10, map.size());
- }
-
- public static class KeyedAndValuedWeakReference<K, T> extends KeyedWeakReference<K, T>
- {
- private T value;
-
- public KeyedAndValuedWeakReference(K key, T ref, ReferenceQueue<T> queue)
- {
- super(key, ref, queue);
- value = ref;
- }
-
- public KeyedAndValuedWeakReference(K key, T ref)
- {
- super(key, ref);
- value = ref;
- }
-
- public T getValue()
- {
- return value;
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.tests/test.xml b/plugins/org.eclipse.net4j.tests/test.xml
deleted file mode 100644
index ee303ae0f3..0000000000
--- a/plugins/org.eclipse.net4j.tests/test.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
-
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.net4j.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="emf-folder" value="${eclipse-home}/emf_folder"/>
- <delete dir="${emf-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${emf-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.net4j.tests.AllTests"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project> \ No newline at end of file

Back to the top