*** empty log message ***

buko [2003-10-28 18:52:11]
*** empty log message ***
Filename
aether2/core/aether-core.ipr
aether2/core/aether-core.iws
aether2/core/doc/todo.txt
aether2/core/src/java/aether/event/Attribute.java
aether2/core/src/java/aether/event/BlockingEventQueue.java
aether2/core/src/java/aether/event/Event.java
aether2/core/src/java/aether/event/EventException.java
aether2/core/src/java/aether/event/EventHandler.java
aether2/core/src/java/aether/event/EventQueue.java
aether2/core/src/java/aether/event/EventType.java
aether2/core/src/java/aether/event/Message.java
aether2/core/src/java/aether/event/Notice.java
aether2/core/src/java/aether/event/Request.java
aether2/core/src/java/aether/event/Response.java
aether2/core/src/java/aether/event/SimpleEventQueue.java
aether2/core/src/java/aether/event/UriFactory.java
aether2/core/src/java/aether/net/AbstractConnection.java
aether2/core/src/java/aether/net/Connection.java
aether2/core/src/java/aether/net/DefaultConnection.java
aether2/core/src/java/aether/net/DefaultMulticastSocket.java
aether2/core/src/java/aether/net/DefaultServerSocket.java
aether2/core/src/java/aether/net/DefaultSocket.java
aether2/core/src/java/aether/net/MulticastSocket.java
aether2/core/src/java/aether/net/Publisher.java
aether2/core/src/java/aether/net/ServerSocket.java
aether2/core/src/java/aether/net/Socket.java
aether2/core/src/test/aether/AetherTestCase.java
aether2/core/src/test/aether/net/DefaultConnectionTest.java
aether2/core/src/test/aether/net/DefaultLinkTest.java
aether2/core/src/test/aether/net/DefaultMonitorTest.java
aether2/hercules/hercules.iws
aether2/hercules/src/java/aether/server/domain/ComponentRegistry.java
aether2/hercules/src/java/aether/server/domain/DomainAgent.java
aether2/hercules/src/java/aether/server/domain/DomainInfo.java
aether2/hercules/src/java/aether/server/domain/RegistryException.java
aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
aether2/hercules/src/test/aether/AetherTestCase.java
diff --git a/aether2/core/aether-core.ipr b/aether2/core/aether-core.ipr
index 9d30759..0750497 100644
--- a/aether2/core/aether-core.ipr
+++ b/aether2/core/aether-core.ipr
@@ -76,7 +76,7 @@
       <maximumHeapSize value="128" />
       <viewClosedWhenNoErrors value="false" />
       <additionalClassPath>
-        <entry path="file://file://file://file://file://file://file://$PROJECT_DIR$/../../common-lib/junit.jar" />
+        <entry path="file://file://file://file://file://file://file://file://$PROJECT_DIR$/../../common-lib/junit.jar" />
       </additionalClassPath>
       <targetFilters>
         <filter targetName="init" isVisible="false" />
diff --git a/aether2/core/aether-core.iws b/aether2/core/aether-core.iws
index ea32ac6..201c834 100644
--- a/aether2/core/aether-core.iws
+++ b/aether2/core/aether-core.iws
@@ -3,31 +3,36 @@
   <component name="FileEditorManager">
     <history>
       <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/Connection.java" line="11" column="17" vertical-scroll-proportion="-0.902439" horizontal-scroll-proportion="0.16481994" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/AbstractConnection.java" line="14" column="13" vertical-scroll-proportion="-2.6585367" horizontal-scroll-proportion="0.12603877" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Request.java" line="12" column="13" vertical-scroll-proportion="-0.5156794" horizontal-scroll-proportion="0.12603877" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Message.java" line="63" column="31" vertical-scroll-proportion="0.33212996" horizontal-scroll-proportion="0.300554" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Response.java" line="26" column="31" vertical-scroll-proportion="0.33275262" horizontal-scroll-proportion="0.300554" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultMulticastSocket.java" line="23" column="27" vertical-scroll-proportion="0.33212996" horizontal-scroll-proportion="0.26177284" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultServerSocket.java" line="17" column="25" vertical-scroll-proportion="0.33212996" horizontal-scroll-proportion="0.24238227">
-        <folding>
-          <element signature="imports" expanded="true" />
-        </folding>
-      </source-position-entry>
-      <source-position-entry url="file://$PROJECT_DIR$/doc/todo.txt" line="2" column="0" vertical-scroll-proportion="0.07317073" horizontal-scroll-proportion="0.0" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultSocket.java" line="21" column="13" vertical-scroll-proportion="0.33275262" horizontal-scroll-proportion="0.12603877" />
       <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/MulticastSocket.java" line="0" column="58" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.56232685" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/Socket.java" line="14" column="17" vertical-scroll-proportion="-1.8623693" horizontal-scroll-proportion="0.16481994" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/ServerSocket.java" line="70" column="81" vertical-scroll-proportion="0.9425087" horizontal-scroll-proportion="0.78531855">
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultConnection.java" line="9" column="70" vertical-scroll-proportion="0.22743683" horizontal-scroll-proportion="0.67867035" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultMulticastSocket.java" line="23" column="13" vertical-scroll-proportion="-3.6371841" horizontal-scroll-proportion="0.12603877" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultServerSocket.java" line="63" column="5" vertical-scroll-proportion="0.43140793" horizontal-scroll-proportion="0.048476454" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Event.java" line="13" column="22" vertical-scroll-proportion="-0.48375452" horizontal-scroll-proportion="0.2132964">
         <folding>
           <element signature="imports" expanded="true" />
         </folding>
       </source-position-entry>
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Attribute.java" line="34" column="4" vertical-scroll-proportion="0.26534295" horizontal-scroll-proportion="0.038781162" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Request.java" line="60" column="12" vertical-scroll-proportion="0.87184113" horizontal-scroll-proportion="0.11634349" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Message.java" line="32" column="5" vertical-scroll-proportion="1.1750902" horizontal-scroll-proportion="0.048476454" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/ServerSocket.java" line="64" column="35" vertical-scroll-proportion="0.77256316" horizontal-scroll-proportion="0.33933517" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/Socket.java" line="14" column="17" vertical-scroll-proportion="-1.4566787" horizontal-scroll-proportion="0.16481994" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Response.java" line="17" column="33" vertical-scroll-proportion="0.44584838" horizontal-scroll-proportion="0.3199446" />
+      <source-position-entry url="file://$PROJECT_DIR$/doc/todo.txt" line="1" column="0" vertical-scroll-proportion="0.037906136" horizontal-scroll-proportion="0.0" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultSocket.java" line="18" column="20" vertical-scroll-proportion="0.26534295" horizontal-scroll-proportion="0.19390582" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/AbstractConnection.java" line="16" column="19" vertical-scroll-proportion="0.45487365" horizontal-scroll-proportion="0.18421052" />
     </history>
