News flash: setReceiver() unneeded - here comes Siena 1.4.2...

jjp32 [2002-06-24 19:57:35]
News flash: setReceiver() unneeded - here comes Siena 1.4.2...
Filename
siena/utils/AllSubscriber.java
siena/utils/TestPublisher.java
siena/utils/siena14/AllSubscriber.java
siena/utils/siena14/TestPublisher.java
diff --git a/siena/utils/AllSubscriber.java b/siena/utils/AllSubscriber.java
index 5463e63..2740e4a 100644
--- a/siena/utils/AllSubscriber.java
+++ b/siena/utils/AllSubscriber.java
@@ -27,7 +27,6 @@ public class AllSubscriber implements Notifiable {
   public AllSubscriber(String sienaHost) {
     hd = new HierarchicalDispatcher();
     try {
-      hd.setReceiver(new TCPPacketReceiver(0));
       hd.setMaster(sienaHost);
     } catch(Exception e) {
       e.printStackTrace();
diff --git a/siena/utils/TestPublisher.java b/siena/utils/TestPublisher.java
index ee5c709..29ddae4 100644
--- a/siena/utils/TestPublisher.java
+++ b/siena/utils/TestPublisher.java
@@ -23,7 +23,6 @@ public class TestPublisher {
     }
     hd = new HierarchicalDispatcher();
     try {
-      hd.setReceiver(new TCPPacketReceiver(0));
       hd.setMaster(args[0]);
     } catch(Exception e) {
       e.printStackTrace();
diff --git a/siena/utils/siena14/AllSubscriber.java b/siena/utils/siena14/AllSubscriber.java
deleted file mode 100644
index 9e68f8a..0000000
--- a/siena/utils/siena14/AllSubscriber.java
+++ /dev/null
@@ -1,72 +0,0 @@
-
-package psl.events.siena.utils.siena14;
-
-import siena.*;
-import siena.comm.*;
-
-/**
- * Universal subscription-and-printout service, useful for debugging.
- * Note that even though the class is not a Runnable, it doesn't
- * really matter since Siena will do all the thread work for us.
- *
- * TODO: Convert to a standardized logger
- *
- * @author Janak J Parekh
- * @version 1.0
- */
-public class AllSubscriber implements Notifiable {
-  private HierarchicalDispatcher hd = null;
-
-  public static void main(String[] args) {
-    if(args.length != 1) {
-      System.err.println("usage: java AllSubscriber <SENP URL>");
-      System.exit(-1);
-    }
-    new AllSubscriber(args[0]);
-  }
-
-  public AllSubscriber(String sienaHost) {
-    hd = new HierarchicalDispatcher();
-    try {
-      hd.setReceiver(new TCPPacketReceiver(0));
-      hd.setMaster(sienaHost);
-    } catch(Exception e) {
-      e.printStackTrace();
-    }
-
-    // Now super-subscribe
-    Filter f = new Filter();
-
-    try {
-      hd.subscribe(f, this);
-    } catch(Exception e) {
-      e.printStackTrace();
-    }
-
-    // Cleanup
-    Runtime.getRuntime().addShutdownHook(new Thread() {
-	public void run() {
-	  System.err.println("Shutting down..");
-	  hd.shutdown();
-	  return;
-	}
-      });
-
-    System.out.println("Ready.");
-  }
-
-  /**
-   * Get the hierarchicalDispatcher instance we use.
-   *
-   * @return The Hierarchical Dispatcher we're listening to.
-   */
-  public HierarchicalDispatcher getSiena() {
-    return hd;
-  }
-
-  public void notify(Notification n) {
-    System.out.println("Received event:" + n);
-  }
-
-  public void notify(Notification[] s) { ; }
-}
diff --git a/siena/utils/siena14/TestPublisher.java b/siena/utils/siena14/TestPublisher.java
deleted file mode 100644
index 308b886..0000000
--- a/siena/utils/siena14/TestPublisher.java
+++ /dev/null
@@ -1,50 +0,0 @@
-
-package psl.events.siena.utils.siena14;
-
-import siena.*;
-import siena.comm.*;
-
-/**
- * Simple test publisher, useful for testing a Siena.
- *
- * @author Janak J Parekh
- * @version 1.0
- */
-public class TestPublisher {
-  private HierarchicalDispatcher hd = null;
-
-  public static void main(String[] args) {
-    new TestPublisher(args);
-  }
-
-  public TestPublisher(String[] args) {
-    if(args.length==0) {
-      System.err.println("usage: java TestPublisher <SENP URL>");
-      System.exit(-1);
-    }
-    hd = new HierarchicalDispatcher();
-    try {
-      hd.setReceiver(new TCPPacketReceiver(0));
-      hd.setMaster(args[0]);
-    } catch(Exception e) {
-      e.printStackTrace();
-    }
-
-    System.out.println("publishing...");
-
-    // Now publish
-    Notification n = new Notification();
-    n.putAttribute("foo","bar");
-
-    try {
-      hd.publish(n);
-    } catch(Exception e) { e.printStackTrace(); }
-
-    System.out.println("shutting down...");
-
-    // If we don't sleep, Siena throws an exception... blargh
-    try { Thread.sleep(2000); } catch(Exception e) { ; }
-
-    hd.shutdown();
-  }
-}