update core event protocol

buko [2003-10-26 20:09:16]
update core event protocol
Filename
aether2/hercules/hercules.iws
aether2/hercules/src/java/aether/server/ConnectionFactory.java
aether2/hercules/src/java/aether/server/DefaultConnectionFactory.java
aether2/hercules/src/java/aether/server/core/DefaultConnectionProvider.java
aether2/hercules/src/java/aether/server/core/LinkProvider.java
aether2/hercules/src/java/aether/server/core/MonitorProvider.java
aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
aether2/hercules/src/java/memento/world/model/AbstractWorldObject.java
aether2/hercules/src/java/memento/world/model/Avatar.java
aether2/hercules/src/java/memento/world/model/DefaultAvatar.java
aether2/hercules/src/java/memento/world/model/DefaultLocatableWorldObject.java
aether2/hercules/src/java/memento/world/model/DefaultPortal.java
aether2/hercules/src/java/memento/world/model/DefaultSector.java
aether2/hercules/src/java/memento/world/model/DefaultWorldModel.java
aether2/hercules/src/java/memento/world/model/LocatableWorldObject.java
aether2/hercules/src/java/memento/world/model/Portal.java
aether2/hercules/src/java/memento/world/model/Sector.java
aether2/hercules/src/java/memento/world/model/SectorEvent.java
aether2/hercules/src/java/memento/world/model/SectorListener.java
aether2/hercules/src/java/memento/world/model/WorldModel.java
aether2/hercules/src/java/memento/world/model/WorldModelEvent.java
aether2/hercules/src/java/memento/world/model/WorldModelListener.java
aether2/hercules/src/java/memento/world/model/WorldObject.java
aether2/hercules/src/test/aether/server/ConnectionFactoryTest.java
aether2/hercules/src/test/aether/server/core/LinkProviderTest.java
aether2/hercules/src/test/aether/server/core/MonitorProviderTest.java
aether2/hercules/src/test/aether/server/domain/DomainAgentTest.java
aether2/hercules/src/test/aether/server/domain/RemoteDomainAgentTest.java
aether2/hercules/src/test/aether/server/responder/DefaultSwitchBoardTest.java
aether2/hercules/src/test/memento/world/manager/WorldManagerTest.java
diff --git a/aether2/hercules/hercules.iws b/aether2/hercules/hercules.iws
index ba060d0..ff4a23b 100644
--- a/aether2/hercules/hercules.iws
+++ b/aether2/hercules/hercules.iws
@@ -4,30 +4,44 @@
     <history>
       <source-position-entry url="file://$PROJECT_DIR$/.cvsignore" line="5" column="5" vertical-scroll-proportion="0.18292683" horizontal-scroll-proportion="0.048476454" />
       <source-position-entry url="file://$PROJECT_DIR$/build.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/LocatableWorldObject.java" line="54" column="39" vertical-scroll-proportion="0.9268293" horizontal-scroll-proportion="0.37811634" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/DefaultLocatableWorldObject.java" line="79" column="5" vertical-scroll-proportion="0.9268293" horizontal-scroll-proportion="0.048476454" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/Sector.java" line="13" column="38" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.36893204" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/LocatableWorldObject.java" line="0" column="27" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.26213592" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/Portal.java" line="36" column="5" vertical-scroll-proportion="0.6570397" horizontal-scroll-proportion="0.048543688" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/WorldModel.java" line="13" column="19" vertical-scroll-proportion="0.33275262" horizontal-scroll-proportion="0.18446602">
+        <folding>
+          <element signature="imports" expanded="true" />
+        </folding>
+      </source-position-entry>
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/Avatar.java" line="17" column="20" vertical-scroll-proportion="0.6219512" horizontal-scroll-proportion="0.19417475" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/WorldObject.java" line="8" column="13" vertical-scroll-proportion="0.2595819" horizontal-scroll-proportion="0.1262136" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/WorldAdvertisement.java" line="10" column="48" vertical-scroll-proportion="0.23170732" horizontal-scroll-proportion="0.46601942" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/domain/Advertisement.java" line="12" column="13" vertical-scroll-proportion="-1.7090592" horizontal-scroll-proportion="0.1262136" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/AetherContainer.java" line="14" column="27" vertical-scroll-proportion="0.40243903" horizontal-scroll-proportion="0.26213592" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/ConnectionFactory.java" line="22" column="48" vertical-scroll-proportion="0.73170733" horizontal-scroll-proportion="0.46601942" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/DefaultConnectionFactory.java" line="41" column="41" vertical-scroll-proportion="0.869338" horizontal-scroll-proportion="0.39805827" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/core/DefaultConnectionProvider.java" line="92" column="11" vertical-scroll-proportion="0.2682927" horizontal-scroll-proportion="0.106796116" />
     </history>
     <open-files>
-      <source-position-entry url="file://$PROJECT_DIR$/build.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/LocatableWorldObject.java" line="54" column="39" vertical-scroll-proportion="0.9268293" horizontal-scroll-proportion="0.37811634" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/memento/world/model/DefaultLocatableWorldObject.java" line="79" column="5" vertical-scroll-proportion="0.9268293" horizontal-scroll-proportion="0.048476454" selected="true" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/ConnectionFactory.java" line="22" column="48" vertical-scroll-proportion="0.73170733" horizontal-scroll-proportion="0.46601942" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/DefaultConnectionFactory.java" line="41" column="41" vertical-scroll-proportion="0.869338" horizontal-scroll-proportion="0.39805827" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/core/DefaultConnectionProvider.java" line="92" column="11" vertical-scroll-proportion="0.2682927" horizontal-scroll-proportion="0.106796116" selected="true" />
     </open-files>
   </component>
   <component name="ToolWindowManager">
-    <frame x="179" y="19" width="835" height="719" extended-state="0" />
+    <frame x="111" y="11" width="834" height="719" extended-state="0" />
     <editor active="true" />
     <layout>
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" />
-      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.2468153" order="5" />
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.4968153" order="5" />
       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="2" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" />
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32961783" order="7" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.41318125" order="0" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.4758883" order="0" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="3" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="1" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="0.33" order="-1" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.32961783" order="1" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="0.33" order="8" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" />
       <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="0" />
@@ -165,7 +179,7 @@
     <Commit>
       <option name="NON_RECURSIVE" value="false" />
       <option name="REVISION_TAG" value="" />
-      <option name="LOG_MESSAGE" value="" />
+      <option name="LOG_MESSAGE" value="added vlad changes" />
       <option name="ADDITIONAL_OPTIONS" value="" />
     </Commit>
     <Diff>
@@ -175,7 +189,7 @@
     </Diff>
     <Add>
       <option name="ADD_AS_BINARY" value="false" />
-      <option name="LOG_MESSAGE" value="" />
+      <option name="LOG_MESSAGE" value="implementing core schema" />
     </Add>
     <Status>
       <option name="NON_RECURSIVE" value="false" />
@@ -193,7 +207,7 @@
     <Remove>
       <option name="NON_RECURSIVE" value="false" />
       <option name="FORCE_RECURSIVE" value="false" />
-      <option name="DELETE_FILE" value="false" />
+      <option name="DELETE_FILE" value="true" />
     </Remove>
     <Log>
       <option name="DEFAULT_BRANCH" value="false" />