-    <open-files />
+    <open-files>
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/Socket.java" line="14" column="17" vertical-scroll-proportion="-1.4566787" horizontal-scroll-proportion="0.16481994" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/DefaultSocket.java" line="18" column="20" vertical-scroll-proportion="0.26534295" horizontal-scroll-proportion="0.19390582" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/net/AbstractConnection.java" line="16" column="19" vertical-scroll-proportion="0.45487365" horizontal-scroll-proportion="0.18421052" selected="true" />
+      <source-position-entry url="file://$PROJECT_DIR$/doc/todo.txt" line="1" column="0" vertical-scroll-proportion="0.037906136" horizontal-scroll-proportion="0.0" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/event/Response.java" line="17" column="33" vertical-scroll-proportion="0.44584838" horizontal-scroll-proportion="0.3199446" />
+    </open-files>
   </component>
   <component name="ToolWindowManager">
     <frame x="21" y="11" width="835" height="719" extended-state="0" />
-    <editor active="false" />
+    <editor active="true" />
     <layout>
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.24968314" order="1" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.44585988" order="5" />
@@ -39,7 +44,7 @@
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.40029326" order="3" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.25" 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="true" anchor="bottom" auto_hide="true" internal_type="sliding" type="sliding" visible="true" weight="0.51592356" order="8" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="true" internal_type="sliding" type="sliding" visible="false" weight="0.51592356" order="8" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.40029326" 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" />
@@ -248,9 +253,12 @@
   <component name="ProjectViewSettings">
     <navigator currentView="ProjectPane" flattenPackages="true" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
     <view id="ProjectPane">
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$/doc" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/util" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/net" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/event" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$" />
     </view>
     <view id="SourcepathPane" />
@@ -500,8 +508,8 @@
     </inspection_tool>
     <inspection_tool class="Deprecated API usage" enabled="true" />
     <inspection_tool class="equals() and hashCode() not paired" enabled="true" />
-    <group name="Local Code Analysis" />
     <group name="Declaration Redundancy" />
+    <group name="Local Code Analysis" />
   </component>
   <component name="TodoView" selected-index="0">
     <todo-panel id="selected-file">
diff --git a/aether2/core/doc/todo.txt b/aether2/core/doc/todo.txt
index 722cf69..8b13789 100644
--- a/aether2/core/doc/todo.txt
+++ b/aether2/core/doc/todo.txt
@@ -1,2 +1 @@

-[ 10.28.2003 ]
diff --git a/aether2/core/src/java/aether/event/Attribute.java b/aether2/core/src/java/aether/event/Attribute.java
index 0e1eadf..512a16c 100644
--- a/aether2/core/src/java/aether/event/Attribute.java
+++ b/aether2/core/src/java/aether/event/Attribute.java
@@ -3,7 +3,7 @@ package aether.event;
 /**
  * Defines the fundamental attributes that can be set on events.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface Attribute
@@ -16,7 +16,6 @@ public interface Attribute
 		public static final String EVENT_ID = "aether.event.id";
 		public static final String TIME = "aether.event.time";
 		public static final String EVENT_TYPE = "aether.event.type";
-		public static final String SOURCE_ID = "aether.event.source.id";
 	}

     /**
@@ -33,20 +32,21 @@ public interface Attribute
 	public interface Message
 	{
 		public static final String LINK_ID = "aether.message.link.id";
-		public static final String DESTINATION = "aether.message.dest";
-	}
+    }

     /**
      * Attributes unique to REQUEST events.
      */
 	public interface Request extends Message
 	{
-	}
+        String DESTINATION = "aether.message.dest";
+    }

     /**
      * Attributes unique to RESPONSE events.
      */
 	public interface Response extends Message
 	{
+        public static final String RESPONSE_TO = "aether.response.response-to";
 	}
 }
diff --git a/aether2/core/src/java/aether/event/BlockingEventQueue.java b/aether2/core/src/java/aether/event/BlockingEventQueue.java
index 2a0fa6e..aa912fb 100644
--- a/aether2/core/src/java/aether/event/BlockingEventQueue.java
+++ b/aether2/core/src/java/aether/event/BlockingEventQueue.java
@@ -6,7 +6,7 @@ import java.util.LinkedList;
  * A BlockingEventQueue that can be used to synchronize event processing
  * between threads.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class BlockingEventQueue implements EventQueue
diff --git a/aether2/core/src/java/aether/event/Event.java b/aether2/core/src/java/aether/event/Event.java
index 248ca12..dbb2870 100644
--- a/aether2/core/src/java/aether/event/Event.java
+++ b/aether2/core/src/java/aether/event/Event.java
@@ -3,13 +3,12 @@ package aether.event;
 import aether.util.GuidFactory;
 import org.elvin.je4.Notification;

-import java.util.*;

 /**
  * Fundamental Event class that represents all events published in the Aether
  * network.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public abstract class Event implements Attribute.Event
@@ -96,26 +95,6 @@ public abstract class Event implements Attribute.Event
 		notification.put(TIME, time);
 	}

-	/**
-	 * Get the GUID of the component that generated this notice.
-	 *
-	 * @return guid of the component that generated this notice
-	 */
-	public String getSourceId()
-	{
-		return notification.getString(SOURCE_ID);
-	}
-
-	/**
-	 * Set the GUID of the component that generated this notice.
-	 *
-	 * @param guid GUID of the component that generated this notice
-	 */
-	public void setSourceId(String guid)
-	{
-		notification.put(SOURCE_ID, guid);
-	}
-
     /**
      * Get the event type of the Event.
      *
diff --git a/aether2/core/src/java/aether/event/EventException.java b/aether2/core/src/java/aether/event/EventException.java
index cae9e5a..f036ea5 100644
--- a/aether2/core/src/java/aether/event/EventException.java
+++ b/aether2/core/src/java/aether/event/EventException.java
@@ -3,7 +3,7 @@ package aether.event;
 /**
  * Implements a generic exception within the Aether framework.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class EventException extends Exception
diff --git a/aether2/core/src/java/aether/event/EventHandler.java b/aether2/core/src/java/aether/event/EventHandler.java
index a79180c..99cb75b 100644
--- a/aether2/core/src/java/aether/event/EventHandler.java
+++ b/aether2/core/src/java/aether/event/EventHandler.java
@@ -6,7 +6,7 @@ import java.util.EventListener;
  * Implemented by objects which can asynchronously process messages.
  * Implementations of this class are assumed to be threadsafe.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface EventHandler extends EventListener
diff --git a/aether2/core/src/java/aether/event/EventQueue.java b/aether2/core/src/java/aether/event/EventQueue.java
index 297238f..ea0ec8e 100644
--- a/aether2/core/src/java/aether/event/EventQueue.java
+++ b/aether2/core/src/java/aether/event/EventQueue.java
@@ -5,7 +5,7 @@ package aether.event;
  *
  * // TODO: add a close() method to enforce idea of closing queue
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface EventQueue
diff --git a/aether2/core/src/java/aether/event/EventType.java b/aether2/core/src/java/aether/event/EventType.java
index f31863f..900d148 100644
--- a/aether2/core/src/java/aether/event/EventType.java
+++ b/aether2/core/src/java/aether/event/EventType.java
@@ -3,7 +3,7 @@ package aether.event;
 /**
  * Interface that defines the different event type constants.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface EventType
diff --git a/aether2/core/src/java/aether/event/Message.java b/aether2/core/src/java/aether/event/Message.java
index 5aa7d8a..793b7d1 100644
--- a/aether2/core/src/java/aether/event/Message.java
+++ b/aether2/core/src/java/aether/event/Message.java
@@ -7,7 +7,7 @@ import org.elvin.je4.Subscription;
  * Indicates an Event that has a specific destination. Message events are used
  * to allow point-to-point communication over the underlying event network.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public abstract class Message extends Event implements Attribute.Message
@@ -31,47 +31,4 @@ public abstract class Message extends Event implements Attribute.Message
 	{
 		notification.put(LINK_ID, link);
 	}
-
-	/**
-	 * Get the destination of the message. Depending on who sent it and how,
-	 * this may either be an aether URL (eg aether://cs.columbia.edu/master)
-	 * or it might be the GUID of a component.
-	 *
-	 * @return destination of the message
-	 */
-	public String getDestination()
-	{
-		return notification.getString(DESTINATION);
-	}
-
-	/**
-	 * Set of the destination of this message.
-	 *
-	 * @param dest the destination of this message
-	 */
-	public void setDestination(String dest)
-	{
-		notification.put(DESTINATION, dest);
-	}
-
-	/**
-	 * Construct a Subscription indicating that a component wants to receive
-	 * messages sent to a certain destination.
-	 *
-	 * @param dest destination to subscribe to (this may be either a GUID or a
-     *             URL)
-	 */
-	public static Subscription createSubscriptionForDestination(String dest)
-	{
-		if (dest == null)
-		{
-			String msg = "dest can't be null";
-			throw new IllegalArgumentException(msg);
-		}
-
-		// some destinations may be regexable URLS!
-   		String expr = "regex(" + Attribute.Message.DESTINATION + ", " +
-				   " \"" + dest + "\")";
-		return new Subscription(expr);
-	}
 }
diff --git a/aether2/core/src/java/aether/event/Notice.java b/aether2/core/src/java/aether/event/Notice.java
index 944c063..3f8b89f 100644
--- a/aether2/core/src/java/aether/event/Notice.java
+++ b/aether2/core/src/java/aether/event/Notice.java
@@ -6,7 +6,7 @@ import org.elvin.je4.Subscription;
 /**
  * Indicates that an Aether Resource has changed it's state.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class Notice extends Event implements Attribute.Notice
diff --git a/aether2/core/src/java/aether/event/Request.java b/aether2/core/src/java/aether/event/Request.java
index a0a562b..dd0b789 100644
--- a/aether2/core/src/java/aether/event/Request.java
+++ b/aether2/core/src/java/aether/event/Request.java
@@ -1,49 +1,65 @@
 package aether.event;

 import org.elvin.je4.Notification;
+import org.elvin.je4.Subscription;

 import java.util.*;

 /**
  * Defines an Aether Request issued against some Aether Resource.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class Request extends Message implements Attribute.Request
 {
+
     public String getEventType()
     {
         return aether.event.EventType.REQUEST;
     }

+    /**
+	 * Get the destination of the message.
+	 *
+	 * @return destination of the message
+	 */
+	public String getDestination()
+	{
+		return notification.getString(Attribute.Request.DESTINATION);
+	}
+
 	/**
-	 * Construct an appropriate Response object for responding to this Request
-     * object.
+	 * Set of the destination of this message.
 	 *
-	 * @param srcId  GUID of the component generating the response
-	 * @return Response object appropriate for this request
+	 * @param dest the destination of this message
 	 */
-    public Response createResponse(String srcId)
+	public void setDestination(String dest)
 	{
-		if (srcId == null)
+		notification.put(Attribute.Request.DESTINATION, dest);
+	}
+
+    /**
+	 * Construct a Subscription necessary to receive responses over a given
+	 * link.
+	 *
+	 * @param linkId ID of the link to receive responses over
+	 * @return Subscription necessary to receive responses
+	 */
+	public static Subscription createSubscriptionToReceiveResponses(
+            String linkId)
+	{
+		if (linkId == null)
 		{
-			String msg = "no parameter can be null";
+			String msg = "linkId can't be null";
 			throw new IllegalArgumentException(msg);
 		}

-        Response resp = new Response();
-
-        // maintain the link
-		resp.setLink(getLink());
-
-		// destination of the response is the source of the request
-		resp.setDestination(getSourceId());
-
-		// source of the response is the GUID of the responder
-		resp.setSourceId(srcId);
-
-		return resp;
+		// receive all events that are responses and were sent over this link
+        String expr = Attribute.Event.EVENT_TYPE + " == \"" +
+				EventType.RESPONSE + "\" && " +
+				LINK_ID + " == \"" + linkId + "\"";
+		return new Subscription(expr);
 	}

 }
diff --git a/aether2/core/src/java/aether/event/Response.java b/aether2/core/src/java/aether/event/Response.java
index 109d3b7..0a81613 100644
--- a/aether2/core/src/java/aether/event/Response.java
+++ b/aether2/core/src/java/aether/event/Response.java
@@ -6,36 +6,66 @@ import org.elvin.je4.Subscription;
 /**
  * Represents a response from an Aether Resource having processed a request.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class Response extends Message implements Attribute.Response
 {
+    /**
+     * Construct an empty Response. This constructor should only be used if
+     * you've received notification which contains response-data and you need
+     * to parse it. Otherwise you should always construct a Response from the
+     * Request that triggered it.
+     */
+    public Response()
+    {
+        ; // do nothing
+    }
+
+    public Response(Request req)
+    {
+        if (req == null)
+        {
+            String msg = "req can't be null";
+            throw new IllegalArgumentException(msg);
+        }
+
+        setResponseTo(req.getEventId());
+    }

     public String getEventType()
     {
         return aether.event.EventType.RESPONSE;
     }

-	/**
-	 * Construct a Subscription necessary to receive responses over a given
-	 * link.
+    public void setResponseTo(String requestID)
+    {
+        notification.put(RESPONSE_TO, requestID);
+    }
+
+    public String getResponseTo()
+    {
+        return notification.getString(RESPONSE_TO);
+    }
+
+    /**
+	 * Construct a Subscription indicating that a component wants to receive
+	 * messages sent to a certain destination.
 	 *
-	 * @param linkId ID of the link to receive responses over
-	 * @return Subscription necessary to receive responses
+	 * @param dest destination to subscribe to (this may be either a GUID or a
+     *             URL)
 	 */
-	public static Subscription createSubscriptionToReceive(String linkId)
+	public static Subscription createSubscriptionToReceiveRequests(String dest)
 	{
-		if (linkId == null)
+		if (dest == null)
 		{
-			String msg = "linkId can't be null";
+			String msg = "dest can't be null";
 			throw new IllegalArgumentException(msg);
 		}

-		// receive all events that are responses and were sent over this link
-        String expr = Attribute.Event.EVENT_TYPE + " == \"" +
-				aether.event.EventType.RESPONSE + "\" && " +
-				LINK_ID + " == \"" + linkId + "\"";
+		// some destinations may be regexable URLS!
+   		String expr = "regex(" + Attribute.Request.DESTINATION + ", " +
+				   " \"" + dest + "\")";
 		return new Subscription(expr);
 	}
 }