@@ -236,10 +250,10 @@
   <component name="ProjectViewSettings">
     <navigator currentView="ProjectPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
     <view id="ProjectPane">
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento/world/model" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/server" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java" />
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento" />
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento/world" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/server/core" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
     </view>
diff --git a/aether2/hercules/src/java/aether/server/ConnectionFactory.java b/aether2/hercules/src/java/aether/server/ConnectionFactory.java
new file mode 100644
index 0000000..382d839
--- /dev/null
+++ b/aether2/hercules/src/java/aether/server/ConnectionFactory.java
@@ -0,0 +1,26 @@
+package aether.server;
+
+import aether.net.Connection;
+
+import java.io.IOException;
+
+/**
+ * ConnectionFactory component provides a basic mechanism for other components
+ * in the container to retreive connections.
+ *
+ * Buko O. (aso22@columbia.edu)
+ * @version 0.1
+ **/
+public interface ConnectionFactory
+{
+    /**
+     * Construct a new Connection.
+     *
+     * @param host host of the server to connect to
+     * @param port port of the server to connect to
+     * @return Connection object to that server
+     * @throws IOException
+     *         if the connection can't be opened
+     */
+    Connection create(String host, int port) throws IOException;
+}
diff --git a/aether2/hercules/src/java/aether/server/DefaultConnectionFactory.java b/aether2/hercules/src/java/aether/server/DefaultConnectionFactory.java
new file mode 100644
index 0000000..b527c53
--- /dev/null
+++ b/aether2/hercules/src/java/aether/server/DefaultConnectionFactory.java
@@ -0,0 +1,49 @@
+package aether.server;
+
+import aether.net.Connection;
+import aether.net.DefaultConnection;
+import aether.net.Publisher;
+
+import java.beans.beancontext.BeanContextServices;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.util.*;
+import java.io.IOException;
+
+import org.apache.log4j.Logger;
+import net.concedere.dundee.AbstractProvider;
+import net.concedere.dundee.ComponentException;
+import net.concedere.dundee.DefaultComponent;
+import net.concedere.dundee.framework.Startable;
+import net.concedere.dundee.framework.Initializable;
+import net.concedere.dundee.framework.Disposable;
+
+/**
+ * This component provides Connection objects to other components in the
+ * container.
+ *
+ * TODO: in the future this class should cache Connection objects so multiple
+ * --- connections to the same server can be reused
+ * TODO: in the future this class should proxy Connection objects so that
+ * --- if one component closes a shared component it only decreases a refcount
+ * --- instead of closing the connection
+ *
+ * @author Buko O. (buko@concedere.net)
+ * @version 0.1
+ **/
+public class DefaultConnectionFactory implements ConnectionFactory
+{
+    private static Logger log = Logger.getLogger(DefaultConnectionFactory.class);
+
+    public Connection create(String host, int port) throws IOException
+    {
+        if (host == null)
+        {
+            String msg = "host can't be null";
+            throw new IllegalArgumentException(msg);
+        }
+
+        Connection conn = new DefaultConnection(host, port);
+        conn.open();
+        return conn;
+    }
+}
diff --git a/aether2/hercules/src/java/aether/server/core/DefaultConnectionProvider.java b/aether2/hercules/src/java/aether/server/core/DefaultConnectionProvider.java
deleted file mode 100644
index 30c4e4d..0000000
--- a/aether2/hercules/src/java/aether/server/core/DefaultConnectionProvider.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package aether.server.core;
-
-import net.concedere.dundee.DefaultComponent;
-import net.concedere.dundee.ComponentException;
-import net.concedere.dundee.framework.Disposable;
-import net.concedere.dundee.framework.Startable;
-import net.concedere.dundee.framework.Initializable;
-import aether.net.Connection;
-
-import java.beans.beancontext.BeanContextServiceProvider;
-import java.beans.beancontext.BeanContextServices;
-import java.io.IOException;
-import java.util.Iterator;
-
-/**
- * Provides the default connection to other components in the Aether container.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class DefaultConnectionProvider extends DefaultComponent
-		implements Initializable, Startable, Disposable,
-		BeanContextServiceProvider
-{
-    private Connection connection;
-    private BeanContextServiceProvider spi;
-
-	public void initialize() throws ComponentException
-	{
-        try
-		{
-			connection.open();
-		}
-		catch (IOException ioe)
-		{
-			String msg = "couldn't open default connection";
-			throw new ComponentException(msg, ioe);
-		}
-	}
-
-	public void dispose() throws ComponentException
-	{
-		try
-		{
-        	connection.close();
-		}
-		catch (IOException ioe)
-		{
-			String msg = "coouldn't close default connection";
-			throw new ComponentException(msg, ioe);
-		}
-	}
-
-	public void start() throws ComponentException
-	{
-        if (! getContainer().addService(Connection.class, this))
-		{
-			String msg = "couldn't register to provide default connection";
-			throw new ComponentException(msg);
-		}
-	}
-
-	public void stop() throws ComponentException
-	{
-		getContainer().revokeService(Connection.class, this, false);
-	}
-
-	public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
-											   Class serviceClass)
-	{
-		return null;
-	}
-
-	public Object getService(BeanContextServices bcs, Object requestor,
-							 Class serviceClass, Object serviceSelector)
-	{
-		return connection;
-	}
-
-	public void releaseService(BeanContextServices bcs, Object requestor,
-							   Object service)
-	{
-		; // do nothing
-	}
-
-	/**
-	 * Get the default connection.
-	 *
-	 * @return default connection
-	 */
-	public Connection getDefaultConnection()
-	{
-		return connection;
-	}
-
-	/**
-	 * Set the default connection.
-	 *
-	 * @param conn default connection
-	 */
-	public void setDefaultConnection(Connection conn)
-	{
-		this.connection = conn;
-	}
-
-}
diff --git a/aether2/hercules/src/java/aether/server/core/LinkProvider.java b/aether2/hercules/src/java/aether/server/core/LinkProvider.java
deleted file mode 100644
index 8ed8e59..0000000
--- a/aether2/hercules/src/java/aether/server/core/LinkProvider.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package aether.server.core;
-
-import aether.net.Link;
-import aether.net.DefaultLink;
-import aether.net.Connection;
-
-import java.beans.beancontext.BeanContextServices;
-import java.util.Iterator;
-import java.io.IOException;
-
-import org.apache.log4j.Logger;
-import net.concedere.dundee.AbstractProvider;
-
-/**
- * Provides container-managed links to components.
- *
- * TODO: add a listener to Links provided that prevent components from closing
- * them
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class LinkProvider extends AbstractProvider
-{
-	private static final Logger log = Logger.getLogger(LinkProvider.class);
-
-	/**
-	 * <code>serviceSelector</code> must be an object of type
-	 * LinkProvider.Request.
-	 */
-	public Object getService(BeanContextServices bcs, Object requestor,
-							 Class serviceClass, Object serviceSelector)
-	{
-		try
-		{
-			Request params =
-					(Request) serviceSelector;
-			aether.net.Connection conn = params.getConnection();
-			String dest = params.getDestination();
-
-			Link link = new DefaultLink(conn, dest, false);
-			link.connect();
-			return link;
-		}
-		catch (IOException ioe)
-		{
-			log.warn("couldn't open link", ioe);
-			return null;
-		}
-	}
-
-	public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
-											   Class serviceClass)
-	{
-		return null;
-	}
-
-	public void releaseService(BeanContextServices bcs, Object requestor,
-							   Object service)
-	{
-		if ((service != null) && (service instanceof Link))
-		{
-			try
-			{
-				((Link) service).close();
-			}
-			catch (IOException ioe)
-			{
-				log.warn("couldn't close link", ioe);
-			}
-
-		}
-	}
-
-	/**
-	 * Request class that should be passed to this provider.
-	 */
-	public static class Request
-	{
-		private Connection connection;
-		private String dest;
-
-		public Request(Connection conn, String dest)
-		{
-			if ((conn == null) || (dest == null))
-			{
-				String msg = "no parameter can be null";
-				throw new IllegalArgumentException(msg);
-			}
-
-			this.connection = conn;
-			this.dest = dest;
-		}
-
-		public Connection getConnection() { return connection; }
-		public void setConnection(Connection conn) { this.connection = conn; }
-		public String getDestination() { return dest; }
-		public void setDestination(String dest) { this.dest = dest; }
-	}
-}
diff --git a/aether2/hercules/src/java/aether/server/core/MonitorProvider.java b/aether2/hercules/src/java/aether/server/core/MonitorProvider.java
deleted file mode 100644
index 1eddb62..0000000
--- a/aether2/hercules/src/java/aether/server/core/MonitorProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package aether.server.core;
-
-import aether.net.Connection;
-import aether.net.DefaultMonitor;
-import aether.net.Monitor;
-
-import java.util.Iterator;
-import java.beans.beancontext.BeanContextServices;
-import java.io.IOException;
-
-import org.apache.log4j.Logger;
-import net.concedere.dundee.AbstractProvider;
-
-/**
- * Provides container-owned Monitor to components within the container.
- *
- * TODO: add a listener to returned monitors that prevents components from
- * closing it
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class MonitorProvider extends AbstractProvider
-{
-
-	private static final Logger log = Logger.getLogger(MonitorProvider.class);
-
-	public void releaseService(BeanContextServices bcs, Object requestor,
-							   Object service)
-	{
-		if ((service != null) && (service instanceof Monitor))
-		{
-			try
-			{
-				((Monitor) service).close();
-			}
-			catch (IOException ioe)
-			{
-				log.warn("failed to close returned monitor", ioe);
-			}
-		}
-	}
-
-	/**
-	 * Construct a new Monitor. <code>serviceSelector</code> must be a valid
-	 * Connection. Once the Monitor is retrieved, users must contextualize it
-	 * by assigning it a valid EventHandler.
-	 */
-	public Object getService(BeanContextServices bcs, Object requestor,
-							 Class serviceClass, Object serviceSelector)
-	{
-		// if somebody fails to get a connection, give them back nothing
-		if (serviceSelector == null) return null;
-
-		try
-		{
-			Connection connection = (Connection) serviceSelector;
-			Monitor monitor = new DefaultMonitor(connection, false);
-			monitor.open();
-			return monitor;
-		}
-		catch (IOException ioe)
-		{
-			log.warn("couldn't open new monitor", ioe);
-			return null;
-		}
-	}
-
-	public Iterator getCurrentServiceSelectors(BeanContextServices bcs,
-											   Class serviceClass)
-	{
-		return null;
-	}
-}
diff --git a/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java b/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
index d94e8a0..79f8774 100644
--- a/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
+++ b/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
@@ -158,7 +158,7 @@ public class DefaultSwitchBoard extends DefaultComponent
 		synchronized (this) { consumer.addSubscription(sub); }

 		// now put this subscription in the map, corresponding to the