diff --git a/aether2/core/src/java/aether/event/SimpleEventQueue.java b/aether2/core/src/java/aether/event/SimpleEventQueue.java
index 4e85e9f..d2f9913 100644
--- a/aether2/core/src/java/aether/event/SimpleEventQueue.java
+++ b/aether2/core/src/java/aether/event/SimpleEventQueue.java
@@ -6,7 +6,7 @@ import java.util.LinkedList;
  * A simple EventQueue using the LinkedList class. All Messages are simply
  * stored in memory until receieved. This class is threadsafe.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class SimpleEventQueue implements EventQueue
diff --git a/aether2/core/src/java/aether/event/UriFactory.java b/aether2/core/src/java/aether/event/UriFactory.java
index f6e6ed3..bd69776 100644
--- a/aether2/core/src/java/aether/event/UriFactory.java
+++ b/aether2/core/src/java/aether/event/UriFactory.java
@@ -6,7 +6,7 @@ import java.net.URISyntaxException;
 /**
  * Used to construct URIs.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class UriFactory
diff --git a/aether2/core/src/java/aether/net/AbstractConnection.java b/aether2/core/src/java/aether/net/AbstractConnection.java
index edc049a..ec076ed 100644
--- a/aether2/core/src/java/aether/net/AbstractConnection.java
+++ b/aether2/core/src/java/aether/net/AbstractConnection.java
@@ -9,7 +9,7 @@ import java.io.IOException;
 /**
  * Partial implementation of the Connection interface.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class AbstractConnection implements Connection
diff --git a/aether2/core/src/java/aether/net/Connection.java b/aether2/core/src/java/aether/net/Connection.java
index 6862fb6..b6305ae 100644
--- a/aether2/core/src/java/aether/net/Connection.java
+++ b/aether2/core/src/java/aether/net/Connection.java
@@ -6,7 +6,7 @@ import java.io.IOException;
  * Defines an object that allows components in the network to publish
  * messages.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface Connection extends Publisher
diff --git a/aether2/core/src/java/aether/net/DefaultConnection.java b/aether2/core/src/java/aether/net/DefaultConnection.java
index 5ac9053..c6610ce 100644
--- a/aether2/core/src/java/aether/net/DefaultConnection.java
+++ b/aether2/core/src/java/aether/net/DefaultConnection.java
@@ -9,9 +9,7 @@ import java.io.IOException;
 /**
  * Basic ability to connect to the event network and publish messages.
  *
- * // TODO: consider firing javabean event everytime a event published
- *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class DefaultConnection extends AbstractConnection
diff --git a/aether2/core/src/java/aether/net/DefaultMulticastSocket.java b/aether2/core/src/java/aether/net/DefaultMulticastSocket.java
index 02e3161..d5e5c28 100644
--- a/aether2/core/src/java/aether/net/DefaultMulticastSocket.java
+++ b/aether2/core/src/java/aether/net/DefaultMulticastSocket.java
@@ -18,7 +18,7 @@ import java.util.Map;
 /**
  * Provides the basic implementation of the MulticastSocket interface.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class DefaultMulticastSocket implements MulticastSocket
@@ -203,7 +203,7 @@ public class DefaultMulticastSocket implements MulticastSocket
     /**
      * NotificationListener that enqueues all incoming NOTICE objects.
      *
-     * @author Buko O. (buko@concedere.net)
+     * @author Buko O. (aso22@columbia.edu)
      * @version 0.1
      */
     private class QueueNotificationListener implements NotificationListener
diff --git a/aether2/core/src/java/aether/net/DefaultServerSocket.java b/aether2/core/src/java/aether/net/DefaultServerSocket.java
index 42782aa..442f113 100644
--- a/aether2/core/src/java/aether/net/DefaultServerSocket.java
+++ b/aether2/core/src/java/aether/net/DefaultServerSocket.java
@@ -23,11 +23,6 @@ public class DefaultServerSocket implements ServerSocket
     protected String destination;

     /**
-     * ID of the component generating responses.
-     */
-    protected String sourceID;
-
-    /**
      * EventHandler to be notified of incoming requests.
      */
     protected EventHandler eventHandler;
@@ -43,12 +38,11 @@ public class DefaultServerSocket implements ServerSocket
      * Construct a new DefaultServerSocket.
      *
      * @param dest  URI of the destination
-     * @param srcID ID of the component generating responses
      * @param conn  Connection to the event network
      */
-    public DefaultServerSocket(String dest, String srcID, Connection conn)
+    public DefaultServerSocket(String dest, Connection conn)
     {
-        if ((dest == null) || (srcID == null) || (conn == null))
+        if ((dest == null) || (conn == null))
         {
             String msg = "no parameter can be null";
             throw new IllegalArgumentException(msg);
@@ -61,7 +55,6 @@ public class DefaultServerSocket implements ServerSocket
         }

         this.destination = dest;
-        this.sourceID = srcID;
         this.connection = conn;
     }

@@ -70,11 +63,6 @@ public class DefaultServerSocket implements ServerSocket
         return destination;
     }

-    public String getSourceId()
-    {
-        return sourceID;
-    }
-
     public void setEventHandler(EventHandler handler)
     {
         this.eventHandler = handler;
@@ -90,7 +78,7 @@ public class DefaultServerSocket implements ServerSocket
         // construct the subscription to receive requests sent to the
         // destination
         this.subscription =
-                Message.createSubscriptionForDestination(destination);
+                Response.createSubscriptionToReceiveRequests(destination);

         // when a request comes in, just hand it off to the EventHandler
         NotificationListener n = new NotificationListener()
@@ -147,12 +135,6 @@ public class DefaultServerSocket implements ServerSocket
         // preserve the link ID from the request
         response.setLink(request.getLink());

-        // destination of the response is the source of the request
-        response.setDestination(request.getSourceId());
-
-        // set the source ID for the response
-        response.setSourceId(sourceID);
-
         // now send the response over the network
         connection.publish(response);
     }
diff --git a/aether2/core/src/java/aether/net/DefaultSocket.java b/aether2/core/src/java/aether/net/DefaultSocket.java
index 33393b2..c3101cb 100644
--- a/aether2/core/src/java/aether/net/DefaultSocket.java
+++ b/aether2/core/src/java/aether/net/DefaultSocket.java
@@ -16,14 +16,13 @@ import java.io.IOException;
 /**
  * Represents a conversation with a specific resource on an Aether host.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class DefaultSocket implements Socket
 {
 	/**
-	 * GUID of the last component to send a response or the end point of this
-	 * link. This could also be a URL.
+	 * URI that represents the destination of the socket.
 	 */
 	protected String destination;

@@ -45,7 +44,8 @@ public class DefaultSocket implements Socket
 	private Connection connection;
 	private Consumer consumer;
 	private Subscription subscription;
-	private Response response;
+	private Response mostRecentResponse;
+    private Request lastRequestSent;
 	private NotificationListener notifListener;

 	private static final Logger logger = Logger.getLogger(DefaultSocket.class);
@@ -87,7 +87,7 @@ public class DefaultSocket implements Socket

         // construct the subscription needed to listen for responses sent over
 		// this link
-		this.subscription = Response.createSubscriptionToReceive(linkId);
+		this.subscription = Request.createSubscriptionToReceiveResponses(linkId);
         this.notifListener = new LinkNotificationListener();
 		this.subscription.addNotificationListener(notifListener);

@@ -112,7 +112,7 @@ public class DefaultSocket implements Socket
         this.consumer = null;
 		this.subscription = null;
         this.notifListener = null;
-		this.response = null;
+		this.mostRecentResponse = null;
 		disconnected = true;
 	}

@@ -162,7 +162,8 @@ public class DefaultSocket implements Socket
 		// now send the request!!
 		connection.publish(request);

-		// now send the request and block until the response comes
+		// now send the request and block until the mostRecentResponse comes
+        lastRequestSent = request;
 		return blockUntilResponse();
 	}

@@ -182,7 +183,7 @@ public class DefaultSocket implements Socket
 		// or the request is timed out
         try
 		{
-			while (response == null)
+			while (mostRecentResponse == null)
 			{
                 this.wait(timeOut);
 			}
@@ -195,16 +196,17 @@ public class DefaultSocket implements Socket
 		}

         // ok we've woken up! did we wake up because we timed out?
-		if (response == null)
+		if (mostRecentResponse == null)
 		{
             String msg = "request timed out";
 			throw new IOException(msg);
 		}

-        // otherwise, let's save the given response and send it while resetting
+        // otherwise, let's save the given mostRecentResponse and send it while resetting
 		// te state of the connection
-        Response lastResponse = response;
-        this.response = null;
+        Response lastResponse = mostRecentResponse;
+        this.mostRecentResponse = null;
+        this.lastRequestSent = null;
         return lastResponse;
 	}

@@ -212,13 +214,13 @@ public class DefaultSocket implements Socket
 	 * A special NotificationListener that will allow us to process all
 	 * events sent to this DefaultSocket.
 	 *
-	 * @version $Revision: 1.1 $
+	 * @version $Revision: 1.2 $
 	 */
 	private class LinkNotificationListener implements NotificationListener
 	{
 		public void notificationAction(Notification notification)
 		{
-			// if this getNotification is a response  let's process it
+			// if this getNotification is a mostRecentResponse  let's process it
         	if (Event.isResponse(notification))
 			{
 				try
@@ -226,29 +228,42 @@ public class DefaultSocket implements Socket
 					// obtain the lock on the outer object first!
 					synchronized (DefaultSocket.this)
 					{
-            			response = new Response();
+            			Response response = new Response();
                         response.parse(notification);

-                        // xxx: how do you know if the response received
-                        // --- corresponds to the last request sent? there
-                        // --- must be a way to match up responses to requests!
+                        // make sure that the response is a response to the
+                        // last request sent -- note that the entire point is
+                        // that it's possible to send out a single request and
+                        // get multiple responses so the response should only
+                        // be processed if it's the first response to the
+                        // request and no response has been handled yet
+                        if ((lastRequestSent == null) ||
+                                (!lastRequestSent.getEventId().
+                                equals(response.getResponseTo())))
+                        {
+                            logger.debug("Received Response " + response
+                                         + " which wasn't a response to last" +
+                                         " request sent");
+                            return;
+                        }

 						// wake up any threads sleeping on this object, waiting
-						// for a response
+						// for a mostRecentResponse
+                        DefaultSocket.this.mostRecentResponse = response;
 						DefaultSocket.this.notify();
 					}
 				}
 				catch (EventException me)
 				{
-                	// bad response data, let's log it and ignore it
-                    String msg = "receieved badly formed response";
+                	// bad mostRecentResponse data, let's log it and ignore it
+                    String msg = "receieved badly formed mostRecentResponse";
 					logger.warn(msg, me);
 				}
 			}
             else
             {
                 logger.warn("received notification " + notification
-                            + " which isn't a response");
+                            + " which isn't a mostRecentResponse");
             }
 		}
 	}
diff --git a/aether2/core/src/java/aether/net/MulticastSocket.java b/aether2/core/src/java/aether/net/MulticastSocket.java
index 6c9f6ba..d5f3a41 100644
--- a/aether2/core/src/java/aether/net/MulticastSocket.java
+++ b/aether2/core/src/java/aether/net/MulticastSocket.java
@@ -10,7 +10,7 @@ import java.io.IOException;
  * channels) within the event network. Using a MulticastSocket it's possible to
  * subscribe to topics and broadcast Notice objects over a topic.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface MulticastSocket
diff --git a/aether2/core/src/java/aether/net/Publisher.java b/aether2/core/src/java/aether/net/Publisher.java
index cfd1385..6c13197 100644
--- a/aether2/core/src/java/aether/net/Publisher.java
+++ b/aether2/core/src/java/aether/net/Publisher.java
@@ -7,7 +7,7 @@ import java.io.IOException;
 /**
  * Allows a component within the network to publish events.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface Publisher
diff --git a/aether2/core/src/java/aether/net/ServerSocket.java b/aether2/core/src/java/aether/net/ServerSocket.java
index c2b2a52..d82a5fd 100644
--- a/aether2/core/src/java/aether/net/ServerSocket.java
+++ b/aether2/core/src/java/aether/net/ServerSocket.java
@@ -22,13 +22,6 @@ public interface ServerSocket
     public String getDestination();

     /**
-     * Get the ID of the component generating the responses.
-     *
-     * @return ID of the component generating the responses
-     */
-    public String getSourceId();
-
-    /**
      * Set the EventHandler that will be notified of incoming requests.
      *
      * @param handler handler to be notified of incoming requests
diff --git a/aether2/core/src/java/aether/net/Socket.java b/aether2/core/src/java/aether/net/Socket.java
index 780ea35..2772791 100644
--- a/aether2/core/src/java/aether/net/Socket.java
+++ b/aether2/core/src/java/aether/net/Socket.java
@@ -9,7 +9,7 @@ import java.io.IOException;
  * A Socket represents a stateful, synchronous communication channel between
  * two components.
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public interface Socket
diff --git a/aether2/core/src/test/aether/AetherTestCase.java b/aether2/core/src/test/aether/AetherTestCase.java
index 6a196ec..96186af 100644
--- a/aether2/core/src/test/aether/AetherTestCase.java
+++ b/aether2/core/src/test/aether/AetherTestCase.java
@@ -8,7 +8,7 @@ import java.util.Properties;

 /**
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public abstract class AetherTestCase extends TestCase
diff --git a/aether2/core/src/test/aether/net/DefaultConnectionTest.java b/aether2/core/src/test/aether/net/DefaultConnectionTest.java
index 13f166a..f17725e 100644
--- a/aether2/core/src/test/aether/net/DefaultConnectionTest.java
+++ b/aether2/core/src/test/aether/net/DefaultConnectionTest.java
@@ -10,7 +10,7 @@ import org.elvin.je4.Notification;
 /**
  *
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class DefaultConnectionTest extends AetherTestCase
diff --git a/aether2/core/src/test/aether/net/DefaultLinkTest.java b/aether2/core/src/test/aether/net/DefaultLinkTest.java
index da33623..ab5604a 100644
--- a/aether2/core/src/test/aether/net/DefaultLinkTest.java
+++ b/aether2/core/src/test/aether/net/DefaultLinkTest.java
@@ -12,7 +12,7 @@ import org.elvin.je4.Notification;

 /**
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class DefaultLinkTest extends AetherTestCase
@@ -56,7 +56,7 @@ public class DefaultLinkTest extends AetherTestCase
 			// subscribe to all requests
             this.consumer = new Consumer(conn.elvinConnection());
 			Subscription sub =
-					new Subscription("regex(" + Attribute.Message.DESTINATION +
+					new Subscription("regex(" + Attribute.Request.DESTINATION +
 									 ", \"*\")");
 			sub.addNotificationListener(new NotificationListener()
 			{
diff --git a/aether2/core/src/test/aether/net/DefaultMonitorTest.java b/aether2/core/src/test/aether/net/DefaultMonitorTest.java
index dda81e7..4b36dd5 100644
--- a/aether2/core/src/test/aether/net/DefaultMonitorTest.java
+++ b/aether2/core/src/test/aether/net/DefaultMonitorTest.java
@@ -5,7 +5,7 @@ import aether.event.*;

 /**
  *
- * @author Buko O. (buko@concedere.net)
+ * @author Buko O. (aso22@columbia.edu)
  * @version 0.1
  **/
 public class DefaultMonitorTest extends AetherTestCase