-		// responder's guid
+		// responder's uid
 		subMap.put(r.getGuid(), sub);

 		// put the responder in the destination map, corresponding to its
diff --git a/aether2/hercules/src/java/memento/world/model/AbstractWorldObject.java b/aether2/hercules/src/java/memento/world/model/AbstractWorldObject.java
deleted file mode 100644
index 3e2f3f4..0000000
--- a/aether2/hercules/src/java/memento/world/model/AbstractWorldObject.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package memento.world.model;
-
-import java.beans.PropertyChangeSupport;
-import java.beans.PropertyChangeListener;
-import java.io.Serializable;
-
-/**
- * Partial implementation of the WorldObject interface.
- *
- * TODO: think a lot more about the object destruction case
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class AbstractWorldObject implements WorldObject, Serializable
-{
-	/**
-	 * GUID of this object.
-	 */
-	protected String guid;
-
-	/**
-	 * Size of the object.
-	 */
-	protected Dimension size;
-
-	/**
-	 * WorldModel that created this object.
-	 */
-	protected WorldModel worldModel;
-
-	/**
-	 * EventListenerList used to manage event listeners.
-	 */
-	protected PropertyChangeSupport pcSupport = new PropertyChangeSupport(this);
-
-	public String getGuid()
-	{
-		return guid;
-	}
-
-	public void setGuid(String guid)
-	{
-		this.guid = guid;
-	}
-
-	public Dimension getSize()
-	{
-		return size;
-	}
-
-	public void setSize(Dimension dim)
-	{
-		Dimension oldSize = dim;
-		this.size = dim;
-
-		pcSupport.firePropertyChange(SizeProperty, oldSize, size);
-	}
-
-	public WorldModel getWorldModel()
-	{
-		return worldModel;
-	}
-
-	public void setWorldModel(WorldModel model)
-	{
-		WorldModel oldModel = this.worldModel;
-		this.worldModel = model;
-
-		pcSupport.firePropertyChange(WorldModelProperty, oldModel, model);
-	}
-
-	public void destroy()
-	{
-		; // do nothing
-	}
-
-	public void addPropertyChangeListener(PropertyChangeListener pcl)
-	{
-		pcSupport.addPropertyChangeListener(pcl);
-	}
-
-	public void addPropertyChangeListener(String name,
-										  PropertyChangeListener pcl)
-	{
-		pcSupport.addPropertyChangeListener(name, pcl);
-	}
-
-	public void removePropertyChangeListener(PropertyChangeListener pcl)
-	{
-		pcSupport.removePropertyChangeListener(pcl);
-	}
-
-	public void removePropertyChangeListener(String name,
-											 PropertyChangeListener pcl)
-	{
-		pcSupport.removePropertyChangeListener(name, pcl);
-	}
-
-}
diff --git a/aether2/hercules/src/java/memento/world/model/Avatar.java b/aether2/hercules/src/java/memento/world/model/Avatar.java
new file mode 100644
index 0000000..c744eb8
--- /dev/null
+++ b/aether2/hercules/src/java/memento/world/model/Avatar.java
@@ -0,0 +1,22 @@
+package memento.world.model;
+
+/**
+ * Basic implementation of the Avatar interface.
+ *
+ * @author Buko O. (buko@concedere.net)
+ * @version 0.1
+ **/
+public class Avatar extends LocatableWorldObject
+{
+	private String guid;
+
+	public String getClientGuid()
+	{
+		return guid;
+	}
+
+	public void setClientGuid(String guid)
+	{
+		this.guid = guid;
+	}
+}
diff --git a/aether2/hercules/src/java/memento/world/model/DefaultAvatar.java b/aether2/hercules/src/java/memento/world/model/DefaultAvatar.java
deleted file mode 100644
index 4501a80..0000000
--- a/aether2/hercules/src/java/memento/world/model/DefaultAvatar.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package memento.world.model;
-
-/**
- * Basic implementation of the Avatar interface.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class DefaultAvatar extends DefaultLocatableWorldObject
-		implements Avatar
-{
-	private String guid;
-
-	public String getClientGuid()
-	{
-		return guid;
-	}
-
-	public void setClientGuid(String guid)
-	{
-		this.guid = guid;
-	}
-}
diff --git a/aether2/hercules/src/java/memento/world/model/DefaultLocatableWorldObject.java b/aether2/hercules/src/java/memento/world/model/DefaultLocatableWorldObject.java
deleted file mode 100644
index 30df9f4..0000000
--- a/aether2/hercules/src/java/memento/world/model/DefaultLocatableWorldObject.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package memento.world.model;
-
-/**
- * Basic implementation of LocatableWorldObject.
- *
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class DefaultLocatableWorldObject extends AbstractWorldObject
-		implements LocatableWorldObject
-{
-	/**
-	 * Current location.
-	 */
-	protected Sector sector;
-
-	/**
-	 * Position of the object in the world.
-	 */
-	protected Position position;
-
-    /**
-     * name of the object in the world
-     */
-    protected String name;
-
-    /**
-     * 3DS model file that represents the id
-     */
-    protected String model;
-
-
-	public Sector getLocation()
-	{
-		return sector;
-	}
-
-	public void setLocation(Sector sector)
-	{
-		Sector oldValue = this.sector;
-		this.sector = sector;
-
-		pcSupport.firePropertyChange(LocationProperty, oldValue, sector);
-	}
-
-	public Position getPosition()
-	{
-		return position;
-	}
-
-	public void setPosition(Position pos)
-	{
-		Position oldPos = this.position;
-		this.position = pos;
-
-		pcSupport.firePropertyChange(PositionProperty, oldPos, pos);
-	}
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName(String name)
-    {
-        this.name = name;
-    }
-
-    public String getModel()
-    {
-        return model;
-    }
-
-    public void setModel(String model)
-    {
-        this.model = model;
-    }
-}
diff --git a/aether2/hercules/src/java/memento/world/model/DefaultPortal.java b/aether2/hercules/src/java/memento/world/model/DefaultPortal.java
deleted file mode 100644
index 4705604..0000000
--- a/aether2/hercules/src/java/memento/world/model/DefaultPortal.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package memento.world.model;
-
-/**
- * Basic implementation of the Portal interface.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class DefaultPortal extends DefaultLocatableWorldObject implements Portal
-{
-	/**
-	 * Destination of the portal.
-	 */
-	protected Sector dest;
-
-	/**
-	 * Whether the portal is open.
-	 */
-	protected boolean open;
-
-	public Sector getDestination()
-	{
-		return dest;
-	}
-
-	public boolean isOpen()
-	{
-		return open;
-	}
-
-	public void setDestination(Sector sector)
-	{
-		this.dest = sector;
-	}
-
-	public void setOpen(boolean open)
-	{
-		boolean oldVal = this.open;
-		this.open = open;
-
-        pcSupport.firePropertyChange(OpenProperty, oldVal, open);
-	}
-}
diff --git a/aether2/hercules/src/java/memento/world/model/DefaultSector.java b/aether2/hercules/src/java/memento/world/model/DefaultSector.java
deleted file mode 100644
index 574ea1c..0000000
--- a/aether2/hercules/src/java/memento/world/model/DefaultSector.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package memento.world.model;
-
-import javax.swing.event.EventListenerList;
-import java.util.Enumeration;
-import java.util.Set;
-import java.util.Collections;
-import java.util.HashSet;
-
-/**
- * Basic implementation of the Sector interface.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class DefaultSector extends AbstractWorldObject implements Sector
-{
-	/**
-	 * Set of contents in the sector.
-	 */
-	protected Set contents = Collections.synchronizedSet(new HashSet());
-
-	/**
-	 * Set of portals in the sector.
-	 */
-	protected Set portals = Collections.synchronizedSet(new HashSet());
-
-	/**
-	 * ListenerList used to manage listeners.
-	 */
-	protected EventListenerList listenerList = new EventListenerList();
-
-	public void add(LocatableWorldObject lwo)
-	{
-        if (lwo == null)
-		{
-			String msg = "lwo can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        if (!contents.contains(lwo))
-		{
-			contents.add(lwo);
-			lwo.setLocation(this);
-			fireEntered(lwo);
-		}
-	}
-
-
-	public void add(Portal p)
-	{
-		if (p == null)
-		{
-			String msg = "p can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        if (!portals.contains(p))
-		{
-			portals.add(p);
-			p.setLocation(this);
-		}
-	}
-
-
-	public void addSectorListener(SectorListener sl)
-	{
-		listenerList.add(SectorListener.class, sl);
-	}
-
-	public Enumeration contents()
-	{
-		return Collections.enumeration(contents);
-	}
-
-	public Enumeration portals()
-	{
-		return Collections.enumeration(portals);
-	}
-
-	public void remove(LocatableWorldObject lwo)
-	{
-		if (lwo == null)
-		{
-			String msg = "lwo can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        if (contents.contains(lwo))
-		{
-			contents.remove(lwo);
-			lwo.setLocation(null);
-			fireExited(lwo);
-		}
-	}
-
-	public void remove(Portal p)
-	{
-		if (p == null)
-		{
-			String msg = "p can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-		if (portals.contains(p))
-		{
-			portals.remove(p);
-			p.setLocation(null);
-		}
-	}
-
-	public void removeSectorListener(SectorListener sl)
-	{
-		listenerList.remove(SectorListener.class, sl);
-	}
-
-	/**
-	 * Fire an event indicating an object has entered the sector.
-	 *
-	 * @param lwo object that entered the sector
-	 */
-	protected void fireEntered(LocatableWorldObject lwo)
-	{
-        Object[] listeners = listenerList.getListenerList();
-
-		SectorEvent se = new SectorEvent(this, lwo);
-
-        for (int i = listeners.length - 2; i >= 0; i -= 2)
-		{
-            if (listeners[i] == SectorListener.class)
-			{
-                ((SectorListener) listeners[i + 1]).entered(se);
-			}
-		}
-	}
-
-	/**
-	 * Fire an event indicating an object has left the sector.
-	 *
-	 * @param wo object that left the sector
-	 */
-	public void fireExited(WorldObject wo)
-	{
-        Object[] listeners = listenerList.getListenerList();
-		SectorEvent se = new SectorEvent(this, wo);
-
-		for (int i = listeners.length - 2; i >= 0; i -= 2)
-		{
-			if (listeners[i] == SectorListener.class)
-			{
-				((SectorListener) listeners[i]).exited(se);
-			}
-		}
-	}
-}
diff --git a/aether2/hercules/src/java/memento/world/model/DefaultWorldModel.java b/aether2/hercules/src/java/memento/world/model/DefaultWorldModel.java
deleted file mode 100644
index feb792a..0000000
--- a/aether2/hercules/src/java/memento/world/model/DefaultWorldModel.java
+++ /dev/null
@@ -1,283 +0,0 @@
-package memento.world.model;
-
-import net.concedere.dundee.DefaultComponent;
-import net.concedere.dundee.ComponentException;
-import net.concedere.dundee.framework.Initializable;
-
-import javax.swing.event.EventListenerList;
-import java.util.*;
-import java.beans.PropertyChangeSupport;
-import java.beans.PropertyChangeListener;
-
-import aether.util.GuidFactory;
-import aether.server.domain.Advertisement;
-import aether.server.framework.Advertising;
-
-/**
- * Default implementation of the WorldModel interface.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class DefaultWorldModel extends DefaultComponent implements WorldModel
-{
-	/**
-	 * GUID that identifies this world model
-	 */
-	protected String guid;
-
-	/**
-	 * List of current listeners on the model.
-	 */
-	protected EventListenerList listenerList = new EventListenerList();
-
-	/**
-	 * Map of all the objects in the world to their GUID.
-	 */
-	protected Map worldObjectMap = Collections.synchronizedMap(new HashMap());
-
-	/**
-	 * Advertisement to be generated by this world.
-	 */
-	protected Advertisement advertisement;
-
-	/**
-	 * EventListenerList used to manage event listeners.
-	 */
-	protected PropertyChangeSupport pcSupport = new PropertyChangeSupport(this);
-
-	public String getGuid()
-	{
-		return guid;
-	}
-
-	public void setGuid(String guid)
-	{
-		this.guid = guid;
-	}
-
-	public Advertisement getAdvertisement()
-	{
-		return advertisement;
-	}
-
-	public void setAdvertisement(Advertisement adv)
-	{
-		Advertisement oldAdv = this.advertisement;
-		this.advertisement = adv;
-
-		pcSupport.firePropertyChange(
-				Advertising.AdvertisementProperty, oldAdv, adv);
-	}
-
-	public WorldObject create(Class c, Map params)
-	{
-		if ((c == null) || (params == null))
-		{
-			String msg = "c and params can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        WorldObject created = null;
-
-        if (c == Sector.class)
-		{
-			created = new DefaultSector();
-		} else if (c == Portal.class)
-		{
-			created = new DefaultPortal();
-		} else if (c == Avatar.class)
-		{
-            String clientGuid = (String) params.get("clientGuid");
-			Avatar ava = new DefaultAvatar();
-			ava.setClientGuid(clientGuid);
-
-			created = ava;
-		}
-		else if (c == LocatableWorldObject.class)
-		{
-            created = new DefaultLocatableWorldObject();
-		} else
-		{
-			String msg = "model can't created objects of class " + c;
-			throw new IllegalArgumentException(msg);
-		}
-
-
-		// create a guid and set the world model
-		created.setGuid(GuidFactory.createId());
-		created.setWorldModel(this);
-        worldObjectMap.put(created.getGuid(), created);
-
-		fireObjectCreated(created);
-
-        return created;
-	}
-
-	public void enter(WorldObject wo)
-	{
-    	fireObjectEntered(wo);
-	}
-
-	public void exit(WorldObject wo)
-	{
-		fireObjectExited(wo);
-	}
-
-	public WorldObject retrieve(String guid)
-	{
-		if (guid == null)
-		{
-			String msg = "guid can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        if (!worldObjectMap.containsKey(guid))
-		{
-			String msg = "no world object with guid exists";
-			throw new NoSuchElementException(msg);
-		}
-
-		return (WorldObject) worldObjectMap.get(guid);
-	}
-
-	public void destroy(WorldObject wo)
-	{
-        if (wo == null)
-		{
-			String msg = "wo can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        if (wo.getWorldModel() != this)
-		{
-			String msg = "WorldModel doesn't own this object";
-			throw new IllegalArgumentException(msg);
-		}
-
-        worldObjectMap.remove(wo.getGuid());
-        wo.destroy();
-        wo.setWorldModel(null);
-        fireObjectDestroyed(wo);
-	}
-
-	public void addWorldModelListener(WorldModelListener wml)
-	{
-        listenerList.add(WorldModelListener.class, wml);
-	}
-
-	public void removeWorldModelListener(WorldModelListener wml)
-	{
-		listenerList.remove(WorldModelListener.class, wml);
-	}
-
-	/**
-	 * Fire the event indicating a WorldObject has just been created.
-	 *
-	 * @param wo WorldObject that was just created
-	 */
-	protected void fireObjectCreated(WorldObject wo)
-	{
-        if (wo == null)
-		{
-			String msg = "wo can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        WorldModelEvent wme = new WorldModelEvent(this, wo);
-        Object[] listeners = listenerList.getListenerList();
-
-        for (int i = listeners.length - 2; i >= 0; i -= 2)
-		{
-            if (listeners[i] == WorldModelListener.class)
-			{
-                ((WorldModelListener) listeners[i + 1]).objectCreated(wme);
-			}
-		}
-	}
-
-	/**
-	 * Fire an event indicating that an object has been destroyed.
-	 *
-	 * @param wo world object that was destroyed
-	 */
-    protected void fireObjectDestroyed(WorldObject wo)
-	{
-        if (wo == null)
-		{
-			String msg = "wo can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        WorldModelEvent wme = new WorldModelEvent(this, wo);
-		Object[] listeners = listenerList.getListenerList();
-		for (int i = listeners.length - 2; i >= 0; i -= 2)
-		{
-			((WorldModelListener) listeners[i]).objectDestroyed(wme);
-		}
-	}
-
-	/**
-	 * Fire an event indicating an object has entered the world.
-	 *
-	 * @param wo object that entered the world
-	 */
-	protected void fireObjectEntered(WorldObject wo)
-	{
-        if (wo == null)
-		{
-			String msg = "wo can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        WorldModelEvent wme = new WorldModelEvent(this, wo);
-		Object[] listeners = listenerList.getListenerList();
-		for (int i = listeners.length - 2; i >= 0; i -= 2)
-		{
-			((WorldModelListener) listeners[i]).objectEntered(wme);
-		}
-	}
-
-	/**
-	 * Fire an event indicating an object has exited the world.
-	 *
-	 * @param wo object that exited the world
-	 */
-	protected void fireObjectExited(WorldObject wo)
-	{
-        if (wo == null)
-		{
-			String msg = "wo can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-        WorldModelEvent wme = new WorldModelEvent(this, wo);
-		Object[] listeners = listenerList.getListenerList();
-		for (int i = listeners.length - 2; i >= 0; i -= 2)
-		{
-			((WorldModelListener) listeners[i]).objectExited(wme);
-		}
-	}
-
-	public void addPropertyChangeListener(PropertyChangeListener pcl)
-	{
-		pcSupport.addPropertyChangeListener(pcl);
-	}
-
-	public void addPropertyChangeListener(String name,
-										  PropertyChangeListener pcl)
-	{
-		pcSupport.addPropertyChangeListener(name, pcl);
-	}
-
-	public void removePropertyChangeListener(PropertyChangeListener pcl)
-	{
-		pcSupport.removePropertyChangeListener(pcl);
-	}
-
-	public void removePropertyChangeListener(String name,
-											 PropertyChangeListener pcl)
-	{
-		pcSupport.removePropertyChangeListener(name, pcl);
-	}
-}
diff --git a/aether2/hercules/src/java/memento/world/model/LocatableWorldObject.java b/aether2/hercules/src/java/memento/world/model/LocatableWorldObject.java
index de55eb0..dfd199f 100644
--- a/aether2/hercules/src/java/memento/world/model/LocatableWorldObject.java
+++ b/aether2/hercules/src/java/memento/world/model/LocatableWorldObject.java
@@ -6,51 +6,71 @@ package memento.world.model;
  * @author Buko O. (buko@concedere.net)
  * @version 0.1
  **/
-public interface LocatableWorldObject extends WorldObject
+public class LocatableWorldObject extends WorldObject
 {
-	/**
-	 * Name of bound property 'location'.
-	 */
-	public static final String LocationProperty = "location";
+    /**
+     * Sector that's the location of the world object.
+     */
+	protected Sector location;

-	/**
-	 * Name of the bound 'position' property.
-	 */
-	public static final String PositionProperty = "position";
+    /**
+     * Position of the world object.
+     */
+    protected Position position;
+
+    /**
+     * Model file associated with the LWO.
+     */
+    protected String model;

 	/**
 	 * Get the current location of the object.
 	 *
 	 * @return current location of the object
 	 */
-	public Sector getLocation();
+	public Sector getLocation()
+    {
+        return location;
+    }

 	/**
 	 * Set the current location of the object.
 	 *
 	 * @param sector current location of the object
 	 */
-	public void setLocation(Sector sector);
+	public void setLocation(Sector sector)
+    {
+        this.location = sector;
+    }

 	/**
 	 * Get the position of the object in the world.
 	 *
 	 * @return position of the object in the world
 	 */
-  	public Position getPosition();
+  	public Position getPosition()
+    {
+        return position;
+    }

 	/**
 	 * Set the position of the object in the world.
 	 *
 	 * @param pos position of the object in the world
 	 */
-	public void setPosition(Position pos);
-
-    public String getName();
+	public void setPosition(Position pos)
+    {
+        this.position = pos;
+    }

-    public void setName(String name);

-    public String getModel();
+    public String getModel()
+    {
+        return model;
+    }

-    public void setModel(String model);
+    public void setModel(String model)
+    {
+        this.model = model;
+    }
 }
diff --git a/aether2/hercules/src/java/memento/world/model/Portal.java b/aether2/hercules/src/java/memento/world/model/Portal.java
new file mode 100644
index 0000000..2f9a42a
--- /dev/null
+++ b/aether2/hercules/src/java/memento/world/model/Portal.java
@@ -0,0 +1,40 @@
+package memento.world.model;
+
+/**
+ * Basic implementation of the Portal interface.
+ *
+ * @author Buko O. (buko@concedere.net)
+ * @version 0.1
+ **/
+public class Portal extends LocatableWorldObject
+{
+	/**
+	 * Destination of the portal.
+	 */
+	protected Sector dest;
+
+	/**
+	 * Whether the portal is open.
+	 */
+	protected boolean open;
+
+	public Sector getDestination()
+	{
+		return dest;
+	}
+
+	public boolean isOpen()
+	{
+		return open;
+	}
+
+	public void setDestination(Sector sector)
+	{
+		this.dest = sector;
+	}
+
+	public void setOpen(boolean open)
+	{
+		this.open = open;
+	}
+}
diff --git a/aether2/hercules/src/java/memento/world/model/Sector.java b/aether2/hercules/src/java/memento/world/model/Sector.java
new file mode 100644
index 0000000..39c51fa
--- /dev/null
+++ b/aether2/hercules/src/java/memento/world/model/Sector.java
@@ -0,0 +1,108 @@
+package memento.world.model;
+
+import javax.swing.event.EventListenerList;
+import java.util.Enumeration;
+import java.util.Set;
+import java.util.Collections;
+import java.util.HashSet;
+
+/**
+ * Basic implementation of the Sector interface.
+ *
+ * @author Buko O. (buko@concedere.net)
+ * @version 0.1
+ **/
+public class Sector extends WorldObject
+{
+	/**
+	 * Set of contents in the sector.
+	 */
+	protected Set contents = Collections.synchronizedSet(new HashSet());
+
+	/**
+	 * Set of portals in the sector.
+	 */
+	protected Set portals = Collections.synchronizedSet(new HashSet());
+
+	/**
+	 * ListenerList used to manage listeners.
+	 */
+	protected EventListenerList listenerList = new EventListenerList();
+
+	public void add(LocatableWorldObject lwo)
+	{
+        if (lwo == null)
+		{
+			String msg = "lwo can't be null";
+			throw new IllegalArgumentException(msg);
+		}
+
+        if (!contents.contains(lwo))
+		{
+			contents.add(lwo);
+			lwo.setLocation(this);
+		}
+	}
+
+
+	public void add(Portal p)
+	{
+		if (p == null)
+		{
+			String msg = "p can't be null";
+			throw new IllegalArgumentException(msg);
+		}
+
+        if (!portals.contains(p))
+		{
+			portals.add(p);
+			p.setLocation(this);
+		}
+	}
+
+
+	public void addSectorListener(SectorListener sl)
+	{
+		listenerList.add(SectorListener.class, sl);
+	}
+
+	public Enumeration contents()
+	{
+		return Collections.enumeration(contents);
+	}
+
+	public Enumeration portals()
+	{
+		return Collections.enumeration(portals);
+	}
+
+	public void remove(LocatableWorldObject lwo)
+	{
+		if (lwo == null)
+		{
+			String msg = "lwo can't be null";
+			throw new IllegalArgumentException(msg);
+		}
+
+        if (contents.contains(lwo))
+		{
+			contents.remove(lwo);
+			lwo.setLocation(null);
+		}
+	}
+
+	public void remove(Portal p)
+	{
+		if (p == null)
+		{
+			String msg = "p can't be null";
+			throw new IllegalArgumentException(msg);
+		}
+
+		if (portals.contains(p))
+		{
+			portals.remove(p);
+			p.setLocation(null);
+		}
+	}
+}
diff --git a/aether2/hercules/src/java/memento/world/model/SectorEvent.java b/aether2/hercules/src/java/memento/world/model/SectorEvent.java
deleted file mode 100644
index 3b7c7fa..0000000
--- a/aether2/hercules/src/java/memento/world/model/SectorEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package memento.world.model;
-
-import java.util.EventObject;
-
-/**
- * Describes changes in a Sector.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class SectorEvent extends EventObject
-{
-	private WorldObject cause;
-
-	/**
-	 * Construct a new SectorEvent.
-	 *
-	 * @param sector Sector that generated the event
-	 * @param cause  WorldObject that initiated the change
-	 */
-	public SectorEvent(Sector sector, WorldObject cause)
-	{
-		super(sector);
-		if (cause == null)
-		{
-			String msg = "no parameter can be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-		this.cause = cause;
-	}
-
-	/**
-	 * Get the WorldObject that initiated the event.
-	 *
-	 * @return world object that initiated the event
-	 */
-	public WorldObject getCause()
-	{
-		return cause;
-	}
-}
diff --git a/aether2/hercules/src/java/memento/world/model/SectorListener.java b/aether2/hercules/src/java/memento/world/model/SectorListener.java
deleted file mode 100644
index c041a8e..0000000
--- a/aether2/hercules/src/java/memento/world/model/SectorListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package memento.world.model;
-
-import java.util.EventListener;
-
-/**
- * Object capable of listening to events from a Sector.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public interface SectorListener extends EventListener
-{
-	/**
-	 * An object has entered a sector.
-	 *
-	 * @param se event describing the change
-	 */
-	public void entered(SectorEvent se);
-
-	/**
-	 * An object has left the sector.
-	 *
-	 * @param se event describing the change
-	 */
-	public void exited(SectorEvent se);
-}
diff --git a/aether2/hercules/src/java/memento/world/model/WorldModel.java b/aether2/hercules/src/java/memento/world/model/WorldModel.java
new file mode 100644
index 0000000..1b81da8
--- /dev/null
+++ b/aether2/hercules/src/java/memento/world/model/WorldModel.java
@@ -0,0 +1,90 @@
+package memento.world.model;
+
+import java.util.*;
+import java.beans.PropertyChangeSupport;
+
+import aether.server.domain.Advertisement;
+
+/**
+ * Default implementation of the WorldModel interface.
+ *
+ * @author Buko O. (buko@concedere.net)
+ * @version 0.1
+ **/
+public class WorldModel
+{
+	/**
+	 * GUID that identifies this world model
+	 */
+	protected String guid;
+
+	/**
+	 * Map of all the objects in the world to their GUID.
+	 */
+	protected Map worldObjectMap = Collections.synchronizedMap(new HashMap());
+
+	/**
+	 * Advertisement to be generated by this world.
+	 */
+	protected Advertisement advertisement;
+
+	/**
+	 * EventListenerList used to manage event listeners.
+	 */
+	protected PropertyChangeSupport pcSupport = new PropertyChangeSupport(this);
+
+	public String getUID()
+	{
+		return guid;
+	}
+
+	public void setUID(String guid)
+	{
+		this.guid = guid;
+	}
+
+	public Advertisement getAdvertisement()
+	{
+		return advertisement;
+	}
+
+	public void setAdvertisement(Advertisement adv)
+	{
+		this.advertisement = adv;
+	}
+
+	public WorldObject retrieve(String guid)
+	{
+		if (guid == null)
+		{
+			String msg = "uid can't be null";
+			throw new IllegalArgumentException(msg);
+		}
+
+        if (!worldObjectMap.containsKey(guid))
+		{
+			String msg = "no world object with uid exists";
+			throw new NoSuchElementException(msg);
+		}
+
+		return (WorldObject) worldObjectMap.get(guid);
+	}
+
+	public void remove(WorldObject wo)
+	{
+        if (wo == null)
+		{
+			String msg = "wo can't be null";
+			throw new IllegalArgumentException(msg);
+		}
+
+        if (wo.getWorldModel() != this)
+		{
+			String msg = "WorldModel doesn't own this object";
+			throw new IllegalArgumentException(msg);
+		}
+
+        worldObjectMap.remove(wo.getUID());
+        wo.setWorldModel(null);
+	}
+}
diff --git a/aether2/hercules/src/java/memento/world/model/WorldModelEvent.java b/aether2/hercules/src/java/memento/world/model/WorldModelEvent.java
deleted file mode 100644
index 50a1cd5..0000000
--- a/aether2/hercules/src/java/memento/world/model/WorldModelEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package memento.world.model;
-
-import java.util.EventObject;
-
-/**
- * Describes a change to a world model.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public class WorldModelEvent extends EventObject
-{
-    private WorldObject cause;
-
-	/**
-	 * Construct a new WorldModelEvent.
-	 *
-	 * @param model WorldModel that generated this event
-	 * @param cause WorldObject that caused this event
-	 */
-	public WorldModelEvent(WorldModel model, WorldObject cause)
-	{
-		super(model);
-
-		if (cause == null)
-		{
-			String msg = "cause can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-		this.cause = cause;
-	}
-
-	/**
-	 * Get the cause of the event.
-	 *
-	 * @return WorldObject that's the primary concern of the event
-	 */
-	public WorldObject getCause()
-	{
-		return cause;
-	}
-}
diff --git a/aether2/hercules/src/java/memento/world/model/WorldModelListener.java b/aether2/hercules/src/java/memento/world/model/WorldModelListener.java
deleted file mode 100644
index eafc829..0000000
--- a/aether2/hercules/src/java/memento/world/model/WorldModelListener.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package memento.world.model;
-
-import java.util.EventListener;
-
-/**
- * Listener that can receive events about a certain world model.
- *
- * @author Buko O. (buko@concedere.net)
- * @version 0.1
- **/
-public interface WorldModelListener extends EventListener
-{
-	/**
-	 * Indicates that a WorldObject has just been created inside the model.
-	 *
-	 * @param wme event describing the creation
-	 */
-    public void objectCreated(WorldModelEvent wme);
-
-	/**
-	 * Indicates that a WorldObject has just been destroyed in the model.
-	 *
-	 * @param wme event describing the destruction
-	 */
-	public void objectDestroyed(WorldModelEvent wme);
-
-	/**
-	 * Object entered the world model.
-	 *
-	 * @param wme event describing the entry
-	 */
-	public void objectEntered(WorldModelEvent wme);
-
-	/**
-	 * Object exited the world.
-	 *
-	 * @param wme event describing the exit
-	 */
-	public void objectExited(WorldModelEvent wme);
-
-}
diff --git a/aether2/hercules/src/java/memento/world/model/WorldObject.java b/aether2/hercules/src/java/memento/world/model/WorldObject.java
new file mode 100644
index 0000000..eda74a2
--- /dev/null
+++ b/aether2/hercules/src/java/memento/world/model/WorldObject.java
@@ -0,0 +1,87 @@
+package memento.world.model;
+
+import java.io.Serializable;
+
+/**
+ * Partial implementation of the WorldObject interface.
+ *
+ * @author Buko O. (buko@concedere.net)
+ * @version 0.1
+ **/
+public class WorldObject implements Serializable
+{
+	/**
+	 * GUID of this object.
+	 */
+	protected String uid;
+
+	/**
+	 * Size of the object.
+	 */
+	protected Dimension size;
+
+	/**
+	 * WorldModel that created this object.
+	 */
+	protected WorldModel worldModel;
+
+    /**
+     * URL associated with the world object.
+     */
+    protected String url;
+
+    /**
+     * Caption associated with the world object.
+     */
+    protected String caption;
+
+	public String getUID()
+	{
+		return uid;
+	}
+
+	public void setUID(String uid)
+	{
+		this.uid = uid;
+	}
+
+	public Dimension getSize()
+	{
+		return size;
+	}
+
+	public void setSize(Dimension dim)
+	{
+		this.size = dim;
+	}
+
+	public WorldModel getWorldModel()
+	{
+		return worldModel;
+	}
+
+	public void setWorldModel(WorldModel model)
+	{
+		this.worldModel = model;
+    }
+
+    public String getURL()
+    {
+        return url;
+    }
+
+    public void setURL(String url)
+    {
+        this.url = url;
+    }
+
+    public String getCaption()
+    {
+        return caption;
+    }
+
+    public void setCaption(String caption)
+    {
+        this.caption = caption;
+    }
+}
diff --git a/aether2/hercules/src/test/aether/server/ConnectionFactoryTest.java b/aether2/hercules/src/test/aether/server/ConnectionFactoryTest.java
index 3b92705..ae9b7bd 100644
--- a/aether2/hercules/src/test/aether/server/ConnectionFactoryTest.java
+++ b/aether2/hercules/src/test/aether/server/ConnectionFactoryTest.java
@@ -1,7 +1,7 @@
 package aether.server;

 import aether.AetherTestCase;
-import aether.server.ConnectionFactory;
+import aether.server.DefaultConnectionFactory;
 import aether.net.Connection;
 import aether.net.Publisher;
 import aether.net.DefaultConnection;
@@ -21,7 +21,7 @@ import net.concedere.dundee.Container;
 public class ConnectionFactoryTest extends AetherTestCase
 {
     private Container container;
-	private ConnectionFactory connFactory = new ConnectionFactory();
+	private DefaultConnectionFactory connFactory = new DefaultConnectionFactory();

 	public void setUp() throws Exception
 	{
@@ -68,8 +68,8 @@ public class ConnectionFactoryTest extends AetherTestCase
 		container.add(bean);

 		// create the params
-		ConnectionFactory.Request params = new
-				ConnectionFactory.Request(getElvinHost(), getElvinPort());
+		DefaultConnectionFactory.Request params = new
+				DefaultConnectionFactory.Request(getElvinHost(), getElvinPort());

         Connection conn = (Connection)
 				container.getService(bean, bean, Connection.class,
diff --git a/aether2/hercules/src/test/aether/server/core/LinkProviderTest.java b/aether2/hercules/src/test/aether/server/core/LinkProviderTest.java
index 97af53d..d0adfdb 100644
--- a/aether2/hercules/src/test/aether/server/core/LinkProviderTest.java
+++ b/aether2/hercules/src/test/aether/server/core/LinkProviderTest.java
@@ -1,7 +1,6 @@
 package aether.server.core;

 import aether.AetherTestCase;
-import aether.server.core.LinkProvider;
 import aether.event.Request;
 import aether.event.Response;
 import aether.event.EventHandler;
diff --git a/aether2/hercules/src/test/aether/server/core/MonitorProviderTest.java b/aether2/hercules/src/test/aether/server/core/MonitorProviderTest.java
index 16466f8..b29a741 100644
--- a/aether2/hercules/src/test/aether/server/core/MonitorProviderTest.java
+++ b/aether2/hercules/src/test/aether/server/core/MonitorProviderTest.java
@@ -1,7 +1,6 @@
 package aether.server.core;

 import aether.AetherTestCase;
-import aether.server.core.MonitorProvider;
 import aether.server.AetherContainer;
 import aether.event.*;
 import aether.net.Connection;
diff --git a/aether2/hercules/src/test/aether/server/domain/DomainAgentTest.java b/aether2/hercules/src/test/aether/server/domain/DomainAgentTest.java
index 90b71c5..9dbfed9 100644
--- a/aether2/hercules/src/test/aether/server/domain/DomainAgentTest.java
+++ b/aether2/hercules/src/test/aether/server/domain/DomainAgentTest.java
@@ -7,11 +7,10 @@ import aether.net.Monitor;
 import aether.server.AetherContainer;
 import aether.server.core.DefaultConnectionProvider;
 import aether.server.core.PublisherProvider;
-import aether.server.core.MonitorProvider;
 import aether.server.core.ThreadPoolProvider;
 import memento.world.manager.WorldManager;
 import memento.world.manager.DefaultWorldManager;
-import memento.world.model.DefaultWorldModel;
+import memento.world.model.WorldModel;
 import memento.world.model.WorldAdvertisement;

 /**
@@ -52,7 +51,7 @@ public class DomainAgentTest extends AetherTestCase
 		WorldManager worldMan = new DefaultWorldManager();
 		container.add(worldMan);

-		DefaultWorldModel model = new DefaultWorldModel();
+		WorldModel model = new WorldModel();
 		Advertisement adv = new Advertisement();
 		adv.set(WorldAdvertisement.RequestTopic, "aether://mcbain/830?request");
 		adv.set(WorldAdvertisement.ModelTopic, "aether://mcbain/830/objcts/323524352354");
diff --git a/aether2/hercules/src/test/aether/server/domain/RemoteDomainAgentTest.java b/aether2/hercules/src/test/aether/server/domain/RemoteDomainAgentTest.java
index 2a2b8bd..8945ad3 100644
--- a/aether2/hercules/src/test/aether/server/domain/RemoteDomainAgentTest.java
+++ b/aether2/hercules/src/test/aether/server/domain/RemoteDomainAgentTest.java
@@ -7,7 +7,6 @@ import aether.net.Monitor;
 import aether.server.AetherContainer;
 import aether.server.core.DefaultConnectionProvider;
 import aether.server.core.PublisherProvider;
-import aether.server.core.MonitorProvider;
 import aether.server.core.ThreadPoolProvider;

 /**
diff --git a/aether2/hercules/src/test/aether/server/responder/DefaultSwitchBoardTest.java b/aether2/hercules/src/test/aether/server/responder/DefaultSwitchBoardTest.java
index 65f38c1..e0702cb 100644
--- a/aether2/hercules/src/test/aether/server/responder/DefaultSwitchBoardTest.java
+++ b/aether2/hercules/src/test/aether/server/responder/DefaultSwitchBoardTest.java
@@ -1,7 +1,7 @@
 package aether.server.responder;

 import aether.AetherTestCase;
-import aether.server.ConnectionFactory;
+import aether.server.DefaultConnectionFactory;
 import aether.event.Request;
 import aether.event.Response;
 import aether.net.Connection;
@@ -30,7 +30,7 @@ public class DefaultSwitchBoardTest extends AetherTestCase
 	{
 		Connection conn = new DefaultConnection(getElvinHost(), getElvinPort());
         DefaultContainer container =  new DefaultContainer();
-        ConnectionFactory cf = new ConnectionFactory();
+        DefaultConnectionFactory cf = new DefaultConnectionFactory();
 		cf.setDefaultConnection(conn);
 		container.add(cf);

@@ -57,7 +57,7 @@ public class DefaultSwitchBoardTest extends AetherTestCase
 	public void testSwitchBoard() throws Exception
 	{
 		Connection conn = new DefaultConnection(getElvinHost(), getElvinPort());
-        ConnectionFactory cf = new ConnectionFactory();
+        DefaultConnectionFactory cf = new DefaultConnectionFactory();
 		cf.setDefaultConnection(conn);
 		Container container = new DefaultContainer();
 		container.add(cf);
diff --git a/aether2/hercules/src/test/memento/world/manager/WorldManagerTest.java b/aether2/hercules/src/test/memento/world/manager/WorldManagerTest.java
index d40507b..34688ef 100644
--- a/aether2/hercules/src/test/memento/world/manager/WorldManagerTest.java
+++ b/aether2/hercules/src/test/memento/world/manager/WorldManagerTest.java
@@ -8,10 +8,9 @@ import aether.server.AetherContainer;
 import aether.server.domain.Advertisement;
 import aether.server.core.DefaultConnectionProvider;
 import aether.server.core.PublisherProvider;
-import aether.server.core.MonitorProvider;
 import aether.server.core.ThreadPoolProvider;
 import memento.world.model.WorldModel;
-import memento.world.model.DefaultWorldModel;
+import memento.world.model.WorldModel;
 import memento.world.model.WorldAdvertisement;

 import java.util.Iterator;
@@ -44,7 +43,7 @@ public class WorldManagerTest extends AetherTestCase
         WorldManager worldMan = new DefaultWorldManager();
 		container.add(worldMan);

-        DefaultWorldModel model = new DefaultWorldModel();
+        WorldModel model = new WorldModel();
         Advertisement adv = new Advertisement();
 		adv.set(WorldAdvertisement.RequestTopic, "aether://mcbain/830?request");
 		adv.set(WorldAdvertisement.ModelTopic, "aether://mcbain/830");