diff --git a/aether2/hercules/hercules.iws b/aether2/hercules/hercules.iws
index b7d4aa9..8b45225 100644
--- a/aether2/hercules/hercules.iws
+++ b/aether2/hercules/hercules.iws
@@ -2,9 +2,6 @@
 <project version="3" relativePaths="false">
   <component name="FileEditorManager">
     <history>
-      <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/DefaultThreadPool.java" line="42" column="13" vertical-scroll-proportion="0.07317073" horizontal-scroll-proportion="0.26686218" />
       <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/ThreadPool.java" line="8" column="17" vertical-scroll-proportion="0.29268292" horizontal-scroll-proportion="0.3489736" />
       <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/ManagedPublisher.java" line="50" column="39" vertical-scroll-proportion="-1.4638989" horizontal-scroll-proportion="0.37811634" />
       <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/responder/SwitchBoardListener.java" line="17" column="36" vertical-scroll-proportion="0.4512195" horizontal-scroll-proportion="0.34903046" />
@@ -13,20 +10,20 @@
       <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/responder/Responder.java" line="32" column="34" vertical-scroll-proportion="0.6707317" horizontal-scroll-proportion="0.32963988" />
       <source-position-entry url="file://$PROJECT_DIR$/.cvsignore" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" />
       <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/responder/SwitchBoard.java" line="11" column="17" vertical-scroll-proportion="-0.79268295" horizontal-scroll-proportion="0.16481994" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/framework/Advertising.java" line="11" column="17" vertical-scroll-proportion="0.33275262" horizontal-scroll-proportion="0.16481994" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/domain/DomainAgent.java" line="131" column="19" vertical-scroll-proportion="0.12195122" horizontal-scroll-proportion="0.18421052" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/responder/DefaultSwitchBoard.java" line="349" column="98" vertical-scroll-proportion="0.33275262" horizontal-scroll-proportion="0.9501385" />
-      <source-position-entry url="file://$PROJECT_DIR$/doc/todo.txt" line="3" column="73" vertical-scroll-proportion="0.1097561" horizontal-scroll-proportion="0.7077562" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/framework/Advertising.java" line="11" column="17" vertical-scroll-proportion="0.34476534" horizontal-scroll-proportion="0.16481994" />
+      <source-position-entry url="file://$PROJECT_DIR$/doc/todo.txt" line="26" column="34" vertical-scroll-proportion="0.9855596" horizontal-scroll-proportion="0.32963988" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/domain/DomainInfo.java" line="69" column="58" vertical-scroll-proportion="0.9241877" horizontal-scroll-proportion="0.56232685" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/domain/RegistryException.java" line="27" column="17" vertical-scroll-proportion="0.9268293" horizontal-scroll-proportion="0.16481994" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/domain/DomainAgent.java" line="200" column="29" vertical-scroll-proportion="0.34146342" horizontal-scroll-proportion="0.28116342" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/domain/ComponentRegistry.java" line="0" column="45" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.4362881" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/responder/DefaultSwitchBoard.java" line="139" column="98" vertical-scroll-proportion="0.30487806" horizontal-scroll-proportion="0.9501385" />
     </history>
     <open-files>
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/framework/Advertising.java" line="11" column="17" vertical-scroll-proportion="0.33275262" horizontal-scroll-proportion="0.16481994" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/domain/DomainAgent.java" line="131" column="19" vertical-scroll-proportion="0.12195122" horizontal-scroll-proportion="0.18421052" />
-      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/responder/DefaultSwitchBoard.java" line="349" column="98" vertical-scroll-proportion="0.33275262" horizontal-scroll-proportion="0.9501385" />
-      <source-position-entry url="file://$PROJECT_DIR$/doc/todo.txt" line="3" column="73" vertical-scroll-proportion="0.1097561" horizontal-scroll-proportion="0.7077562" selected="true" />
+      <source-position-entry url="file://$PROJECT_DIR$/src/java/aether/server/responder/DefaultSwitchBoard.java" line="139" column="98" vertical-scroll-proportion="0.30487806" horizontal-scroll-proportion="0.9501385" selected="true" />
     </open-files>
   </component>
   <component name="ToolWindowManager">
-    <frame x="126" y="11" width="835" height="719" extended-state="0" />
+    <frame x="180" y="12" width="835" 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" />
@@ -248,17 +245,18 @@
   <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$/doc" />
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/server/domain" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento/world" />
-      <expanded_node type="directory" url="file://$PROJECT_DIR$" />
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento/world/manager" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/server/responder" />
-      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/aether/server" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento/world/manager" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/doc" />
+      <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/aether/server" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$" />
       <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento" />
+      <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/memento/world/model" />
     </view>
     <view id="SourcepathPane" />
     <view id="ClasspathPane" />
diff --git a/aether2/hercules/src/java/aether/server/domain/ComponentRegistry.java b/aether2/hercules/src/java/aether/server/domain/ComponentRegistry.java
new file mode 100644
index 0000000..586e155
--- /dev/null
+++ b/aether2/hercules/src/java/aether/server/domain/ComponentRegistry.java
@@ -0,0 +1,40 @@
+package aether.server.domain;
+
+/**
+ * Defines a registry for known components within the event network.
+ *
+ * Buko O. (aso22@columbia.edu)
+ * @version 0.1
+ **/
+public interface ComponentRegistry
+{
+    /**
+     * Register a component within the registry.
+     *
+     * @param guid guid of the component
+     * @param info info about the component
+     * @throws RegistryException
+     *         if something goes wrong
+     */
+    public void register(String guid, ComponentInfo info)
+            throws RegistryException;
+
+    /**
+     * Unregister a component.
+     *
+     * @param guid GUID of the component
+     * @throws RegistryException
+     *         if something goes wrong
+     */
+    public void unregister(String guid) throws RegistryException;
+
+    /**
+     * Get the info about a component.
+     *
+     * @param guid GUID of the component to get the info for
+     * @return info for the component
+     * @throws RegistryException
+     *         if the info can't be retreived
+     */
+    public ComponentInfo getInfo(String guid) throws RegistryException;
+}
diff --git a/aether2/hercules/src/java/aether/server/domain/DomainAgent.java b/aether2/hercules/src/java/aether/server/domain/DomainAgent.java
index b4e53d7..1258b80 100644
--- a/aether2/hercules/src/java/aether/server/domain/DomainAgent.java
+++ b/aether2/hercules/src/java/aether/server/domain/DomainAgent.java
@@ -36,75 +36,31 @@ public class DomainAgent extends BeanContextChildSupport
 {
 	private BeanContextMembershipListener bcml;
 	private EventHandler handler;
-
-    private Broadcaster broadcaster;
-	private Monitor monitor;
-
+    private MulticastSocket multicastSocket;
 	private DomainInfo domainInfo;
-	private Map compMap = Collections.synchronizedMap(new HashMap());
-	private Map remoteMap = Collections.synchronizedMap(new HashMap());
+    private ComponentRegistry localRegistry;
+    private ComponentRegistry globalRegistry;

 	private static final Logger log = Logger.getLogger(DomainAgent.class);

     /**
-     * Set the Monitor this DomainAgent may use to monitor component
-     * registrations on the network.
-     * <p />
-     * Note that this Monitor should already be open and subscribed to the
-     * domain topic.
+     * Get the MulticastSocket to be used by the DomainAgent.
      *
-     * @param monitor monitor used to receive events from the domain topic
+     * @return MulticastSocket used by the DomainAgent
      */
-    public void setMonitor(Monitor monitor)
+    public MulticastSocket getMulticastSocket()
     {
-        if (monitor == null)
-        {
-            String msg = "monitor can't be null";
-            throw new IllegalArgumentException(msg);
-        }
-
-        if (!monitor.isOpen())
-        {
-            String msg = "monitor must be open";
-            throw new IllegalArgumentException(msg);
-        }
-
-        this.monitor = monitor;
+        return multicastSocket;
     }

     /**
-     * Get the Monitor used to receive events from the domain topic.
+     * Set the MulticastSocket used by the DomainAgent
      *
-     * @return Monitor used to receive events from the domain topic
+     * @param multicastSocket MulticastSocket used by the DomainAgent
      */
-    public Monitor getMonitor()
+    public void setMulticastSocket(MulticastSocket multicastSocket)
     {
-        return monitor;
-    }
-
-    /**
-     * Set the Broadcaster used to announce new
-     * @param bcast
-     */
-    public void setBroadcaster(Broadcaster bcast)
-    {
-        if (bcast == null)
-        {
-            String msg = "bcast can't be null";
-            throw new IllegalArgumentException(msg);
-        }
-
-        this.broadcaster = bcast;
-    }
-
-    /**
-     * Get the Broadcaster used to announce component registrations.
-     *
-     * @return Broadcaster used to announce component registrations
-     */
-    public Broadcaster getBroadcaster()
-    {
-        return broadcaster;
+        this.multicastSocket = multicastSocket;
     }

 	/**
@@ -132,18 +88,65 @@ public class DomainAgent extends BeanContextChildSupport
         return domainInfo;
     }

-	public void initialize()
+    /**
+     * Get the ComponentRegistry for components in the local container.
+     *
+     * @return registry for components in the local container
+     */
+    public ComponentRegistry getLocalRegistry()
+    {
+        return localRegistry;
+    }
+
+    /**
+     * Set the local ComponentRegistry.
+     *
+     * @param localRegistry local ComponentRegistry
+     */
+    public void setLocalRegistry(ComponentRegistry localRegistry)
+    {
+        this.localRegistry = localRegistry;
+    }
+
+    /**
+     * Get the global ComponentRegistry for tracking information about all
+     * Components everywhere.
+     *
+     * @return global ComponentRegistry
+     */
+    public ComponentRegistry getGlobalRegistry()
+    {
+        return globalRegistry;
+    }
+
+    /**
+     * Set the global ComponentRegistry.
+     *
+     * @param globalRegistry global ComponentRegistry
+     */
+    public void setGlobalRegistry(ComponentRegistry globalRegistry)
+    {
+        this.globalRegistry = globalRegistry;
+    }
+
+	public void start() throws IOException
 	{
 		bcml = new DomainListener();
 		getBeanContext().addBeanContextMembershipListener(bcml);

 		handler = new DomainHandler();
-		monitor.addNoticeListener(handler);
+
+        multicastSocket.open();
+        multicastSocket.subscribe(domainInfo.getDomainTopic());
+		multicastSocket.addEventHandler(handler);
 	}

-	public void dispose()
+	public void stop() throws IOException
 	{
-	    monitor.removeNoticeListener(handler);
+        multicastSocket.unsubscribe(domainInfo.getDomainTopic());
+	    multicastSocket.removeEventHandler(handler);
+        multicastSocket.close();
+
 		handler = null;
 		getBeanContext().removeBeanContextMembershipListener(bcml);
         bcml = null;
@@ -167,83 +170,81 @@ public class DomainAgent extends BeanContextChildSupport
 		return ci;
 	}

-	private void register(Identifiable idf)
-	{
-		ComponentInfo ci = createComponentInfo(idf);
-		compMap.put(idf.getGuid(), ci);
+    private void doLocalRegister(String guid, ComponentInfo ci)
+            throws RegistryException
+    {
+        try
+        {
+            fireRegistered(guid, ci);
+        }
+        catch (IOException ioe)
+        {
+            String msg = "failed to broadcast registration guid=" + guid +
+                ", component-info=" + ci;
+            log.warn(msg, ioe);
+
+            // if the remote broadcast fails then don't attempt the local
+            // registration
+            // xxx: what to do instead here? if registration fails perhaps the
+            // --- component shouldn't be allowed to enter the container? or
+            // --- should be removed from the container?
+            return;
+        }
+        localRegistry.register(guid, ci);
+    }

-		log.info("registered component " + idf + " with info" + ci);
-		fireRegistered(idf, ci);
-	}
+    private void doLocalUnregister(String guid)
+        throws RegistryException
+    {
+        // todo: fix this method!
+
+        try
+        {
+            fireUnregistered(guid);
+        }
+        catch (IOException ioe)
+        {
+            String msg = "failed to broadcast unregistration guid=" + guid;
+            log.warn(msg, ioe);
+
+            // if the remote broadcast fails then don't do the local
+            // unregistration? but this is risky, if the component has left
+            // the container it's no longer registered!
+        }
+        localRegistry.unregister(guid);
+    }

-	private void unregister(Identifiable idf)
+	private void doRegisterGlobal(String guid, ComponentInfo ci)
+            throws RegistryException
 	{
-		ComponentInfo ci = (ComponentInfo) compMap.remove(idf.getGuid());
+		globalRegistry.register(guid, ci);
+	}

-		fireUnregistered(idf, ci);
+	private void doUnregisterGlobal(String guid)
+        throws RegistryException
+	{
+        globalRegistry.unregister(guid);
 	}

-	private void fireRegistered(Identifiable idf, ComponentInfo ci)
+	private void fireRegistered(String guid, ComponentInfo ci)
+            throws IOException
 	{
 		Notice notice = new Notice();
         // xxx: how does a DomainAgent know its own GUID?
 		//notice.setSourceId(this.getGuid());
-		notice.setTopicId(this.getDomainTopic());

-		try
-		{
-			ByteArrayOutputStream baos = new ByteArrayOutputStream();
-			ObjectOutputStream out = new ObjectOutputStream(baos);
-			out.writeObject(ci);
-			//notice.setBody(baos.toByteArray());
-		}
-		catch (IOException ioe)
-		{
-			// todo: in the future tell someobdy we fucked up
-			log.error("failed to write advertisement data", ioe);
-		}
-
-		// send the notice
-		try
-		{
-			connection.publish(notice);
-		}
-		catch (IOException ioe)
-		{
-			// todo: in the future tell somebody we fucked up
-			log.error("failed to send component register event", ioe);
-		}
+        // broadcast the registry over the domain topic
+        multicastSocket.broadcast(notice, domainInfo.getDomainTopic());
 	}

-	private void fireUnregistered(Identifiable idf, ComponentInfo ci)
+	private void fireUnregistered(String guid) throws IOException
 	{
 		Notice notice = new Notice();
 		//notice.setSourceId(this.getGuid());
-		notice.setTopicId(this.getDomainTopic());
+		notice.setTopicId(domainInfo.getDomainTopic());

-		try
-		{
-			ByteArrayOutputStream baos = new ByteArrayOutputStream();
-			ObjectOutputStream out = new ObjectOutputStream(baos);
-			out.writeObject(ci);
-			// notice.setBody(baos.toByteArray());
-		}
-		catch (IOException ioe)
-		{
-			// todo: in the future tell someobdy we fucked up
-			log.error("failed to write advertisement data", ioe);
-		}
-
-		// send the notice
-		try
-		{
-			connection.publish(notice);
-		}
-		catch (IOException ioe)
-		{
-			// todo: in the future tell somebody we fucked up
-			log.error("failed to send component register event", ioe);
-		}
+        // broadcast the unregistry over the domain topic
+        multicastSocket.broadcast(notice, domainInfo.getDomainTopic());
 	}

 	private void processRemoteRegister(Notice notice)
@@ -264,26 +265,31 @@ public class DomainAgent extends BeanContextChildSupport
 	{
 		public void childrenAdded(BeanContextMembershipEvent bcme)
 		{
+            // todo: implement this method
+
 			Object[] children = bcme.toArray();

 			for (int i = 0; i < children.length; ++i)
 			{
 				if (children[i] instanceof Identifiable)
 				{
-					register((Identifiable) children[i]);
+                    String guid = ((Identifiable) children[i]).getGuid();
+					// doLocalRegister(guid, children[i]);
 				}
 			}
 		}

 		public void childrenRemoved(BeanContextMembershipEvent bcme)
 		{
+            // todo: implement this method
+
 			Object[] c = bcme.toArray();

 			for (int i = 0; i < c.length; ++i)
 			{
                 if (c[i] instanceof Identifiable)
 				{
-					unregister((Identifiable) c[i]);
+					// doLocalUnregister((Identifiable) c[i]);
 				}
 			}
 		}
diff --git a/aether2/hercules/src/java/aether/server/domain/DomainInfo.java b/aether2/hercules/src/java/aether/server/domain/DomainInfo.java
index 1687ef0..4086b20 100644
--- a/aether2/hercules/src/java/aether/server/domain/DomainInfo.java
+++ b/aether2/hercules/src/java/aether/server/domain/DomainInfo.java
@@ -12,6 +12,7 @@ public class DomainInfo implements Serializable
 {
     private String domainName;
 	private String authority;
+    private String domainTopic;

 	/**
 	 * Set the authority for the domain.
@@ -52,4 +53,24 @@ public class DomainInfo implements Serializable
 	{
 		this.domainName = domainName;
 	}
+
+    /**
+     * Get the topic on which domain control notices are broadcast.
+     *
+     * @return topic on which domain control notices are broadcast
+     */
+    public String getDomainTopic()
+    {
+        return domainTopic;
+    }
+
+    /**
+     * Set the topic on which domain control notices are broadcast.
+     *
+     * @param domainTopic topic for domain control notices
+     */
+    public void setDomainTopic(String domainTopic)
+    {
+        this.domainTopic = domainTopic;
+    }
 }
diff --git a/aether2/hercules/src/java/aether/server/domain/RegistryException.java b/aether2/hercules/src/java/aether/server/domain/RegistryException.java
new file mode 100644
index 0000000..e418a8c
--- /dev/null
+++ b/aether2/hercules/src/java/aether/server/domain/RegistryException.java
@@ -0,0 +1,30 @@
+package aether.server.domain;
+
+/**
+ * Generic exception raised by a ComponentRegistry.
+ *
+ * Buko O. (aso22@columbia.edu)
+ * @version 0.1
+ **/
+public class RegistryException extends Exception
+{
+    public RegistryException()
+    {
+        super();
+    }
+
+    public RegistryException(String s)
+    {
+        super(s);
+    }
+
+    public RegistryException(String s, Throwable t)
+    {
+        super(s, t);
+    }
+
+    public RegistryException(Throwable t)
+    {
+        super(t);
+    }
+}
diff --git a/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java b/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
index 086b4fe..58caf5b 100644
--- a/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
+++ b/aether2/hercules/src/java/aether/server/responder/DefaultSwitchBoard.java
@@ -115,8 +115,7 @@ public class DefaultSwitchBoard implements SwitchBoard
             throw new IllegalArgumentException(msg);
         }

-        // make sure that there isn't already a responder bound to dest
-        if (destMap.containsKey(dest))
+        if (isBound(dest))
         {
             String msg = "responder already bound to dest " + dest;
             throw new ResponderException(msg);
@@ -152,6 +151,11 @@ public class DefaultSwitchBoard implements SwitchBoard
         fireResponderBound(responder, dest);
     }

+    private boolean isBound(String destination)
+    {
+        return destMap.containsKey(destination);
+    }
+
     public void unbind(Responder responder, String dest) throws ResponderException,
             IOException
     {
diff --git a/aether2/hercules/src/test/aether/AetherTestCase.java b/aether2/hercules/src/test/aether/AetherTestCase.java
index b827021..a63d243 100644
--- a/aether2/hercules/src/test/aether/AetherTestCase.java
+++ b/aether2/hercules/src/test/aether/AetherTestCase.java
@@ -15,7 +15,7 @@ public abstract class AetherTestCase extends TestCase
 {
 	static
 	{
-		// initialize log4j
+		// start log4j
 		BasicConfigurator.configure();
 	}