[or-cvs] r15779: Remove RMI-related stuff from the original PuppeTor. Having (in puppetor/branches/gsoc2008: doc lib src/de/uniba/wiai/lspi/puppetor src/de/uniba/wiai/lspi/puppetor/examples src/de/uniba/wiai/lspi/puppetor/impl)

sebastian at seul.org sebastian at seul.org
Wed Jul 9 09:36:51 UTC 2008


Author: sebastian
Date: 2008-07-09 05:36:50 -0400 (Wed, 09 Jul 2008)
New Revision: 15779

Removed:
   puppetor/branches/gsoc2008/lib/groovy-all-1.0.jar
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/LongRunningNetwork.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/MergingRoutersWithLongRunningNetwork.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/groovy/
Modified:
   puppetor/branches/gsoc2008/doc/howto.tex
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ClientApplication.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/DirectoryNode.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventListener.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventManager.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/HiddenService.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/Network.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/NetworkFactory.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ProxyNode.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/RouterNode.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ServerApplication.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AccessingPublicWebServerOverTor.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPrivateTorNetwork.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPublicTorNetwork.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingHiddenServiceToPublicTorNetwork.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/EventManagerImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/HiddenServiceImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/NetworkImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ServerApplicationImpl.java
Log:
Remove RMI-related stuff from the original PuppeTor. Having RMI there is not necessary anymore, requires all PuppeTor Instances to be reachable, poses a security threat as nothing is authenticated or encrypted and adds complexity by making stuff throw RemoteException all over the place. Also remove the associated tests, the groovy lib, and the RMIPuppetzShell, as well as updating the relevant documentation

Modified: puppetor/branches/gsoc2008/doc/howto.tex
===================================================================
--- puppetor/branches/gsoc2008/doc/howto.tex	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/doc/howto.tex	2008-07-09 09:36:50 UTC (rev 15779)
@@ -1,71 +1,71 @@
-\documentclass{article}%
-\usepackage{graphicx}%
-\usepackage{url}%
-\usepackage{msc}%
-\begin{document}%
-%
-\author{karsten.loesing at gmx.net}%
-\title{PuppeTor\\A Java-based Tor Simulator\\User's Guide}%
-\maketitle%
-%
-
-\section{Introduction}
-
-PuppeTor\footnote{The name signifies the metaphor of a puppeteer playing with
-puppets like this framework plays with Tor processes.} is a Java framework that
-facilitates the
-configuration of a set of local Tor processes and the execution of automatic
-tests based on these processes. The intention is to make it easier for
-developers to
-analyze Tor's behavior in arbitrary network settings and to measure the
-effects of changes to the Tor source code. Due to the automation of
-configuration and execution, these experiments can be done in an unsupervised 
-batch fashion.
-
-An application that makes use of this framework starts with setting up a set of
-pre-defined Tor processes: proxy, router, and directory. Though these
-configurations should work in most settings, they can be altered by adding or
-removing configuration entries. After deciding whether the processes shall
-either create a private Tor network, or connect to the public Tor network,
-processes are started. Now the application can start clients and servers and
-perform requests using the local processes. In doing so, it can measure time
-intervals between events originating from Tor processes and it can synchronize 
-with such events.
-
-There are two typical situations in which this framework can be useful:
-\begin{enumerate}
-\item Developers need to oversee the effects of their changes to the source code.
-Therefore, it is useful to have a clean setting of Tor nodes in a private
-network, so that all nodes are under full control of the developer.
-\item Developers might want to measure the real-world performance of certain Tor
-operations. Hence, they can set up nodes at the edge of the public Tor network
-and conduct performance measurements, maybe in a batch of some hundreds or
-thousands of runs.
-\end{enumerate}
-
-Of course, the applications described here are possible without this framework.
-But this framework has certain advantages over writing own configuration files
-and test scripts:
-\begin{enumerate}
-\item It provides developers with pre-defined configurations of nodes.
-Especially the configuration of nodes in a private network with own directory
-nodes is not a trivial task.
-\item It takes away the need to implement synchronization of a test application
-with events created by Tor processes. This, too, is a non-trivial task and can,
-if not done properly, lead to deadlocks or inconsistent states.
-\item It relieves the developer from the task to collect and merge log files.
-Typically, every Tor process produces its own log file, so that all files might
-need to be merged in chronological order to identify causal dependencies.
-\end{enumerate}
-
-Originally this framework has been designed to perform experiments on Tor hidden
-services. But it should be feasible for experiments on onion routing and other
-Tor services, too. If you have found an alternative usage for it, and maybe
-have changed or extended it to support your own development, please feel free to
-contribute your additions. And please report bugs.
-
-\section{Installation}
-
+\documentclass{article}%
+\usepackage{graphicx}%
+\usepackage{url}%
+\usepackage{msc}%
+\begin{document}%
+%
+\author{karsten.loesing at gmx.net}%
+\title{PuppeTor\\A Java-based Tor Simulator\\User's Guide}%
+\maketitle%
+%
+
+\section{Introduction}
+
+PuppeTor\footnote{The name signifies the metaphor of a puppeteer playing with
+puppets like this framework plays with Tor processes.} is a Java framework that
+facilitates the
+configuration of a set of local Tor processes and the execution of automatic
+tests based on these processes. The intention is to make it easier for
+developers to
+analyze Tor's behavior in arbitrary network settings and to measure the
+effects of changes to the Tor source code. Due to the automation of
+configuration and execution, these experiments can be done in an unsupervised 
+batch fashion.
+
+An application that makes use of this framework starts with setting up a set of
+pre-defined Tor processes: proxy, router, and directory. Though these
+configurations should work in most settings, they can be altered by adding or
+removing configuration entries. After deciding whether the processes shall
+either create a private Tor network, or connect to the public Tor network,
+processes are started. Now the application can start clients and servers and
+perform requests using the local processes. In doing so, it can measure time
+intervals between events originating from Tor processes and it can synchronize 
+with such events.
+
+There are two typical situations in which this framework can be useful:
+\begin{enumerate}
+\item Developers need to oversee the effects of their changes to the source code.
+Therefore, it is useful to have a clean setting of Tor nodes in a private
+network, so that all nodes are under full control of the developer.
+\item Developers might want to measure the real-world performance of certain Tor
+operations. Hence, they can set up nodes at the edge of the public Tor network
+and conduct performance measurements, maybe in a batch of some hundreds or
+thousands of runs.
+\end{enumerate}
+
+Of course, the applications described here are possible without this framework.
+But this framework has certain advantages over writing own configuration files
+and test scripts:
+\begin{enumerate}
+\item It provides developers with pre-defined configurations of nodes.
+Especially the configuration of nodes in a private network with own directory
+nodes is not a trivial task.
+\item It takes away the need to implement synchronization of a test application
+with events created by Tor processes. This, too, is a non-trivial task and can,
+if not done properly, lead to deadlocks or inconsistent states.
+\item It relieves the developer from the task to collect and merge log files.
+Typically, every Tor process produces its own log file, so that all files might
+need to be merged in chronological order to identify causal dependencies.
+\end{enumerate}
+
+Originally this framework has been designed to perform experiments on Tor hidden
+services. But it should be feasible for experiments on onion routing and other
+Tor services, too. If you have found an alternative usage for it, and maybe
+have changed or extended it to support your own development, please feel free to
+contribute your additions. And please report bugs.
+
+\section{Installation}
+
 PuppeTor requires a Tor executable which can be downloaded from the Subversion
 repository on the Tor homepage. Though PuppeTor can also be used with the stable
 Tor versions, its primary intention is to be used for development, so that it
@@ -91,7 +91,7 @@
 
 Finally, you need to have a Java Runtime Environment version 5 or
 higher installed on your machine.
-
+
 \section{Examples}
 
 This user's guide takes the approach of stepwise introducing features by showing
@@ -99,670 +99,463 @@
 remaining features should be self-explanatory afterwards, maybe with a little
 help of the Javadocs.
 
-\subsection{Accessing a public web server over Tor}
-
-The easiest way to use Tor is to anonymously access a public web server. This is
+\subsection{Accessing a public web server over Tor}
+
+The easiest way to use Tor is to anonymously access a public web server. This is
 what we do in this first example.
 
-You can start the first example with the following command from the
+You can start the first example with the following command from the
 base directory of this framework:
 
-\begin{verbatim}
-java -cp bin:lib/torctl.jar
+\begin{verbatim}
+java -cp bin:lib/torctl.jar
     de.uniba.wiai.lspi.puppetor.examples.
-    AccessingPublicWebServerOverTor
-\end{verbatim}
-
+    AccessingPublicWebServerOverTor
+\end{verbatim}
+
 The network configuration consists only of one proxy node with an open
-SOCKS port and control port (every node needs to open its control
-port, so that we can communicate with it.)
-
-In the following, we will walk through the code that is necessary to configure
-this ``network'' and perform the request to a public web server.
-
-We start with obtaining a \texttt{Network} instance which is the central place
-for each test run:
-
-\begin{verbatim}
-Network network = NetworkFactory.createNetwork("example1");
-\end{verbatim}
-
+SOCKS port and control port (every node needs to open its control
+port, so that we can communicate with it.)
+
+In the following, we will walk through the code that is necessary to configure
+this ``network'' and perform the request to a public web server.
+
+We start with obtaining a \texttt{Network} instance which is the central place
+for each test run:
+
+\begin{verbatim}
+Network network = NetworkFactory.createNetwork("example1");
+\end{verbatim}
+
 Now we are ready to create the Tor proxy that we need to perform our request.
 The node will be assigned two port numbers for its SOCKS and control port
 automatically, starting at 7000 (can be changed for the network).
-The name is given for logging purposes and as event source name:
-
-\begin{verbatim}
-network.createProxy("proxy");
-\end{verbatim}
-
-As we are fine with the pre-defined configuration (at least for the moment), we
-can write the configurations of all nodes (which is only our proxy in this case)
-to \texttt{torrc} files in the nodes' working directories:
-
-\begin{verbatim}
-network.writeConfigurations();
-\end{verbatim}
-
+The name is given for logging purposes and as event source name:
+
+\begin{verbatim}
+network.createProxy("proxy");
+\end{verbatim}
+
+As we are fine with the pre-defined configuration (at least for the moment), we
+can write the configurations of all nodes (which is only our proxy in this case)
+to \texttt{torrc} files in the nodes' working directories:
+
+\begin{verbatim}
+network.writeConfigurations();
+\end{verbatim}
+
 Next we start the nodes of our network. (The reason for separating this step
 from the
-previous one is the possible investigation of the working directory content, if
-required.) Starting nodes can fail for some reason and block our application
-forever. Therefore, we can provide a timeout in milliseconds after which we
-consider the operation as failed. Starting nodes is considered to be complete as
+previous one is the possible investigation of the working directory content, if
+required.) Starting nodes can fail for some reason and block our application
+forever. Therefore, we can provide a timeout in milliseconds after which we
+consider the operation as failed. Starting nodes is considered to be complete as
 soon as all Tor nodes have opened their control ports and we have connected to
-them:
-
-\begin{verbatim}
-network.startNodes(5000);
-\end{verbatim}
-
-From time to time, Tor cannot create a circuit without some kind of launching
-assistance. Especially in a private-network setting, nodes need to reboot in
-order to refresh their directory information and be able to build circuits.
-Hence, we send the nodes a ``HUP'' signal in regular intervals until it tells us
-that it has opened a circuit. In the following operation we can configure how
+them:
+
+\begin{verbatim}
+network.startNodes(5000);
+\end{verbatim}
+
+From time to time, Tor cannot create a circuit without some kind of launching
+assistance. Especially in a private-network setting, nodes need to reboot in
+order to refresh their directory information and be able to build circuits.
+Hence, we send the nodes a ``HUP'' signal in regular intervals until it tells us
+that it has opened a circuit. In the following operation we can configure how
 often we want to send this signal (here: 5 times) and how long we want to wait
-in between (here: 10 seconds):
-
-\begin{verbatim}
-network.hupUntilUp(5, 10000);
-\end{verbatim}
-
-Now our Tor network is running.
-
-Next is the client that will perform requests using our proxy. PuppeTor contains
-a \texttt{ClientApplication} class which can start a thread to perform simple
+in between (here: 10 seconds):
+
+\begin{verbatim}
+network.hupUntilUp(5, 10000);
+\end{verbatim}
+
+Now our Tor network is running.
+
+Next is the client that will perform requests using our proxy. PuppeTor contains
+a \texttt{ClientApplication} class which can start a thread to perform simple
 HTTP GET requests to a given address and port. We provide it with the name that
 is used for logging purposes and as event source, the address and port to send
-the request to, and the SOCKS port of our proxy:
-
-\begin{verbatim}
-ClientApplication client = network.createClient("client",
-    "www.google.com", 80, proxy.getSocksPort());
-\end{verbatim}
-
-Before starting the request we want to register for events coming from this
-client. This is necessary as requests are performed in a separate thread in the
-background, which allows more complex applications to perform multiple requests
-in parallel. Therefore, we implement the interface \texttt{EventListener}
-and its method \texttt{handleEvent(Event)}. In this method we are interested in
-the two events \texttt{ClientEventType.CLIENT\_SENDING\_REQUEST} and
+the request to, and the SOCKS port of our proxy:
+
+\begin{verbatim}
+ClientApplication client = network.createClient("client",
+    "www.google.com", 80, proxy.getSocksPort());
+\end{verbatim}
+
+Before starting the request we want to register for events coming from this
+client. This is necessary as requests are performed in a separate thread in the
+background, which allows more complex applications to perform multiple requests
+in parallel. Therefore, we implement the interface \texttt{EventListener}
+and its method \texttt{handleEvent(Event)}. In this method we are interested in
+the two events \texttt{ClientEventType.CLIENT\_SENDING\_REQUEST} and
 \texttt{ClientEventType.CLIENT\_REPLY\_RECEIVED}.
-What we do with these events is
-application-specific. In our case we record the time of the first event and
-subtract it from the time of the second event to obtain the round-trip time of
-our request:
-
-\begin{verbatim}
+What we do with these events is
+application-specific. In our case we record the time of the first event and
+subtract it from the time of the second event to obtain the round-trip time of
+our request:
+
+\begin{verbatim}
 EventListener clientEventListener =
-    new EventListener() { // ... };
-\end{verbatim}
-
-Next we obtain a reference to the \texttt{EventManager} which handles all
-asynchronous events coming from the Tor processes:
-
-\begin{verbatim}
-EventManager manager = network.getEventManager();
-\end{verbatim}
-
+    new EventListener() { // ... };
+\end{verbatim}
+
+Next we obtain a reference to the \texttt{EventManager} which handles all
+asynchronous events coming from the Tor processes:
+
+\begin{verbatim}
+EventManager manager = network.getEventManager();
+\end{verbatim}
+
 We add our event handler to the event manager with the client name
-as event source:
-
-\begin{verbatim}
+as event source:
+
+\begin{verbatim}
 manager.addEventListener(client.getClientApplicationName(),
-    clientEventListener);
-\end{verbatim}
-
-Finally, we can perform the requests to the public server. Just in case that a
-request fails or times out, we state that we are willing to make three attempts
-with a timeout of 20 seconds each, and that further requests should be aborted
-as soon as one request succeeds (last parameter \texttt{true}).
-
-\begin{verbatim}
-client.performRequest(3, 20000, true);
-\end{verbatim}
-
-Due to the asynchronous performing of requests, we need to explicitly wait for
-the requests to be completed. We can do this by invoking a method on the event
-manager that blocks the invoking thread until a certain event is received. In
-this case we want to be blocked until the event
+    clientEventListener);
+\end{verbatim}
+
+Finally, we can perform the requests to the public server. Just in case that a
+request fails or times out, we state that we are willing to make three attempts
+with a timeout of 20 seconds each, and that further requests should be aborted
+as soon as one request succeeds (last parameter \texttt{true}).
+
+\begin{verbatim}
+client.performRequest(3, 20000, true);
+\end{verbatim}
+
+Due to the asynchronous performing of requests, we need to explicitly wait for
+the requests to be completed. We can do this by invoking a method on the event
+manager that blocks the invoking thread until a certain event is received. In
+this case we want to be blocked until the event
 \texttt{ClientEventType.CLIENT\_REQUESTS\_PERFORMED} is received from our
-client:
-
-\begin{verbatim}
-manager.waitForAnyOccurence(client,
-    ClientEventType.CLIENT_REQUESTS_PERFORMED);
-\end{verbatim}
-
-Next we shut down the network containing our proxy:
-
-\begin{verbatim}
-network.shutdownNodes();
-\end{verbatim}
+client:
 
+\begin{verbatim}
+manager.waitForAnyOccurence(client,
+    ClientEventType.CLIENT_REQUESTS_PERFORMED);
+\end{verbatim}
+
+Next we shut down the network containing our proxy:
+
+\begin{verbatim}
+network.shutdownNodes();
+\end{verbatim}
+
+%XXX This should no longer be necessary-SH
 At last we need to explicitly shut down the JVM. The reason is that some objects
 are accessible via RMI, and even though we are not using RMI in this examples,
 Java keeps a non-daemon thread running that prevents the JVM from exiting on
-its own.
+its own.
 
-\begin{verbatim}
+\begin{verbatim}
 System.exit(0);
-\end{verbatim}
+\end{verbatim}
 
 A typical output of example 1 might look like the following:
-
-\begin{verbatim}
+
+\begin{verbatim}
 Successfully started the node!
 Successfully built circuits!
 Request took 1228 milliseconds
-Goodbye.
-\end{verbatim}
-
-\subsection{Advertising hidden service to public Tor network}
-
+Goodbye.
+\end{verbatim}
+
+\subsection{Advertising hidden service to public Tor network}
+
 The second example (\texttt{AdvertisingHiddenServiceToPublicTorNetwork})
 advertises a hidden service to the public Tor network, but does not perform any
 requests to it. In fact this can be a useful test to measure publication times
-of rendezvous service descriptors.
-
-The network configuration again consists only of one proxy node.
-
-We start again with creating a network and a proxy node.
-
-\begin{verbatim}
-Network network = NetworkFactory.createNetwork("example2");
-ProxyNode proxy = network.createProxy("proxy");
-\end{verbatim}
-
-Next we extend the configuration of the proxy by a hidden service entry. The
+of rendezvous service descriptors.
+
+The network configuration again consists only of one proxy node.
+
+We start again with creating a network and a proxy node.
+
+\begin{verbatim}
+Network network = NetworkFactory.createNetwork("example2");
+ProxyNode proxy = network.createProxy("proxy");
+\end{verbatim}
+
+Next we extend the configuration of the proxy by a hidden service entry. The
 hidden service gets the name \texttt{hidServ} which is used for its working
 directory and for logging purposes. It expects that the real service will run
 on the next free port (here: \texttt{7002}) and announces to Tor
-clients that it runs on the virtual port 80 (default value):
-
-\begin{verbatim}
-proxy.addHiddenService("hidServ");
-\end{verbatim}
-
+clients that it runs on the virtual port 80 (default value):
+
+\begin{verbatim}
+proxy.addHiddenService("hidServ");
+\end{verbatim}
+
 The next step stays the same as in the previous example. We write the
-configuration of our proxy to its \texttt{torrc} file.
-
-\begin{verbatim}
-network.writeConfigurations();
-\end{verbatim}
-
-Before starting the proxy, we create and register an event listener that informs
-us about two events: when Tor opens a circuit
+configuration of our proxy to its \texttt{torrc} file.
+
+\begin{verbatim}
+network.writeConfigurations();
+\end{verbatim}
+
+Before starting the proxy, we create and register an event listener that informs
+us about two events: when Tor opens a circuit
 (\texttt{NodeEventType.NODE\_CIRCUIT\_OPENED}) and when it has published a
 rendezvous service descriptor
-(\texttt{HiddenServiceEventType.BOB\_DESC\_PUBLISHED\_RECEIVED}).
-
-\begin{verbatim}
+(\texttt{HiddenServiceEventType.BOB\_DESC\_PUBLISHED\_RECEIVED}).
+
+\begin{verbatim}
 EventListener proxyEventListener =
-    new EventListener() { // ... };
-\end{verbatim}
-
-Again we register this event listener at the event manager, but this time with
-the proxy as event subject.
-
-\begin{verbatim}
-EventManager manager = network.getEventManager();
-manager.addEventListener(proxy.getNodeName(),
-    proxyEventListener);
-\end{verbatim}
-
-The next steps are similar to the first example. We need to start the proxy and
-maybe send ``HUP'' signals until it has built a circuit.
-
-\begin{verbatim}
-network.startNodes(5000);
-network.hupUntilUp(5, 10000);
-\end{verbatim}
-
-As there is no event we could wait for, we fall asleep for two minutes to
-observe publication of rendezvous service descriptors.
-
-\begin{verbatim}
-Thread.sleep(2L * 60L * 1000L);
-\end{verbatim}
-
-At the end we shut down the proxy and the JVM.
-
-\begin{verbatim}
-network.shutdownNodes();
-System.exit(0);
-\end{verbatim}
-
-A typical output of example 2 might look like the following:
-
-\begin{verbatim}
-Successfully started the node!
-Successfully built circuits!
-Waiting for 2 minutes and observing RSD publications...
-RSD published 45128 milliseconds after first circuit was opened
-RSD published 51117 milliseconds after first circuit was opened
-RSD published 51118 milliseconds after first circuit was opened
-Goodbye.
-\end{verbatim}
-
-\subsection{Advertising and accessing hidden service over public Tor network}
-
-This third example
-(\texttt{AdvertisingAndAccessingHiddenServiceOverPublicTorNetwork}) is in fact
-the first for which this framework originally has
-been built. The setting consists of two proxies that are connected to the
-public Tor network, a server that is connected as hidden server to the first
-proxy, and a client that performs requests using the second proxy. This scenario
-can be used to measure real-world round-trip times for requests to hidden
-services.
-
-The network configuration consists of two proxy nodes and looks like this:
-\begin{itemize}
-\item Proxy \texttt{proxy1}.
-\item Proxy \texttt{proxy2}.
-\item Server that is registered as hidden server at \texttt{proxy1}.
-\item Client that performs requests using the SOCKS port of \texttt{proxy2}.
-\end{itemize}
-
-The example starts similar to the previous example with creating and configuring
-two proxy nodes. A hidden service is configured at the first proxy. Then
-configurations are written, nodes are started and HUP'ed until all of them have
-built a circuit.
-
-\begin{verbatim}
-Network network = NetworkFactory.createNetwork("example3");
-ProxyNode proxy1 = network.createProxy("proxy1");
-ProxyNode proxy2 = network.createProxy("proxy2");
-HiddenService hidServ1 = proxy1.addHiddenService("hidServ");
-network.writeConfigurations();
-network.startNodes(5000);
-network.hupUntilUp(5, 10000);
-\end{verbatim}
-
-In contrast to the previous example we want to wait until the first proxy has
-successfully uploaded a rendezvous service descriptor to the directory before
-performing a request. From experience we can say that hidden service
-initialization takes most part of the time. We want to wait for this event from
-the first proxy as source for at most 3 minutes:
-
-\begin{verbatim}
-EventManager manager = network.getEventManager();
-manager.waitForAnyOccurence(proxy1,
-    HiddenServiceEventType.BOB_DESC_PUBLISHED_RECEIVED
-    3L * 60L * 1000L);
-\end{verbatim}
-
-As soon as the first descriptor has been published, we can initialize both, 
-server and client. In contrast to the first example the client will perform an
-empty HTTP GET on the hidden server's onion address instead of a public web
-server. The server will answer with an empty HTTP OK:
-
-\begin{verbatim}
-ServerApplication server = network.createServer("server",
-    hidServ1.getServicePort());
-ClientApplication client = network.createClient("client",
-    hidServ1.determineOnionAddress(), hidServ1.getVirtualPort(),
-    proxy2.getSocksPort());
-\end{verbatim}
-
-For convenience we create a single event listener for both, client and server.
-It can distinguish client and server events by their type. We are interested in
-the events \texttt{ClientEventType.CLIENT\_SENDING\_REQUEST} which is fired
-from the
-client before sending a request,
-\texttt{ServerEventType.SERVER\_RECEIVING\_REQUEST\_SENDING\_REPLY}
-which is fired by the server when a request is received, and
-\texttt{ClientEventType.CLIENT\_REPLY\_RECEIVED}
-which is again fired by the client when it has received a reply. However, we
-need to register this event listener for both event sources, client and server.
-
-\begin{verbatim}
-EventListener clientAndServerEventListener =
-    new EventListener() { // ... };
-manager.addEventListener(client.getClientApplicationName(),
-    clientAndServerEventListener);
-manager.addEventListener(server.getServerApplicationName(),
-    clientAndServerEventListener);
-\end{verbatim}
-
-Now we instruct the server to listen for incoming requests and the client to
-perform such requests.
-
-\begin{verbatim}
-server.startListening();
-client.performRequest(5, 45000, true);
-\end{verbatim}
-
-We wait for the client to complete all requests.
-
-\begin{verbatim}
-manager.waitForAnyOccurence(client,
-    ClientEventType.CLIENT_REQUESTS_PERFORMED);
-\end{verbatim}
-
-Finally, we shut down all nodes and the JVM.
-
-\begin{verbatim}
-network.shutdownNodes();
-System.exit(0);
-\end{verbatim}
-
-A typical output of example 3 might look like the following:
-
-\begin{verbatim}
-Successfully started nodes!
-Successfully built circuits!
-Successfully published an RSD!
-Request took 14941 milliseconds from client to server!
-Request took 15927 milliseconds for the round-trip and
-    986 milliseconds from server to client!
-Goodbye.
-\end{verbatim}
-
-\subsection{Advertising and accessing hidden service over private Tor network}
-
-The fourth example
-(\texttt{AdvertisingAndAccessingHiddenServiceOverPrivateTorNetwork}) is a
-little more complex. It involves setting up a private
-Tor network including own directory nodes. The overall task stays the same as in
-the previous example: perform a request to a hidden service and see what
-happens. In this case performance does not mean too much, because there is
-no network latency on the local host. But in contrast to a public-network
-setting we could observe what happens on all routers and directory
-nodes during the request.
-
-The network configuration now consists of three router nodes, which are used for
-performing onion routing and misused as proxies, two directory nodes, a client,
-and a server:
-\begin{itemize}
-\item Router \texttt{router1}.
-\item Router \texttt{router2}.
-\item Router \texttt{router3}.
-\item Directory \texttt{dir1}.
-\item Directory \texttt{dir2}.
-\item Server that is registered as hidden server at \texttt{router1}.
-\item Client that performs requests using the SOCKS port of \texttt{router3}.
-\end{itemize}
-
-Creating and configuring these nodes is done similar to all previous examples
-and requires no further explanation:
-
-\begin{verbatim}
-Network network = NetworkFactory.createNetwork("example4");
-RouterNode router1 = network.createRouter("router1");
-network.createRouter("router2");
-RouterNode router3 = network.createRouter("router3");
-network.createDirectory("dir1");
-network.createDirectory("dir2");
-HiddenService hidServ1 = router1.addHiddenService("hidServ");
-\end{verbatim}
-
-However, the next step does require further explanation. The main difficulty
-of setting up a private Tor network
-lies in the fact that all nodes need to be configured so that they accept our
-own directory nodes instead of the pre-configured directory nodes from the
-public Tor network. This configuration requires the fingerprints of all
-directory nodes. These fingerprints are written to disk by the directory nodes
-as soon as they are started. But the directories need to be configured with
-these fingerprints before
-being started, too, in order to prevent them from becoming part of the public
-Tor network. And now we have the chicken or the egg dilemma.
-
-The non-trivial solution is to configure the directory nodes with a fake
-directory configuration and start them using the \texttt{--list-fingerprint}
-option. Hence they write a \texttt{fingerprint} file to disk and shut down
-immediately. This fingerprint can be read, and all nodes can be
-configured to use the directory using this fingerprint.
-
-A second, non-trivial task is to authorize routers and directory nodes.
-Therefore, an authoritative directory needs to know all fingerprints of
-authorized nodes, also before starting the directory nodes. They are stored in
-the \texttt{approved-routers} file in the
-working directory of the directory node.
-
-The complete configuration task is encapsulated in the following method for
-convenience.
-
-\begin{verbatim}
-network.configureAsPrivateNetwork();
-\end{verbatim}
-
-Afterwards, the process is more or less similar to the previous example:
-
-\begin{verbatim}
-network.writeConfigurations();
-network.startNodes(15000);
-network.hupUntilUp(10, 10000);
-EventManager manager = network.getEventManager();
-manager.waitForAnyOccurence(router1.getNodeName(),
-    HiddenServiceEventType.BOB_DESC_PUBLISHED_RECEIVED,
-    3L * 60L * 1000L);
-ServerApplication server = network.createServer("server",
-    hidServ1.getServicePort());
-ClientApplication client = network.createClient("client",
-    hidServ1.getServicePort(), hidServ1.getVirtualPort(),
-    router3.getSocksPort());
-EventListener clientAndServerEventListener =
-    new EventListener() { // ... };
-manager.addEventListener(client, clientAndServerEventListener);
-manager.addEventListener(server, clientAndServerEventListener);
-server.startListening();
-client.performRequest(5, 45000, true);
-manager.waitForAnyOccurence(client,
-    ClientEventType.CLIENT_REQUESTS_PERFORMED);
-network.shutdownNodes();
-\end{verbatim}
-
-A typical output of example 4 might look like the following:
-
-\begin{verbatim}
-Successfully started nodes!
-Successfully built circuits!
-Successfully published an RSD!
-Started server
-Handling event: Sending request.
-Handling event: Receiving request.
-Handling event: Received response.
-Handling event: Requests performed.
-Goodbye.
-\end{verbatim}
+    new EventListener() { // ... };
+\end{verbatim}
 
-\subsection{Controlling a network using the Groovy shell}
+Again we register this event listener at the event manager, but this time with
+the proxy as event subject.
 
-The first four examples demonstrated how PuppeTor can be used in a batch-like
-fashion. This fifth example (\texttt{LongRunningNetwork}) will show how to use
-it interactively by making a
-PuppeTor network accessible via RMI and connecting to it with a command shell
-that uses the Java-based script language Groovy.
+\begin{verbatim}
+EventManager manager = network.getEventManager();
+manager.addEventListener(proxy.getNodeName(),
+    proxyEventListener);
+\end{verbatim}
 
-Therefore, we change the fourth example so that it only creates a private
-network and makes it available via RMI. Apart from the last step these these
-steps don't require further explanation.
+The next steps are similar to the first example. We need to start the proxy and
+maybe send ``HUP'' signals until it has built a circuit.
 
 \begin{verbatim}
-Network network = NetworkFactory.createNetwork("example5");
-network.createRouter("router1");
-network.createRouter("router2");
-network.createRouter("router3");
-network.createDirectory("dir1");
-network.createDirectory("dir2");
-network.configureAsPrivateNetwork();
-network.writeConfigurations();
 network.startNodes(5000);
-network.hupUntilUp(10, 10000);
+network.hupUntilUp(5, 10000);
 \end{verbatim}
 
-The last step is to bind the \texttt{Network} object to a locally running RMI
-registry under its network name, so that it can be found by RMI clients:
+As there is no event we could wait for, we fall asleep for two minutes to
+observe publication of rendezvous service descriptors.
 
 \begin{verbatim}
-network.bindAtRmiregistry();
+Thread.sleep(2L * 60L * 1000L);
 \end{verbatim}
 
-Starting this example requires that the \texttt{rmiregistry} has been started
-on the local host before.
+At the end we shut down the proxy and the JVM.
 
-Further, Java needs two VM arguments, namely the
-location of an RMI policy file and the codebase:
+\begin{verbatim}
+network.shutdownNodes();
+System.exit(0);
+\end{verbatim}
 
-\begin{itemize}
-\item \verb+-Djava.security.policy=res/myrmipolicy+
-\item \verb+-Djava.rmi.server.codebase=file:///<puppetor-path>/bin/+
-\end{itemize}
+A typical output of example 2 might look like the following:
 
-The typical output of the first part of example 5 should look like the
-following:
-
 \begin{verbatim}
-Successfully started nodes!
+Successfully started the node!
 Successfully built circuits!
-Bound at rmiregistry to name "example5"!
-Waiting until the end of time... Interrupt with Ctrl-C!
+Waiting for 2 minutes and observing RSD publications...
+RSD published 45128 milliseconds after first circuit was opened
+RSD published 51117 milliseconds after first circuit was opened
+RSD published 51118 milliseconds after first circuit was opened
+Goodbye.
 \end{verbatim}
 
-Next, we can connect to the network from our Groovy shell. Groovy is a dynamic
-language that is based on Java with a lot of powerful extensions. Groovy
-commands can be interpreted and executed on the fly, and the Groovy shell
-can keep a state of bound variables to work with. A main advantage of using this
-shell is to interactively work with PuppeTor networks without the need to
-recompile and re-run the Java classes.
+\subsection{Advertising and accessing hidden service over public Tor network}
 
-The shell is started with the following command:
+This third example
+(\texttt{AdvertisingAndAccessingHiddenServiceOverPublicTorNetwork}) is in fact
+the first for which this framework originally has
+been built. The setting consists of two proxies that are connected to the
+public Tor network, a server that is connected as hidden server to the first
+proxy, and a client that performs requests using the second proxy. This scenario
+can be used to measure real-world round-trip times for requests to hidden
+services.
 
-\begin{verbatim}
-java -cp bin:lib/torctl.jar:lib/groovy-all-1.0.jar
-    de.uniba.wiai.lspi.puppetor.groovy.RmiPuppetzShell 
-\end{verbatim}
+The network configuration consists of two proxy nodes and looks like this:
+\begin{itemize}
+\item Proxy \texttt{proxy1}.
+\item Proxy \texttt{proxy2}.
+\item Server that is registered as hidden server at \texttt{proxy1}.
+\item Client that performs requests using the SOCKS port of \texttt{proxy2}.
+\end{itemize}
 
-The first thing to do is to connect to the already running network and bind it
-to a local variable:
+The example starts similar to the previous example with creating and configuring
+two proxy nodes. A hidden service is configured at the first proxy. Then
+configurations are written, nodes are started and HUP'ed until all of them have
+built a circuit.
 
 \begin{verbatim}
-network = shell.connectNetwork("127.0.0.1", "example5");
+Network network = NetworkFactory.createNetwork("example3");
+ProxyNode proxy1 = network.createProxy("proxy1");
+ProxyNode proxy2 = network.createProxy("proxy2");
+HiddenService hidServ1 = proxy1.addHiddenService("hidServ");
+network.writeConfigurations();
+network.startNodes(5000);
+network.hupUntilUp(5, 10000);
 \end{verbatim}
 
-Next, we want to add a hidden service to \texttt{router1}, rewrite its
-configuration and send it a HUP command to reload it:
+In contrast to the previous example we want to wait until the first proxy has
+successfully uploaded a rendezvous service descriptor to the directory before
+performing a request. From experience we can say that hidden service
+initialization takes most part of the time. We want to wait for this event from
+the first proxy as source for at most 3 minutes:
 
 \begin{verbatim}
-router1 = network.getNode("router1");
-hidServ1 = router1.addHiddenService("hidServ");
-router1.writeConfiguration();
-router1.hup();
+EventManager manager = network.getEventManager();
+manager.waitForAnyOccurence(proxy1,
+    HiddenServiceEventType.BOB_DESC_PUBLISHED_RECEIVED
+    3L * 60L * 1000L);
 \end{verbatim}
 
-Now we want to create a server that will listen on the service port of
-\texttt{hidServ1} and a client that will perform requests to that server:
+As soon as the first descriptor has been published, we can initialize both, 
+server and client. In contrast to the first example the client will perform an
+empty HTTP GET on the hidden server's onion address instead of a public web
+server. The server will answer with an empty HTTP OK:
 
 \begin{verbatim}
-server = network.createServer("server",
+ServerApplication server = network.createServer("server",
     hidServ1.getServicePort());
-client = network.createClient("client",
+ClientApplication client = network.createClient("client",
     hidServ1.determineOnionAddress(), hidServ1.getVirtualPort(),
-    router3.getSocksPort());
+    proxy2.getSocksPort());
 \end{verbatim}
 
-And finally, we let the server start listening and the client start performing
-requests to our hidden server:
+For convenience we create a single event listener for both, client and server.
+It can distinguish client and server events by their type. We are interested in
+the events \texttt{ClientEventType.CLIENT\_SENDING\_REQUEST} which is fired
+from the
+client before sending a request,
+\texttt{ServerEventType.SERVER\_RECEIVING\_REQUEST\_SENDING\_REPLY}
+which is fired by the server when a request is received, and
+\texttt{ClientEventType.CLIENT\_REPLY\_RECEIVED}
+which is again fired by the client when it has received a reply. However, we
+need to register this event listener for both event sources, client and server.
 
 \begin{verbatim}
-server.startListening();
-client.startRequests(5, 45000, true);
+EventListener clientAndServerEventListener =
+    new EventListener() { // ... };
+manager.addEventListener(client.getClientApplicationName(),
+    clientAndServerEventListener);
+manager.addEventListener(server.getServerApplicationName(),
+    clientAndServerEventListener);
 \end{verbatim}
 
-The result is a number of events that should contain the following events
-in the \texttt{example5} tab (without Tor log statements):
+Now we instruct the server to listen for incoming requests and the client to
+perform such requests.
 
 \begin{verbatim}
-Sending request.
-Receiving request.
-Received response.
-Requests performed.
+server.startListening();
+client.performRequest(5, 45000, true);
 \end{verbatim}
 
-\subsection{Merging two private networks via RMI}
+We wait for the client to complete all requests.
 
-The sixth example uses the RMI capability of PuppeTor to merge two network
-configurations, so that the Tor nodes in the two networks consider all nodes to
-be in a single private network. There are at least two applications for doing
-this:
-\begin{enumerate}
-\item In some situations Tor nodes
-need to be running for a certain time before a test can be executed. For
-example it is necessary that directory nodes in a private network are running
-for about 15 to 20 minutes before proxy nodes believe in the directory
-information they obtain from them. Therefore, one can run a
-long-term network and merge a short-running network with it
-that is only used for a single test.
-\item Some tests might require a big number of nodes which cannot be run on a
-single host. Therefore, the nodes could be distributed among multiple
-physical hosts to use their combined resources.
-\end{enumerate}
+\begin{verbatim}
+manager.waitForAnyOccurence(client,
+    ClientEventType.CLIENT_REQUESTS_PERFORMED);
+\end{verbatim}
 
-This sixth example requires the long-running network of \texttt{example5} to be
-still running,
-creates a second network of two router nodes, and merges it with the
-long-running network. Afterwards it provides a hidden service on the first
-router node and accesses it via the second router node.
+Finally, we shut down all nodes and the JVM.
 
-The example starts with configuring two router nodes, one of them providing a
-hidden service:
+\begin{verbatim}
+network.shutdownNodes();
+System.exit(0);
+\end{verbatim}
 
+A typical output of example 3 might look like the following:
+
 \begin{verbatim}
-Network network = NetworkFactory.createNetwork("example6", 7200);
-RouterNode router4 = network.createRouter("router4");
-RouterNode router5 = network.createRouter("router5");
-HiddenService hidServ1 = router4.addHiddenService("hidServ");
+Successfully started nodes!
+Successfully built circuits!
+Successfully published an RSD!
+Request took 14941 milliseconds from client to server!
+Request took 15927 milliseconds for the round-trip and
+    986 milliseconds from server to client!
+Goodbye.
 \end{verbatim}
 
-In the next step, we connect to the remote network and configure both networks
-to exchange directory strings and router fingerprints, so that the Tor nodes
-will consider all nodes to be part of a merged network:
+\subsection{Advertising and accessing hidden service over private Tor network}
 
+The fourth example
+(\texttt{AdvertisingAndAccessingHiddenServiceOverPrivateTorNetwork}) is a
+little more complex. It involves setting up a private
+Tor network including own directory nodes. The overall task stays the same as in
+the previous example: perform a request to a hidden service and see what
+happens. In this case performance does not mean too much, because there is
+no network latency on the local host. But in contrast to a public-network
+setting we could observe what happens on all routers and directory
+nodes during the request.
+
+The network configuration now consists of three router nodes, which are used for
+performing onion routing and misused as proxies, two directory nodes, a client,
+and a server:
+\begin{itemize}
+\item Router \texttt{router1}.
+\item Router \texttt{router2}.
+\item Router \texttt{router3}.
+\item Directory \texttt{dir1}.
+\item Directory \texttt{dir2}.
+\item Server that is registered as hidden server at \texttt{router1}.
+\item Client that performs requests using the SOCKS port of \texttt{router3}.
+\end{itemize}
+
+Creating and configuring these nodes is done similar to all previous examples
+and requires no further explanation:
+
 \begin{verbatim}
-Network remoteNetwork =
-    NetworkFactory.connectToNetwork("127.0.0.1", "example5");
-network.configureAsInterconnectedPrivateNetwork(remoteNetwork);
+Network network = NetworkFactory.createNetwork("example4");
+RouterNode router1 = network.createRouter("router1");
+network.createRouter("router2");
+RouterNode router3 = network.createRouter("router3");
+network.createDirectory("dir1");
+network.createDirectory("dir2");
+HiddenService hidServ1 = router1.addHiddenService("hidServ");
 \end{verbatim}
 
-Next, we have to rewrite the configurations of the remote nodes and make the
-directories reload their own configurations, including the extended
-\texttt{approved-routers} files:
+However, the next step does require further explanation. The main difficulty
+of setting up a private Tor network
+lies in the fact that all nodes need to be configured so that they accept our
+own directory nodes instead of the pre-configured directory nodes from the
+public Tor network. This configuration requires the fingerprints of all
+directory nodes. These fingerprints are written to disk by the directory nodes
+as soon as they are started. But the directories need to be configured with
+these fingerprints before
+being started, too, in order to prevent them from becoming part of the public
+Tor network. And now we have the chicken or the egg dilemma.
 
+The non-trivial solution is to configure the directory nodes with a fake
+directory configuration and start them using the \texttt{--list-fingerprint}
+option. Hence they write a \texttt{fingerprint} file to disk and shut down
+immediately. This fingerprint can be read, and all nodes can be
+configured to use the directory using this fingerprint.
+
+A second, non-trivial task is to authorize routers and directory nodes.
+Therefore, an authoritative directory needs to know all fingerprints of
+authorized nodes, also before starting the directory nodes. They are stored in
+the \texttt{approved-routers} file in the
+working directory of the directory node.
+
+The complete configuration task is encapsulated in the following method for
+convenience.
+
 \begin{verbatim}
-remoteNetwork.writeConfigurations();
-remoteNetwork.hupAllDirectories();
+network.configureAsPrivateNetwork();
 \end{verbatim}
 
-Now we can write the configurations of the nodes in the local network and start
-them as usual. Afterwards, we wait for the first rendezvous service descriptor
-to be published, before starting the server and performing the client requests.
-Finally, we shut down the local nodes:
+Afterwards, the process is more or less similar to the previous example:
 
 \begin{verbatim}
 network.writeConfigurations();
-network.startNodes(5000);
-network.hupUntilUp(20, 5000);
-manager.waitForAnyOccurence(router4.getNodeName(),
+network.startNodes(15000);
+network.hupUntilUp(10, 10000);
+EventManager manager = network.getEventManager();
+manager.waitForAnyOccurence(router1.getNodeName(),
     HiddenServiceEventType.BOB_DESC_PUBLISHED_RECEIVED,
     3L * 60L * 1000L);
 ServerApplication server = network.createServer("server",
     hidServ1.getServicePort());
 ClientApplication client = network.createClient("client",
-    hidServ1.determineOnionAddress(), hidServ1.getVirtualPort(),
-    router5.getSocksPort());
-EventManager manager = network.getEventManager();
-EventListener listener = new EventListener() { // ... };
-manager.addEventListener(listener);
+    hidServ1.getServicePort(), hidServ1.getVirtualPort(),
+    router3.getSocksPort());
+EventListener clientAndServerEventListener =
+    new EventListener() { // ... };
+manager.addEventListener(client, clientAndServerEventListener);
+manager.addEventListener(server, clientAndServerEventListener);
 server.startListening();
-client.startRequests(5, 45000, true);
-manager.waitForAnyOccurence(client.getClientApplicationName(),
+client.performRequest(5, 45000, true);
+manager.waitForAnyOccurence(client,
     ClientEventType.CLIENT_REQUESTS_PERFORMED);
 network.shutdownNodes();
 \end{verbatim}
 
-The output of this example should be equal to that of example 4:
+A typical output of example 4 might look like the following:
 
 \begin{verbatim}
 Successfully started nodes!
@@ -776,135 +569,129 @@
 Goodbye.
 \end{verbatim}
 
-This example can also be run with proxy nodes. However, in that case
-\texttt{example5} must be started at least 20 minutes before \texttt{example6}!
-Further, the directories in the remote network would neither have to rewrite
-their configurations nor be HUP'ed. The advantage of using proxies instead of
-routers is that they don't leave behind orphaned router descriptors as this
-example does.
-
-\section{Events and messages for hidden services}
-
-PuppeTor contains a number of pre-defined event types to observe how Tor behaves
-when setting up and accessing a hidden service. Therefore, PuppeTor parses the
-log statements coming from all started Tor processes and decides whether to fire
-an event or not. All necessary log statements are contained in the current Tor
+
+\section{Events and messages for hidden services}
+
+PuppeTor contains a number of pre-defined event types to observe how Tor behaves
+when setting up and accessing a hidden service. Therefore, PuppeTor parses the
+log statements coming from all started Tor processes and decides whether to fire
+an event or not. All necessary log statements are contained in the current Tor
 trunk on log level \texttt{INFO} or higher. Figure \ref{setup} shows the events
-and exchanged
-messages for setting up a hidden service, figure \ref{download} the descriptor
-download, and figure \ref{connect} the connection establishment.
-
-\begin{figure}
-\caption{Hidden service setup\label{setup}}
-\begin{msc}{Hidden service setup}
-\declinst{a}{Alice's OP}{}
-\declinst{r}{Rendezvous Point}{}
-\declinst{d}{Dir/HSDir}{}
-\declinst{i}{Introduction Point}{}
-\declinst{b}{Bob's OP}{}
-\action{BOB\_BUILT\_INTRO\_CIRC\_SENDING\_ESTABLISH\_INTRO}{b}
-\nextlevel[2]
-\mess{ESTABLISH\_INTRO}{b}{i}[1]
-\nextlevel[2]
-\action{IPO\_RECEIVED\_ESTABLISH\_INTRO\_SENDING\_INTRO\_ESTABLISHED}{i}
-\nextlevel[2]
-\mess{INTRO\_ESTABLISHED}{i}{b}[1]
-\nextlevel[2]
-\action{BOB\_INTRO\_ESTABLISHED\_RECEIVED}{b}
-\nextlevel[2]
-\action{BOB\_SENDING\_PUBLISH\_DESC}{b}
-\nextlevel[2]
-\mess{POST}{b}{d}[1]
-\nextlevel[2]
-\action{DIR\_PUBLISH\_DESC\_RECEIVED}{d}
-\nextlevel[2]
-\mess{OK}{d}{b}[1]
-\nextlevel[2]
-\action{BOB\_DESC\_PUBLISHED\_RECEIVED}{b}
-\nextlevel[2]
-\end{msc}
-\end{figure}
-
-\begin{figure}
-\caption{Hidden service decriptor download\label{download}}
-\begin{msc}{Hidden service decriptor download}
-\declinst{a}{Alice's OP}{}
-\declinst{r}{Rendezvous Point}{}
-\declinst{d}{Dir/HSDir}{}
-\declinst{i}{Introduction Point}{}
-\declinst{b}{Bob's OP}{}
-\action{ALICE\_ONION\_REQUEST\_RECEIVED}{a}
-\nextlevel[2]
-\action{ALICE\_SENDING\_FETCH\_DESC}{a}
-\nextlevel[2]
-\mess{GET}{a}{d}[1]
-\nextlevel[2]
-\action{DIR\_FETCH\_DESC\_RECEIVED}{d}
-\nextlevel[2]
-\mess{OK}{d}{a}[1]
-\nextlevel[2]
-\action{ALICE\_DESC\_FETCHED\_RECEIVED}{a}
-\nextlevel[2]
-\end{msc}
-\end{figure}
-
-\begin{figure}
-\caption{Hidden service connection establishment\label{connect}}
-\begin{msc}{Hidden service connection establishment}
-\declinst{a}{Alice's OP}{}
-\declinst{r}{Rendezvous Point}{}
-\declinst{d}{Dir/HSDir}{}
-\declinst{i}{Introduction Point}{}
-\declinst{b}{Bob's OP}{}
-\action{ALICE\_BUILT\_REND\_CIRC\_SENDING\_ESTABLISH\_RENDEZVOUS}{a}
-\nextlevel[2]
-\mess{ESTABLISH\_RENDEZVOUS}{a}{r}[1]
-\nextlevel[2]
-\action{RPO\_RECEIVED\_ESTABLISH\_RENDEZVOUS\_SENDING\_RENDEZVOUS\_ESTABLISHED}{r}
-\nextlevel[2]
-\mess{RENDEZVOUS\_ESTABLISHED}{r}{a}[1]
-\nextlevel[2]
-\action{ALICE\_RENDEZVOUS\_ESTABLISHED\_RECEIVED}{a}
-\nextlevel[2]
-\action{ALICE\_BUILT\_INTRO\_CIRC}{a}
-\nextlevel[2]
-\action{ALICE\_SENDING\_INTRODUCE1}{a}
-\nextlevel[2]
-\mess{INTRODUCE1}{a}{i}[1]
-\nextlevel[2]
-\action{IPO\_RECEIVED\_INTRODUCE1\_SENDING\_INTRODUCE2\_AND\_INTRODUCE\_ACK}{i}
-\nextlevel[2]
-\mess{INTRODUCE2}{i}{b}[1]
-\mess{INTRODUCE\_ACK}{i}{a}[1]
-\nextlevel[2]
-\action{ALICE\_INTRODUCE\_ACK\_RECEIVED}{a}
-\action{BOB\_INTRODUCE2\_RECEIVED}{b}
-\nextlevel[2]
-\action{BOB\_BUILT\_REND\_CIRC\_SENDING\_RENDEZVOUS1}{b}
-\nextlevel[2]
-\mess{RENDEZVOUS1}{b}{r}[1]
-\nextlevel[2]
-\action{RPO\_RECEIVING\_RENDEZVOUS1\_SENDING\_RENDEZVOUS2}{r}
-\nextlevel[2]
-\mess{RENDEZVOUS2}{r}{a}[1]
-\nextlevel[2]
-\action{ALICE\_RENDEZVOUS2\_RECEIVED\_APP\_CONN\_OPENED}{a}
-\nextlevel[2]
-\action{BOB\_APP\_CONN\_OPENED}{b}
-\nextlevel[2]
-\nextlevel
-\end{msc}
-\end{figure}
-
-\section{Known issues}
-
-There is a small list of problems and open questions that require more
-investigation:
-
-\begin{itemize}
-\item When logging to stdout is set to something lower than \texttt{notice}, the
-application does not succeed.
-\item Fight the TODOs\ldots
-\end{itemize}
-
+and exchanged
+messages for setting up a hidden service, figure \ref{download} the descriptor
+download, and figure \ref{connect} the connection establishment.
+
+\begin{figure}
+\caption{Hidden service setup\label{setup}}
+\begin{msc}{Hidden service setup}
+\declinst{a}{Alice's OP}{}
+\declinst{r}{Rendezvous Point}{}
+\declinst{d}{Dir/HSDir}{}
+\declinst{i}{Introduction Point}{}
+\declinst{b}{Bob's OP}{}
+\action{BOB\_BUILT\_INTRO\_CIRC\_SENDING\_ESTABLISH\_INTRO}{b}
+\nextlevel[2]
+\mess{ESTABLISH\_INTRO}{b}{i}[1]
+\nextlevel[2]
+\action{IPO\_RECEIVED\_ESTABLISH\_INTRO\_SENDING\_INTRO\_ESTABLISHED}{i}
+\nextlevel[2]
+\mess{INTRO\_ESTABLISHED}{i}{b}[1]
+\nextlevel[2]
+\action{BOB\_INTRO\_ESTABLISHED\_RECEIVED}{b}
+\nextlevel[2]
+\action{BOB\_SENDING\_PUBLISH\_DESC}{b}
+\nextlevel[2]
+\mess{POST}{b}{d}[1]
+\nextlevel[2]
+\action{DIR\_PUBLISH\_DESC\_RECEIVED}{d}
+\nextlevel[2]
+\mess{OK}{d}{b}[1]
+\nextlevel[2]
+\action{BOB\_DESC\_PUBLISHED\_RECEIVED}{b}
+\nextlevel[2]
+\end{msc}
+\end{figure}
+
+\begin{figure}
+\caption{Hidden service decriptor download\label{download}}
+\begin{msc}{Hidden service decriptor download}
+\declinst{a}{Alice's OP}{}
+\declinst{r}{Rendezvous Point}{}
+\declinst{d}{Dir/HSDir}{}
+\declinst{i}{Introduction Point}{}
+\declinst{b}{Bob's OP}{}
+\action{ALICE\_ONION\_REQUEST\_RECEIVED}{a}
+\nextlevel[2]
+\action{ALICE\_SENDING\_FETCH\_DESC}{a}
+\nextlevel[2]
+\mess{GET}{a}{d}[1]
+\nextlevel[2]
+\action{DIR\_FETCH\_DESC\_RECEIVED}{d}
+\nextlevel[2]
+\mess{OK}{d}{a}[1]
+\nextlevel[2]
+\action{ALICE\_DESC\_FETCHED\_RECEIVED}{a}
+\nextlevel[2]
+\end{msc}
+\end{figure}
+
+\begin{figure}
+\caption{Hidden service connection establishment\label{connect}}
+\begin{msc}{Hidden service connection establishment}
+\declinst{a}{Alice's OP}{}
+\declinst{r}{Rendezvous Point}{}
+\declinst{d}{Dir/HSDir}{}
+\declinst{i}{Introduction Point}{}
+\declinst{b}{Bob's OP}{}
+\action{ALICE\_BUILT\_REND\_CIRC\_SENDING\_ESTABLISH\_RENDEZVOUS}{a}
+\nextlevel[2]
+\mess{ESTABLISH\_RENDEZVOUS}{a}{r}[1]
+\nextlevel[2]
+\action{RPO\_RECEIVED\_ESTABLISH\_RENDEZVOUS\_SENDING\_RENDEZVOUS\_ESTABLISHED}{r}
+\nextlevel[2]
+\mess{RENDEZVOUS\_ESTABLISHED}{r}{a}[1]
+\nextlevel[2]
+\action{ALICE\_RENDEZVOUS\_ESTABLISHED\_RECEIVED}{a}
+\nextlevel[2]
+\action{ALICE\_BUILT\_INTRO\_CIRC}{a}
+\nextlevel[2]
+\action{ALICE\_SENDING\_INTRODUCE1}{a}
+\nextlevel[2]
+\mess{INTRODUCE1}{a}{i}[1]
+\nextlevel[2]
+\action{IPO\_RECEIVED\_INTRODUCE1\_SENDING\_INTRODUCE2\_AND\_INTRODUCE\_ACK}{i}
+\nextlevel[2]
+\mess{INTRODUCE2}{i}{b}[1]
+\mess{INTRODUCE\_ACK}{i}{a}[1]
+\nextlevel[2]
+\action{ALICE\_INTRODUCE\_ACK\_RECEIVED}{a}
+\action{BOB\_INTRODUCE2\_RECEIVED}{b}
+\nextlevel[2]
+\action{BOB\_BUILT\_REND\_CIRC\_SENDING\_RENDEZVOUS1}{b}
+\nextlevel[2]
+\mess{RENDEZVOUS1}{b}{r}[1]
+\nextlevel[2]
+\action{RPO\_RECEIVING\_RENDEZVOUS1\_SENDING\_RENDEZVOUS2}{r}
+\nextlevel[2]
+\mess{RENDEZVOUS2}{r}{a}[1]
+\nextlevel[2]
+\action{ALICE\_RENDEZVOUS2\_RECEIVED\_APP\_CONN\_OPENED}{a}
+\nextlevel[2]
+\action{BOB\_APP\_CONN\_OPENED}{b}
+\nextlevel[2]
+\nextlevel
+\end{msc}
+\end{figure}
+
+\section{Known issues}
+
+There is a small list of problems and open questions that require more
+investigation:
+
+\begin{itemize}
+\item When logging to stdout is set to something lower than \texttt{notice}, the
+application does not succeed.
+\item Fight the TODOs\ldots
+\end{itemize}
+
 \end{document} 

Deleted: puppetor/branches/gsoc2008/lib/groovy-all-1.0.jar
===================================================================
(Binary files differ)

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ClientApplication.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ClientApplication.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ClientApplication.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,9 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor;
 
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
 /**
  * The <code>ClientApplication</code> can be used to simulate simple
  * <code>HTTP GET</code> requests by a virtual local client. Therefore, an
@@ -43,7 +40,7 @@
  * 
  * @author kloesing
  */
-public interface ClientApplication extends Remote {
+public interface ClientApplication {
 
 	/**
 	 * <p>
@@ -85,57 +82,45 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract void startRequests(int retries, long timeoutForEachRetry,
-			boolean stopOnSuccess) throws RemoteException;
+			boolean stopOnSuccess);
 
 	/**
 	 * Stops all requests that are currently running.
 	 * 
 	 * @throws IllegalStateException
 	 *             Thrown if no requests have been started before.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void stopRequest() throws RemoteException;
+	public abstract void stopRequest();
 
 	/**
 	 * Returns the name of this client.
 	 * 
 	 * @return The name of this client.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String getClientApplicationName() throws RemoteException;
+	public abstract String getClientApplicationName();
 
 	/**
 	 * Returns the SOCKS port of the local Tor node to which requests are sent.
 	 * 
 	 * @return The SOCKS port of the local Tor node to which requests are sent.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract int getSocksPort() throws RemoteException;
+	public abstract int getSocksPort();
 
 	/**
 	 * Returns the target name for the requests sent by this client; can be
 	 * either a server name/address or an onion address.
 	 * 
 	 * @return The target name for the requests sent by this client.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String getTargetName() throws RemoteException;
+	public abstract String getTargetName();
 
 	/**
 	 * Returns the target port for the requests sent by this client; can be
 	 * either a server port or a virtual port of a hidden service.
 	 * 
 	 * @return The target port for the requests sent by this client.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract int getTargetPort() throws RemoteException;
+	public abstract int getTargetPort();
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/DirectoryNode.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/DirectoryNode.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/DirectoryNode.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,7 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor;
 
-import java.rmi.RemoteException;
 import java.util.Set;
 
 /**
@@ -55,11 +54,8 @@
 	 * @throws PuppeTorException
 	 *             Thrown if a problem occurs when determining the fingerprint
 	 *             of this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String getDirServerString() throws PuppeTorException,
-			RemoteException;
+	public abstract String getDirServerString() throws PuppeTorException;
 
 	/**
 	 * Adds the given (possibly empty) set of onion router fingerprints to the
@@ -74,9 +70,6 @@
 	 *            <code>nickname 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000</code>.
 	 * @throws IllegalArgumentException
 	 *             Thrown if <code>null</code> is passed as parameter.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public void addApprovedRouters(Set<String> approvedRouters)
-			throws RemoteException;
+	public void addApprovedRouters(Set<String> approvedRouters);
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventListener.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventListener.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventListener.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -1,56 +1,51 @@
-/*
- * Copyright (c) 2007, Karsten Loesing
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 
- *     * Neither the names of the copyright owners nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package de.uniba.wiai.lspi.puppetor;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * This interface must be implemented by any object in a test application that
- * shall be registered as event listener.
- * 
- * @author kloesing
- */
-public interface EventListener extends Remote {
-
-	/**
-	 * Is invoked when an asynchronous event is fired by the source (or one of
-	 * the sources) for which this listener was registered.
-	 * 
-	 * @param event
-	 *            The event that was fired.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
-	 */
-	public void handleEvent(Event event) throws RemoteException;
-
-}
+/*
+ * Copyright (c) 2007, Karsten Loesing
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 
+ *     * Neither the names of the copyright owners nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package de.uniba.wiai.lspi.puppetor;
+
+/**
+ * This interface must be implemented by any object in a test application that
+ * shall be registered as event listener.
+ * 
+ * @author kloesing
+ */
+public interface EventListener {
+
+	/**
+	 * Is invoked when an asynchronous event is fired by the source (or one of
+	 * the sources) for which this listener was registered.
+	 * 
+	 * @param event
+	 *            The event that was fired.
+	 */
+	public void handleEvent(Event event);
+
+}

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventManager.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventManager.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/EventManager.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor;
 
-import java.rmi.Remote;
-import java.rmi.RemoteException;
 import java.util.List;
 
 /**
@@ -44,7 +42,7 @@
  * 
  * @author kloesing
  */
-public interface EventManager extends Remote {
+public interface EventManager {
 
 	/**
 	 * Registers the given <code>listener</code> as event listener for events
@@ -73,11 +71,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if <code>null</code> is passed for either of the
 	 *             parameters or if the <code>source</code> is unknown.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract List<Event> addEventListener(String source,
-			EventListener listener) throws RemoteException;
+			EventListener listener);
 
 	/**
 	 * Registers the given <code>listener</code> as event listener for future
@@ -91,11 +87,8 @@
 	 *            invocations for the same event. May not be <code>null</code>.
 	 * @throws IllegalArgumentException
 	 *             Thrown if <code>null</code> is passed for the parameter.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void addEventListener(EventListener listener)
-			throws RemoteException;
+	public abstract void addEventListener(EventListener listener);
 
 	/**
 	 * Returns the list of all previously observed events from the given
@@ -110,11 +103,8 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if <code>null</code> is passed as parameter or if
 	 *             the <code>source</code> is unknown.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract List<Event> getEventHistory(String source)
-			throws RemoteException;
+	public abstract List<Event> getEventHistory(String source);
 
 	/**
 	 * Returns whether the given <code>eventType</code> has been observed from
@@ -132,11 +122,8 @@
 	 *             parameters or if <code>source</code> is unknown.
 	 * @return <code>true</code> if the event has been observed from the
 	 *         source before, <code>false</code> otherwise.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract boolean hasEventOccured(String source, EventType eventType)
-			throws RemoteException;
+	public abstract boolean hasEventOccured(String source, EventType eventType);          
 
 	/**
 	 * Removes the given <code>listener</code> as event listener from all
@@ -148,11 +135,8 @@
 	 *            listeners. May not be <code>null</code>.
 	 * @throws IllegalArgumentException
 	 *             Thrown if <code>null</code> is passed as parameter.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void removeEventListener(EventListener listener)
-			throws RemoteException;
+	public abstract void removeEventListener(EventListener listener);
 
 	/**
 	 * Checks if the given <code>eventType</code> has been observed from the
@@ -172,11 +156,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if <code>null</code> is passed for either of the
 	 *             parameters or if the <code>source</code> is unknown.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void waitForAnyOccurence(String source, EventType eventType)
-			throws RemoteException;
+	public abstract void waitForAnyOccurence(String source,
+			EventType eventType);
 
 	/**
 	 * Checks if the given <code>eventType</code> has been observed from the
@@ -203,12 +185,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is passed for either of the
 	 *             parameters or if the <code>source</code> is unknown.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract boolean waitForAnyOccurence(String source,
-			EventType eventType, long maximumTimeToWaitInMillis)
-			throws RemoteException;
+			EventType eventType, long maximumTimeToWaitInMillis);
 
 	/**
 	 * Blocks the invoking thread until the next <code>event</code> is fired
@@ -228,11 +207,8 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if <code>null</code> is passed for either of the
 	 *             parameters or if the <code>source</code> is unknown.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void waitForNextOccurence(String source, EventType eventType)
-			throws RemoteException;
+	public abstract void waitForNextOccurence(String source, EventType eventType);
 
 	/**
 	 * Blocks the invoking thread until the next <code>event</code> is fired
@@ -259,12 +235,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is passed for either of the
 	 *             parameters or if the <code>source</code> is unknown.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract boolean waitForNextOccurence(String source,
-			EventType eventType, long maximumTimeToWaitInMillis)
-			throws RemoteException;
+			EventType eventType, long maximumTimeToWaitInMillis);
 
 	/**
 	 * Registers a new event type by passing a pattern string that can be
@@ -279,9 +252,7 @@
 	 * @param eventType
 	 *            The event type of the event that will be fired when a log
 	 *            statement was parsed that includes the given pattern.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract void registerEventTypePattern(String patternString,
-			EventType eventType) throws RemoteException;
+			EventType eventType);
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/HiddenService.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/HiddenService.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/HiddenService.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -1,15 +1,12 @@
 package de.uniba.wiai.lspi.puppetor;
 
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
 /**
  * A <code>HiddenService</code> instance contains all configurations of a
  * hidden service that is registered at a node.
  * 
  * @author kloesing
  */
-public interface HiddenService extends Remote {
+public interface HiddenService {
 
 	/**
 	 * Determines the onion address for a previously added hidden service with
@@ -32,37 +29,28 @@
 	 *             be read, which is also the case when the node's configuration
 	 *             has not been written and the node has not been HUP'ed after
 	 *             configuring the hidden service.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String determineOnionAddress() throws PuppeTorException,
-			RemoteException;
+	public abstract String determineOnionAddress() throws PuppeTorException;
 
 	/**
 	 * Returns the name of the hidden service.
 	 * 
 	 * @return The name of the hidden service.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public String getServiceName() throws RemoteException;
+	public String getServiceName();
 
 	/**
 	 * Returns the port on which the service listens for requests.
 	 * 
 	 * @return The port on which the service listens for requests.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public int getServicePort() throws RemoteException;
+	public int getServicePort();
 
 	/**
 	 * Returns the virtual port that this hidden service runs on as it is
 	 * announced to clients.
 	 * 
 	 * @return The virtual port of this hidden service.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public int getVirtualPort() throws RemoteException;
+	public int getVirtualPort();
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/Network.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/Network.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/Network.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -32,8 +32,6 @@
 package de.uniba.wiai.lspi.puppetor;
 
 import java.io.File;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
 import java.util.List;
 import java.util.Map;
 
@@ -46,7 +44,7 @@
  * 
  * @author kloesing
  */
-public interface Network extends Remote {
+public interface Network {
 
 	/**
 	 * <p>
@@ -91,67 +89,10 @@
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while determining the nodes'
 	 *             fingerprints.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void configureAsPrivateNetwork() throws PuppeTorException,
-			RemoteException;
+	public abstract void configureAsPrivateNetwork() throws PuppeTorException;
 
 	/**
-	 * <p>
-	 * Merges this network with another private Tor network by exchanging
-	 * directory strings and router fingerprints. Afterwards, the nodes in both
-	 * networks will consider the two networks a single, larger private Tor
-	 * network.
-	 * </p>
-	 * 
-	 * <p>
-	 * The configuration is done in two steps:
-	 * <ol>
-	 * <li>Directory strings of all directory nodes in this network are added
-	 * to the configurations of all nodes in the other network and vice versa.</li>
-	 * <li>Router fingerprints of all router and directory nodes in this
-	 * network are added to the <code>approved-routers</code> files of all
-	 * directory nodes in the other network and vice versa.</li>
-	 * </ol>
-	 * </p>
-	 * 
-	 * <p>
-	 * This operation may be invoked in any state of the contained nodes.
-	 * However, a network that does not have directory nodes of its own but
-	 * relies on directory nodes of a merged network <b>should not be started
-	 * before merging!</b> Otherwise it would connect to the public Tor network
-	 * before being merged with the other private Tor network. However, it may
-	 * also be invoked at a later time, e.g. to admit new nodes.
-	 * </p>
-	 * 
-	 * <p>
-	 * This operation does not write any configurations to disk and neither
-	 * starts a nodes nor sends HUP signals to running nodes. These operations
-	 * are left to the application, so that they have more control over the
-	 * network behavior.
-	 * </p>
-	 * 
-	 * <p>
-	 * Note that this operation is only effective if there are directory nodes
-	 * in either of the two networks. Otherwise, no information will be
-	 * exchanged between the two networks. Applications need to ensure that
-	 * there are in total enough directory nodes (2) and router nodes (3) in
-	 * both networks to allow normal operation.
-	 * </p>
-	 * 
-	 * @param remoteNetwork
-	 *            The remote network to merge this network with.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
-	 * @throws PuppeTorException
-	 *             Thrown if an I/O problem occurs while reading directory
-	 *             strings or router fingerprints, while writing the new
-	 */
-	public abstract void configureAsInterconnectedPrivateNetwork(
-			Network remoteNetwork) throws RemoteException, PuppeTorException;
-
-	/**
 	 * Creates a new client application, but does not yet perform a request.
 	 * 
 	 * @param clientApplicationName
@@ -176,12 +117,10 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract ClientApplication createClient(
 			String clientApplicationName, String targetAddress, int targetPort,
-			int socksPort) throws RemoteException;
+			int socksPort);
 
 	/**
 	 * Creates a new directory node with automatically assigned ports and adds
@@ -197,11 +136,8 @@
 	 * @return Reference to the created directory node.
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given as node name.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract DirectoryNode createDirectory(String nodeName)
-			throws RemoteException;
+	public abstract DirectoryNode createDirectory(String nodeName);
 
 	/**
 	 * Creates a new directory node with automatically assigned ports that will
@@ -222,11 +158,9 @@
 	 * @return Reference to the created directory node.
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given as node name.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract DirectoryNode createDirectory(String nodeName,
-			String serverIpAddress) throws RemoteException;
+			String serverIpAddress);
 
 	/**
 	 * Creates a new directory node and adds it to the network, but does not yet
@@ -257,12 +191,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract DirectoryNode createDirectory(String nodeName,
-			int controlPort, int socksPort, int orPort, int dirPort)
-			throws RemoteException;
+			int controlPort, int socksPort, int orPort, int dirPort);
 
 	/**
 	 * Creates a new directory node that will listen on the given IP address and
@@ -298,12 +229,10 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract DirectoryNode createDirectory(String nodeName,
 			int controlPort, int socksPort, int orPort, int dirPort,
-			String serverIpAddress) throws RemoteException;
+			String serverIpAddress);
 
 	/**
 	 * Creates a new <code>ProxyNode</code> with automatically assigned ports
@@ -319,11 +248,8 @@
 	 * @return Reference to the created proxy node.
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given as node name.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract ProxyNode createProxy(String nodeName)
-			throws RemoteException;
+	public abstract ProxyNode createProxy(String nodeName);
 
 	/**
 	 * Creates a new <code>ProxyNode</code> and adds it to the network, but
@@ -347,11 +273,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract ProxyNode createProxy(String nodeName, int controlPort,
-			int socksPort) throws RemoteException;
+			int socksPort);
 
 	/**
 	 * Creates a new <code>RouterNode</code> with automatically assigned ports
@@ -367,11 +291,8 @@
 	 * @return Reference to the created router node.
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given as node name.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract RouterNode createRouter(String nodeName)
-			throws RemoteException;
+	public abstract RouterNode createRouter(String nodeName);
 
 	/**
 	 * Creates a new <code>RouterNode</code> and adds it to the network, but
@@ -404,11 +325,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract RouterNode createRouter(String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort) throws RemoteException;
+			int socksPort, int orPort, int dirPort);
 
 	/**
 	 * Creates a new <code>RouterNode</code> with automatically assigned ports
@@ -429,11 +348,9 @@
 	 * @return Reference to the created router node.
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given as node name.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract RouterNode createRouter(String nodeName,
-			String serverIpAddress) throws RemoteException;
+			String serverIpAddress);
 
 	/**
 	 * Creates a new <code>RouterNode</code> that will listen on the given IP
@@ -470,12 +387,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract RouterNode createRouter(String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort, String serverIpAddress)
-			throws RemoteException;
+			int socksPort, int orPort, int dirPort, String serverIpAddress);
 
 	/**
 	 * Creates a new <code>ServerApplication</code> with automatically
@@ -490,11 +404,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given as server application
 	 *             name.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract ServerApplication createServer(String serverApplicationName)
-			throws RemoteException;
+	public abstract ServerApplication createServer(
+	       String serverApplicationName);
 
 	/**
 	 * Creates a new <code>ServerApplication</code>, but does not start
@@ -512,32 +424,24 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract ServerApplication createServer(
-			String serverApplicationName, int serverPort)
-			throws RemoteException;
+			String serverApplicationName, int serverPort);
 
 	/**
 	 * Returns a reference on the (single) event manager for this network.
 	 * 
 	 * @return Reference on the (single) event manager for this network.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract EventManager getEventManager() throws RemoteException;
+	public abstract EventManager getEventManager();
 
 	/**
 	 * Returns (a copy of) the map containing the names of all directory nodes
 	 * as keys and the corresponding directory nodes as values.
 	 * 
 	 * @return Map containing all directory nodes.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract Map<String, DirectoryNode> getAllDirectoryNodes()
-			throws RemoteException;
+	public abstract Map<String, DirectoryNode> getAllDirectoryNodes();
 
 	/**
 	 * Returns (a copy of) the map containing the names of all router nodes
@@ -545,11 +449,8 @@
 	 * keys and the corresponding router nodes as values.
 	 * 
 	 * @return Map containing all router nodes.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract Map<String, RouterNode> getAllRouterNodes()
-			throws RemoteException;
+	public abstract Map<String, RouterNode> getAllRouterNodes();
 
 	/**
 	 * Returns (a copy of) the map containing the names of all proxy nodes (only
@@ -557,21 +458,16 @@
 	 * as keys and the corresponding proxy nodes as values.
 	 * 
 	 * @return Map containing all proxy nodes.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract Map<String, ProxyNode> getAllProxyNodes()
-			throws RemoteException;
+	public abstract Map<String, ProxyNode> getAllProxyNodes();
 
 	/**
 	 * Returns (a copy of) the map containing the names of all nodes as keys and
 	 * the corresponding proxy nodes as values.
 	 * 
 	 * @return Map containing all nodes.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract Map<String, ProxyNode> getAllNodes() throws RemoteException;
+	public abstract Map<String, ProxyNode> getAllNodes();
 
 	/**
 	 * Returns the node with name <code>nodeName</code> or <code>null</code>
@@ -580,10 +476,8 @@
 	 * @param nodeName
 	 *            The node name to look up.
 	 * @return The node with name <code>nodeName</code>.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract ProxyNode getNode(String nodeName) throws RemoteException;
+	public abstract ProxyNode getNode(String nodeName);
 
 	/**
 	 * <p>
@@ -627,11 +521,9 @@
 	 *             Thrown if an I/O problem occurs while sending HUP signals.
 	 * @return <code>true</code> if all nodes have reported to have
 	 *         successfully opened a circuit, <code>false</code> otherwise.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract boolean hupUntilUp(int tries, long hupInterval)
-			throws PuppeTorException, RemoteException;
+			throws PuppeTorException;
 
 	/**
 	 * Sends a HUP signal to all nodes in the network once. This operation can
@@ -643,11 +535,8 @@
 	 *             <code>NodeState.RUNNING</code>.
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while sending HUP signals.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void hupAllNodes() throws PuppeTorException,
-			RemoteException;
+	public abstract void hupAllNodes() throws PuppeTorException;
 
 	/**
 	 * Sends a HUP signal to all directory nodes in the network once. This
@@ -659,11 +548,8 @@
 	 *             <code>NodeState.RUNNING</code>.
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while sending HUP signals.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void hupAllDirectories() throws PuppeTorException,
-			RemoteException;
+	public abstract void hupAllDirectories() throws PuppeTorException;
 
 	/**
 	 * Attempts to shut down all running nodes. The method blocks until all
@@ -675,11 +561,8 @@
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while shutting down the
 	 *             nodes.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void shutdownNodes() throws PuppeTorException,
-			RemoteException;
+	public abstract void shutdownNodes() throws PuppeTorException;
 
 	/**
 	 * Attempts to start all nodes within a given timeout of
@@ -704,11 +587,9 @@
 	 *             <code>maximumTimeToWaitInMillis</code>.
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while starting the nodes.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract boolean startNodes(long maximumTimeToWaitInMillis)
-			throws PuppeTorException, RemoteException;
+			throws PuppeTorException;
 
 	/**
 	 * Writes the configurations for all nodes in the network to disk, including
@@ -720,21 +601,16 @@
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while writing to the nodes'
 	 *             working directories.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void writeConfigurations() throws PuppeTorException,
-			RemoteException;
+	public abstract void writeConfigurations() throws PuppeTorException;
 
 	/**
 	 * Returns the working directory of this network configuration which is in
 	 * <code>test-env/networkName/</code>.
 	 * 
 	 * @return Working directory of this network.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract File getWorkingDirectory() throws RemoteException;
+	public abstract File getWorkingDirectory();
 
 	/**
 	 * Returns all configuration strings of the template of a node class that
@@ -749,11 +625,9 @@
 	 * @return The template configuration for the given node class.
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for the parameter.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract List<String> getTemplateConfiguration(
-			Class<? extends ProxyNode> nodeClass) throws RemoteException;
+			Class<? extends ProxyNode> nodeClass);
 
 	/**
 	 * Adds a configuration string to the template of a node class, so that it
@@ -769,12 +643,10 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract void addTemplateConfiguration(
 			Class<? extends ProxyNode> nodeClass,
-			String templateConfigurationString) throws RemoteException;
+			String templateConfigurationString);
 
 	/**
 	 * Removes a configuration string from the template of a node class, so that
@@ -790,35 +662,16 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract void removeTemplateConfiguration(
 			Class<? extends ProxyNode> nodeClass,
-			String templateConfigurationKey) throws RemoteException;
+			String templateConfigurationKey);
 
 	/**
 	 * Returns the name of this network.
 	 * 
 	 * @return The name of this network.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String getNetworkName() throws RemoteException;
+	public abstract String getNetworkName();
 
-	/**
-	 * Binds the network at the local <code>rmiregistry</code> to make it
-	 * remotely available and returns whether binding was successful.
-	 * 
-	 * @return <code>true</code> if binding was successful, <code>false</code>
-	 *         otherwise.
-	 * @throws PuppeTorException
-	 *             Thrown if an error occurs while binding to the
-	 *             <code>rmiregistry</code>.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely (though this
-	 *             might never happen as the object is not bound, yet).
-	 */
-	public abstract boolean bindAtRmiregistry() throws RemoteException;
-
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/NetworkFactory.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/NetworkFactory.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/NetworkFactory.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,11 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor;
 
-import java.net.MalformedURLException;
-import java.rmi.Naming;
-import java.rmi.NotBoundException;
-import java.rmi.RemoteException;
-
 import de.uniba.wiai.lspi.puppetor.impl.NetworkImpl;
 
 /**
@@ -62,11 +57,8 @@
 	 * @param networkName
 	 *            Name of this network configuration.
 	 * @return A new network instance.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public static Network createNetwork(String networkName)
-			throws RemoteException {
+	public static Network createNetwork(String networkName) {
 		return new NetworkImpl(networkName);
 	}
 
@@ -86,44 +78,9 @@
 	 *            to the maximum number port <code>65535</code> for all
 	 *            created nodes.
 	 * @return A new network instance.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public static Network createNetwork(String networkName, int startPort)
-			throws RemoteException {
+	public static Network createNetwork(String networkName, int startPort) {
 		return new NetworkImpl(networkName, startPort);
 	}
 
-	/**
-	 * Connects to a remote network and returns a reference on it.
-	 * 
-	 * @param remoteHost
-	 *            The IP address and port of the remote <code>rmiregistry</code>.
-	 * @param bindingName
-	 *            The name under which the other network is bound at the remote
-	 *            <code>rmiregistry</code>.
-	 * @return Reference on the remote network.
-	 * @throws PuppeTorException
-	 *             Thrown if an error occurs when looking up the remote network
-	 *             at the remote <code>rmiregistry</code>.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
-	 */
-	public static Network connectToNetwork(String remoteHost, String bindingName)
-			throws PuppeTorException, RemoteException {
-		Network remoteNetwork = null;
-		try {
-			remoteNetwork = (Network) Naming.lookup("rmi://" + remoteHost + "/"
-					+ bindingName);
-		} catch (MalformedURLException e) {
-			PuppeTorException ex = new PuppeTorException(
-					"Cannot connect to remote network!", e);
-			throw ex;
-		} catch (NotBoundException e) {
-			PuppeTorException ex = new PuppeTorException(
-					"Cannot connect to remote network!", e);
-			throw ex;
-		}
-		return remoteNetwork;
-	}
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ProxyNode.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ProxyNode.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ProxyNode.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor;
 
-import java.rmi.Remote;
-import java.rmi.RemoteException;
 import java.util.List;
 
 /**
@@ -70,7 +68,7 @@
  * 
  * @author kloesing
  */
-public interface ProxyNode extends Remote {
+public interface ProxyNode {
 
 	/**
 	 * Adds the entries for a hidden service to the configuration of this node.
@@ -93,11 +91,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract HiddenService addHiddenService(String serviceName,
-			int servicePort, int virtualPort) throws RemoteException;
+			int servicePort, int virtualPort);
 
 	/**
 	 * Adds the entries for a hidden service with virtual port 80 to the
@@ -117,11 +113,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract HiddenService addHiddenService(String serviceName,
-			int servicePort) throws RemoteException;
+			int servicePort);
 
 	/**
 	 * Adds the entries for a hidden service with an automatically assigned
@@ -137,11 +131,8 @@
 	 *         of the created hidden service.
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for the parameter.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract HiddenService addHiddenService(String serviceName)
-			throws RemoteException;
+	public abstract HiddenService addHiddenService(String serviceName);
 
 	/**
 	 * Adds the given configuration string, consisting of "<configuration key>
@@ -153,11 +144,8 @@
 	 *             Thrown if the given configuration string is either
 	 *             <code>null</code>, a zero-length string, or does not
 	 *             consist of configuration key and value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void addConfiguration(String configurationString)
-			throws RemoteException;
+	public abstract void addConfiguration(String configurationString);
 
 	/**
 	 * Adds the given configuration strings, each consisting of "<configuration
@@ -170,11 +158,8 @@
 	 *             the contained strings is either <code>null</code>, a
 	 *             zero-length string, or does not consist of configuration key
 	 *             and value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void addConfigurations(List<String> configurationStrings)
-			throws RemoteException;
+	public abstract void addConfigurations(List<String> configurationStrings);
 
 	/**
 	 * Replaces the first configuration string, consisting of "<configuration
@@ -190,11 +175,8 @@
 	 *             Thrown if the given configuration string is either
 	 *             <code>null</code>, a zero-length string, or does not
 	 *             consist of configuration key and value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void replaceConfiguration(String configurationString)
-			throws RemoteException;
+	public abstract void replaceConfiguration(String configurationString);
 
 	/**
 	 * Removes all configuration strings containing the given configuration key
@@ -206,29 +188,22 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if the given configuration key is either
 	 *             <code>null</code> or a zero-length key.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void removeConfiguration(String configurationKey)
-			throws RemoteException;
+	public abstract void removeConfiguration(String configurationKey);
 
 	/**
 	 * Returns the name of this node.
 	 * 
 	 * @return The name of this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String getNodeName() throws RemoteException;
+	public abstract String getNodeName();
 
 	/**
 	 * Returns the state of this node.
 	 * 
 	 * @return The state of this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract NodeState getNodeState() throws RemoteException;
+	public abstract NodeState getNodeState();
 
 	/**
 	 * Sends a HUP command to the process via its control port to restart it;
@@ -239,10 +214,8 @@
 	 *             Thrown if an I/O problem occurs while sending the HUP signal.
 	 * @throws IllegalStateException
 	 *             Thrown if node is not in state <code>NodeState.RUNNING</code>.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void hup() throws PuppeTorException, RemoteException;
+	public abstract void hup() throws PuppeTorException;
 
 	/**
 	 * Shuts down the Tor process corresponding to this node immediately. This
@@ -256,10 +229,8 @@
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while sending the
 	 *             <code>SHUTDOWN</code> signal.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void shutdown() throws PuppeTorException, RemoteException;
+	public abstract void shutdown() throws PuppeTorException;
 
 	/**
 	 * Starts the Tor process for this node and connects to the control port as
@@ -282,11 +253,9 @@
 	 * @throws PuppeTorException
 	 *             Thrown if either the process could not be started, or the
 	 *             connection to the control port could not be established.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	public abstract boolean startNode(long maximumTimeToWaitInMillis)
-			throws PuppeTorException, RemoteException;
+			throws PuppeTorException;
 
 	/**
 	 * Writes the configuration of this node to the <code>torrc</code> file in
@@ -297,29 +266,22 @@
 	 * @throws PuppeTorException
 	 *             Thrown if the configuration file <code>torrc</code> cannot
 	 *             be written to disk.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void writeConfiguration() throws PuppeTorException,
-			RemoteException;
+	public abstract void writeConfiguration() throws PuppeTorException;
 
 	/**
 	 * Returns the SOCKS port of this node.
 	 * 
 	 * @return The SOCKS port of this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract int getSocksPort() throws RemoteException;
+	public abstract int getSocksPort();
 
 	/**
 	 * Returns the control port of this node.
 	 * 
 	 * @return The control port of this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract int getControlPort() throws RemoteException;
+	public abstract int getControlPort();
 
 	/**
 	 * Returns (a copy of) the list of strings containing the configuration of
@@ -327,9 +289,7 @@
 	 * 
 	 * @return (A copy of) the list of strings containing the configuration of
 	 *         this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract List<String> getConfiguration() throws RemoteException;
+	public abstract List<String> getConfiguration();
 
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/RouterNode.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/RouterNode.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/RouterNode.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor;
 
-import java.rmi.RemoteException;
-
 /**
  * A <code>RouterNode</code> represents a Tor process that is configured to
  * both, relay traffic from a local application to the Tor network and to route
@@ -48,19 +46,15 @@
 	 * Returns the dir port of this node.
 	 * 
 	 * @return The dir port of this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract int getDirPort() throws RemoteException;
+	public abstract int getDirPort();
 
 	/**
 	 * Returns the onion port of this node.
 	 * 
 	 * @return The onion port of this node.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract int getOrPort() throws RemoteException;
+	public abstract int getOrPort();
 
 	/**
 	 * <p>
@@ -82,9 +76,6 @@
 	 *             configuration file cannot be written, the Tor process cannot
 	 *             be started temporarily, or the fingerprint file cannot be
 	 *             read.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String getFingerprint() throws PuppeTorException,
-			RemoteException;
+	public abstract String getFingerprint() throws PuppeTorException;
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ServerApplication.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ServerApplication.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/ServerApplication.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,9 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor;
 
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
 /**
  * The <code>ServerApplication</code> can be used as simple HTTP server that
  * answers all <code>HTTP GET</code> requests by empty <code>HTTP OK</code>
@@ -42,7 +39,7 @@
  * 
  * @author kloesing
  */
-public interface ServerApplication extends Remote {
+public interface ServerApplication {
 
 	/**
 	 * Starts listening for incoming <code>HTTP GET</code> requests from
@@ -52,10 +49,8 @@
 	 * 
 	 * @throws IllegalStateException
 	 *             Thrown if the server is currently not in listening state.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void startListening() throws RemoteException;
+	public abstract void startListening();
 
 	/**
 	 * Stops listening for requests. This method may only be invoked when the
@@ -63,35 +58,27 @@
 	 * 
 	 * @throws IllegalStateException
 	 *             Thrown if the server is currently in listening state.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract void stopListening() throws RemoteException;
+	public abstract void stopListening();
 
 	/**
 	 * Returns whether this server is currently in listening state.
 	 * 
 	 * @return The listening state of this server.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract boolean isListening() throws RemoteException;
+	public abstract boolean isListening();
 
 	/**
 	 * Returns the name of this server.
 	 * 
 	 * @return The name of this server.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract String getServerApplicationName() throws RemoteException;
+	public abstract String getServerApplicationName();
 
 	/**
 	 * Returns the port on which this server listens.
 	 * 
 	 * @return The port on which this server listens.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public abstract int getServerPort() throws RemoteException;
+	public abstract int getServerPort();
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AccessingPublicWebServerOverTor.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AccessingPublicWebServerOverTor.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AccessingPublicWebServerOverTor.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor.examples;
 
-import java.rmi.RemoteException;
-
 import de.uniba.wiai.lspi.puppetor.ClientApplication;
 import de.uniba.wiai.lspi.puppetor.ClientEventType;
 import de.uniba.wiai.lspi.puppetor.Event;
@@ -59,11 +57,8 @@
 	 * @throws PuppeTorException
 	 *             Thrown if there is a problem with the JVM-external Tor
 	 *             processes that we cannot handle.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public static void main(String[] args) throws PuppeTorException,
-			RemoteException {
+	public static void main(String[] args) throws PuppeTorException {
 
 		// though we only need a single proxy, we always need to create a
 		// network to initialize a test case.

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPrivateTorNetwork.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPrivateTorNetwork.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPrivateTorNetwork.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor.examples;
 
-import java.rmi.RemoteException;
-
 import de.uniba.wiai.lspi.puppetor.ClientApplication;
 import de.uniba.wiai.lspi.puppetor.ClientEventType;
 import de.uniba.wiai.lspi.puppetor.Event;
@@ -62,11 +60,8 @@
 	 * @throws PuppeTorException
 	 *             Thrown if there is a problem with the JVM-external Tor
 	 *             processes that we cannot handle.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public static void main(String[] args) throws PuppeTorException,
-			RemoteException {
+	public static void main(String[] args) throws PuppeTorException {
 
 		// create a network to initialize the test case
 		Network network = NetworkFactory.createNetwork("example4");

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPublicTorNetwork.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPublicTorNetwork.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingAndAccessingHiddenServiceOverPublicTorNetwork.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor.examples;
 
-import java.rmi.RemoteException;
-
 import de.uniba.wiai.lspi.puppetor.ClientApplication;
 import de.uniba.wiai.lspi.puppetor.ClientEventType;
 import de.uniba.wiai.lspi.puppetor.Event;
@@ -63,11 +61,8 @@
 	 * @throws PuppeTorException
 	 *             Thrown if there is a problem with the JVM-external Tor
 	 *             processes that we cannot handle.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public static void main(String[] args) throws PuppeTorException,
-			RemoteException {
+	public static void main(String[] args) throws PuppeTorException {
 
 		// create a network to initialize the test case
 		Network network = NetworkFactory.createNetwork("example3");

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingHiddenServiceToPublicTorNetwork.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingHiddenServiceToPublicTorNetwork.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/AdvertisingHiddenServiceToPublicTorNetwork.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor.examples;
 
-import java.rmi.RemoteException;
-
 import de.uniba.wiai.lspi.puppetor.Event;
 import de.uniba.wiai.lspi.puppetor.EventListener;
 import de.uniba.wiai.lspi.puppetor.EventManager;
@@ -59,12 +57,8 @@
 	 * @throws PuppeTorException
 	 *             Thrown if there is a problem with the JVM-external Tor
 	 *             processes that we cannot handle.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public static void main(String[] args) throws PuppeTorException,
-			RemoteException {
-
+	public static void main(String[] args) throws PuppeTorException {
 		// create a network to initialize the test case
 		Network network = NetworkFactory.createNetwork("example2");
 		

Deleted: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/LongRunningNetwork.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/LongRunningNetwork.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/LongRunningNetwork.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2007, Patrick Geyer, Johannes Jungkunst, Karsten Loesing,
- * Stefan Schilling
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 
- *     * Neither the names of the copyright owners nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package de.uniba.wiai.lspi.puppetor.examples;
-
-import java.rmi.RemoteException;
-
-import de.uniba.wiai.lspi.puppetor.Network;
-import de.uniba.wiai.lspi.puppetor.NetworkFactory;
-import de.uniba.wiai.lspi.puppetor.PuppeTorException;
-
-/**
- * Example for starting and running a private network of routers and directories
- * that may be accessed via RMI, e.g. to be merged with another network.
- * 
- * Note that the <code>rmiregistry</code> must be running in order to run this
- * example.
- * 
- * TODO further requirements for starting this example
- * 
- * @author pgeyer, jjungkunst, sschilling
- */
-public class LongRunningNetwork {
-
-	/**
-	 * Sets up and runs the test.
-	 * 
-	 * @param args
-	 *            Command-line arguments (ignored).
-	 * @throws PuppeTorException
-	 *             Thrown if there is a problem with the JVM-external Tor
-	 *             processes that we cannot handle.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
-	 */
-	public static void main(String[] args) throws PuppeTorException,
-			RemoteException {
-
-		// create a network to initialize the test case
-		Network network = NetworkFactory.createNetwork("example5");
-
-		// create three router nodes
-		network.createRouter("router1");
-		network.createRouter("router2");
-		network.createRouter("router3");
-
-		// create two directory nodes
-		network.createDirectory("dir1");
-		network.createDirectory("dir2");
-
-		// configure nodes of this network to be part of a private network
-		network.configureAsPrivateNetwork();
-
-		// write node configurations
-		network.writeConfigurations();
-
-		// start proxy node and wait until it has opened a circuit with a
-		// timeout of 5 seconds
-		if (!network.startNodes(5000)) {
-			System.out.println("Failed to start nodes!");
-			System.exit(0);
-		}
-		System.out.println("Successfully started nodes!");
-
-		// hup until nodes have built circuits (10 retries, 10 seconds timeout
-		// each)
-		if (!network.hupUntilUp(10, 10000)) {
-
-			// failed to build circuits
-			System.out.println("Failed to build circuits!");
-			System.exit(0);
-		}
-		System.out.println("Successfully built circuits!");
-
-		// bind the network to rmiregistry
-		if (!network.bindAtRmiregistry()) {
-
-			// failed to bind at rmiregistry
-			System.out.println("Failed to bind at rmiregistry! "
-					+ "Is rmiregistry running?");
-			System.exit(0);
-		}
-		System.out.println("Bound at rmiregistry to name \""
-				+ network.getNetworkName() + "\"!");
-
-		// wait until the end of time
-		System.out.println("Waiting until the end of time... "
-				+ "Interrupt with Ctrl-C!");
-		try {
-			Thread.sleep(Long.MAX_VALUE);
-		} catch (InterruptedException e) {
-			// do nothing
-		}
-	}
-}
\ No newline at end of file

Deleted: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/MergingRoutersWithLongRunningNetwork.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/MergingRoutersWithLongRunningNetwork.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/examples/MergingRoutersWithLongRunningNetwork.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2007, Patrick Geyer, Johannes Jungkunst, Karsten Loesing,
- * Stefan Schilling
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 
- *     * Neither the names of the copyright owners nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package de.uniba.wiai.lspi.puppetor.examples;
-
-import java.rmi.RemoteException;
-
-import de.uniba.wiai.lspi.puppetor.ClientApplication;
-import de.uniba.wiai.lspi.puppetor.ClientEventType;
-import de.uniba.wiai.lspi.puppetor.Event;
-import de.uniba.wiai.lspi.puppetor.EventListener;
-import de.uniba.wiai.lspi.puppetor.EventManager;
-import de.uniba.wiai.lspi.puppetor.HiddenService;
-import de.uniba.wiai.lspi.puppetor.HiddenServiceEventType;
-import de.uniba.wiai.lspi.puppetor.Network;
-import de.uniba.wiai.lspi.puppetor.NetworkFactory;
-import de.uniba.wiai.lspi.puppetor.PuppeTorException;
-import de.uniba.wiai.lspi.puppetor.RouterNode;
-import de.uniba.wiai.lspi.puppetor.ServerApplication;
-import de.uniba.wiai.lspi.puppetor.ServerEventType;
-
-/**
- * Example for a private network of routers without directories that is merged
- * with another, long-running private network that contains routers and
- * directories. Note that <code>LongRunningNetwork</code> must be running in
- * order to run this example.
- * 
- * @author pgeyer, jjungkunst, sschilling
- */
-public class MergingRoutersWithLongRunningNetwork {
-
-	/**
-	 * Sets up and runs the test.
-	 * 
-	 * @param args
-	 *            Command-line arguments (ignored).
-	 * @throws PuppeTorException
-	 *             Thrown if there is a problem with the JVM-external Tor
-	 *             processes that we cannot handle.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
-	 */
-	public static void main(String[] args) throws PuppeTorException,
-			RemoteException {
-
-		// create a network to initialize the test case
-		Network network = NetworkFactory.createNetwork("example6", 7200);
-
-		// create three router nodes
-		RouterNode router4 = network.createRouter("router4");
-		RouterNode router5 = network.createRouter("router5");
-
-		// obtain reference to event manager to be able to respond to events
-		EventManager manager = network.getEventManager();
-
-		// register event listener
-		EventListener listener = new EventListener() {
-			public void handleEvent(Event event) {
-				if (event.getType() instanceof ClientEventType
-						|| event.getType() instanceof ServerEventType) {
-					System.out.println("Handling event: " + event.getMessage());
-				}
-			}
-		};
-		manager.addEventListener(listener);
-
-		// obtain a reference on the remote long-running network
-		Network remoteNetwork = NetworkFactory.connectToNetwork("127.0.0.1",
-				"example5");
-
-		// merge configuration with long-running network
-		network.configureAsInterconnectedPrivateNetwork(remoteNetwork);
-
-		// add hidden service
-		HiddenService hidServ1 = router4.addHiddenService("hidServ");
-
-		// write configurations and hup all directory nodes in the other network
-		remoteNetwork.writeConfigurations();
-		remoteNetwork.hupAllDirectories();
-
-		// write configurations of router nodes
-		network.writeConfigurations();
-
-		// start proxy node and wait until it has opened a circuit with a
-		// timeout of 5 seconds
-		if (!network.startNodes(5000)) {
-			System.out.println("Failed to start the nodes!");
-			System.exit(0);
-		}
-		System.out.println("Successfully started nodes!");
-
-		// hup until proxy has built circuits (20 retries, 5 seconds timeout
-		// each)
-		if (!network.hupUntilUp(20, 5000)) {
-
-			// failed to build circuits
-			System.out.println("Failed to build circuits!");
-			System.exit(0);
-		}
-		System.out.println("Successfully built circuits!");
-
-		// wait for 3 minutes that the proxy has published its first RSD
-		if (!manager.waitForAnyOccurence(router4.getNodeName(),
-				HiddenServiceEventType.BOB_DESC_PUBLISHED_RECEIVED,
-				3L * 60L * 1000L)) {
-			// failed to publish an RSD
-			System.out.println("Failed to publish an RSD!");
-			System.exit(0);
-		}
-		System.out.println("Successfully published an RSD!");
-
-		// create server application
-		ServerApplication server = network.createServer("server", hidServ1
-				.getServicePort());
-
-		// start server
-		server.startListening();
-		System.out.println("Started server");
-
-		// create client application
-		ClientApplication client = network.createClient("client", hidServ1
-				.determineOnionAddress(), hidServ1.getVirtualPort(), router5
-				.getSocksPort());
-
-		// perform at most five request with a timeout of 45 seconds each
-		client.startRequests(5, 45000, true);
-
-		// wait for request to be performed
-		manager.waitForAnyOccurence(client.getClientApplicationName(),
-				ClientEventType.CLIENT_REQUESTS_PERFORMED);
-
-		// shut down nodes
-		network.shutdownNodes();
-
-		// Shut down the JVM
-		System.out.println("Goodbye.");
-		System.exit(0);
-	}
-}
\ No newline at end of file

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ClientApplicationImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -40,8 +40,6 @@
 import java.net.Socket;
 import java.net.SocketTimeoutException;
 import java.net.Proxy.Type;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -54,7 +52,7 @@
  * @author kloesing
  */
 @SuppressWarnings("serial")
-public class ClientApplicationImpl extends UnicastRemoteObject implements
+public class ClientApplicationImpl implements
 		ClientApplication {
 
 	/**
@@ -362,12 +360,9 @@
 	 * @throws IllegalArgumentException
 	 *             If at least one of the parameters is <code>null</code> or
 	 *             has an invalid value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	ClientApplicationImpl(NetworkImpl network, String clientApplicationName,
-			String targetName, int targetPort, int socksPort)
-			throws RemoteException {
+			String targetName, int targetPort, int socksPort) {
 
 		// check if clientApplicationName can be used as logger name
 		if (clientApplicationName == null

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/DirectoryNodeImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -40,7 +40,6 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
-import java.rmi.RemoteException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
@@ -228,16 +227,12 @@
 	 * @throws IllegalArgumentException
 	 *             If at least one of the parameters is <code>null</code> or
 	 *             has an invalid value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 * @throws PuppeTorException
 	 *             Thrown if an I/O problem occurs while writing the temporary
 	 *             <code>approved-routers</code> file.
 	 */
 	DirectoryNodeImpl(NetworkImpl network, String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort, String serverIpAddress)
-			throws RemoteException {
-
+			int socksPort, int orPort, int dirPort, String serverIpAddress) {
 		// create superclass instance; parameter checking is done in super
 		// constructor
 		super(network, nodeName, controlPort, socksPort, orPort, dirPort,
@@ -311,8 +306,7 @@
 		return this.v3Identity;
 	}
 
-	public synchronized String getDirServerString() throws PuppeTorException,
-			RemoteException {
+	public synchronized String getDirServerString() throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "getDirServerString");
@@ -337,7 +331,7 @@
 		return dirServerString;
 	}
 
-	public void addApprovedRouters(Set<String> routers) throws RemoteException {
+	public void addApprovedRouters(Set<String> routers) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "addApprovedRouters",

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/EventManagerImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/EventManagerImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/EventManagerImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -31,8 +31,6 @@
  */
 package de.uniba.wiai.lspi.puppetor.impl;
 
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
 import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -64,8 +62,7 @@
  * @author kloesing
  */
 @SuppressWarnings("serial")
-public class EventManagerImpl extends UnicastRemoteObject implements
-		EventManager {
+public class EventManagerImpl implements EventManager {
 
 	/**
 	 * Registered event handlers for specific sources.
@@ -104,10 +101,8 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if the given <code>networkName</code> is either
 	 *             <code>null</code> or a zero-length string.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	EventManagerImpl(String networkName) throws RemoteException {
+	EventManagerImpl(String networkName) {
 
 		// check if networkName can be used as logger name
 		if (networkName == null || networkName.length() == 0) {
@@ -502,14 +497,8 @@
 				this.logger.log(Level.FINE, "Informing event listener "
 						+ eventHandler + " about recently observed event "
 						+ event + " from source " + source + "!");
-				try {
-					eventHandler.handleEvent(event);
-				} catch (RemoteException e) {
-					this.logger.log(Level.WARNING,
-							"Cannot inform remote event listener about "
-									+ "event! Removing event listener!", e);
-					this.eventHandlers.remove(eventHandler);
-				}
+				eventHandler.handleEvent(event);
+				
 			}
 		}
 
@@ -524,14 +513,7 @@
 			this.logger.log(Level.FINE, "Informing event listener "
 					+ eventHandler + " about recently observed event " + event
 					+ " from source " + source + "!");
-			try {
-				eventHandler.handleEvent(event);
-			} catch (RemoteException e) {
-				this.logger.log(Level.WARNING,
-						"Cannot inform remote event listener about "
-								+ "event! Removing event listener!", e);
-				this.eventHandlers.remove(eventHandler);
-			}
+			eventHandler.handleEvent(event);
 		}
 
 		// log exiting

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/HiddenServiceImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/HiddenServiceImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/HiddenServiceImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -4,8 +4,6 @@
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -18,8 +16,7 @@
  * @author kloesing
  */
 @SuppressWarnings("serial")
-public class HiddenServiceImpl extends UnicastRemoteObject implements
-		HiddenService {
+public class HiddenServiceImpl implements HiddenService {
 
 	/**
 	 * Logger for this node which is called "hidserv." plus the name of this
@@ -72,11 +69,9 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if an invalid value is given for either of the
 	 *             parameters.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	HiddenServiceImpl(ProxyNodeImpl node, String serviceName, int servicePort,
-			int virtualPort) throws RemoteException {
+			int virtualPort) {
 
 		// check if networkName can be used as logger name
 		if (serviceName == null || serviceName.length() == 0) {

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/NetworkImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/NetworkImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/NetworkImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -35,8 +35,6 @@
 import java.net.MalformedURLException;
 import java.rmi.Naming;
 import java.rmi.RMISecurityManager;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -66,7 +64,7 @@
  * @author kloesing
  */
 @SuppressWarnings("serial")
-public class NetworkImpl extends UnicastRemoteObject implements Network {
+public class NetworkImpl implements Network {
 
 	/**
 	 * Internal thread class that is used to start Tor processes in parallel.
@@ -134,11 +132,6 @@
 						"Caught an exception while starting node "
 								+ node.toString() + "!");
 				this.caughtException = e;
-			} catch (RemoteException e) {
-				logger.log(Level.SEVERE,
-						"Caught a remote exception while starting node "
-								+ node.toString() + "!");
-				this.caughtException = e;
 			}
 
 			// log exiting
@@ -195,12 +188,8 @@
 	 *             Thrown if the given <code>networkName</code> is either
 	 *             <code>null</code> or a zero-length string, or if an illegal
 	 *             number is given for <code>startPort</code>.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public NetworkImpl(String networkName, int startPort)
-			throws RemoteException {
-
+	public NetworkImpl(String networkName, int startPort) {
 		// initialize using overloaded constructor
 		this(networkName);
 
@@ -227,10 +216,8 @@
 	 * @throws IllegalArgumentException
 	 *             Thrown if the given <code>networkName</code> is either
 	 *             <code>null</code> or a zero-length string.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	public NetworkImpl(String networkName) throws RemoteException {
+	public NetworkImpl(String networkName) {
 
 		// check if networkName can be used as logger name
 		if (networkName == null || networkName.length() == 0) {
@@ -276,10 +263,8 @@
 	 * 
 	 * @return <code>true</code> if all nodes are up, <code>false</code> if
 	 *         at least one node is not up.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
-	private boolean allNodesUp() throws RemoteException {
+	private boolean allNodesUp() {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "allNodesUp");
@@ -300,9 +285,7 @@
 		return true;
 	}
 
-	public void configureAsPrivateNetwork() throws PuppeTorException,
-			RemoteException {
-
+	public void configureAsPrivateNetwork() throws PuppeTorException {
 		// log entering
 		this.logger.entering(this.getClass().getName(),
 				"configureAsPrivateNetwork");
@@ -358,9 +341,7 @@
 	}
 
 	public ClientApplication createClient(String clientApplicationName,
-			String targetAddress, int targetPort, int socksPort)
-			throws RemoteException {
-
+			String targetAddress, int targetPort, int socksPort) {
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createClient",
 				new Object[] { clientApplicationName, targetAddress,
@@ -379,9 +360,7 @@
 	}
 
 	public DirectoryNode createDirectory(String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort, String serverIpAddress)
-			throws RemoteException {
-
+			int socksPort, int orPort, int dirPort, String serverIpAddress) {
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createDirectory",
 				new Object[] { nodeName, controlPort, socksPort, orPort,
@@ -403,7 +382,7 @@
 	}
 
 	public DirectoryNode createDirectory(String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort) throws RemoteException {
+			int socksPort, int orPort, int dirPort) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createDirectory",
@@ -419,8 +398,7 @@
 		return dir;
 	}
 
-	public DirectoryNode createDirectory(String nodeName, String serverIpAddress)
-			throws RemoteException {
+	public DirectoryNode createDirectory(String nodeName, String serverIpAddress) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createDirectory",
@@ -436,8 +414,7 @@
 		return dir;
 	}
 
-	public DirectoryNode createDirectory(String nodeName)
-			throws RemoteException {
+	public DirectoryNode createDirectory(String nodeName) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createDirectory",
@@ -453,8 +430,7 @@
 		return dir;
 	}
 
-	public ProxyNode createProxy(String nodeName, int controlPort, int socksPort)
-			throws RemoteException {
+	public ProxyNode createProxy(String nodeName, int controlPort, int socksPort) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createProxy",
@@ -475,7 +451,7 @@
 		return proxy;
 	}
 
-	public ProxyNode createProxy(String nodeName) throws RemoteException {
+	public ProxyNode createProxy(String nodeName) {
 
 		// log entering
 		this.logger
@@ -491,8 +467,7 @@
 	}
 
 	public RouterNode createRouter(String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort, String serverIpAddress)
-			throws RemoteException {
+			int socksPort, int orPort, int dirPort, String serverIpAddress) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createRouter",
@@ -515,7 +490,7 @@
 	}
 
 	public RouterNode createRouter(String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort) throws RemoteException {
+			int socksPort, int orPort, int dirPort) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createRouter",
@@ -531,8 +506,7 @@
 		return dir;
 	}
 
-	public RouterNode createRouter(String nodeName, String serverIpAddress)
-			throws RemoteException {
+	public RouterNode createRouter(String nodeName, String serverIpAddress) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createRouter",
@@ -548,7 +522,7 @@
 		return dir;
 	}
 
-	public RouterNode createRouter(String nodeName) throws RemoteException {
+	public RouterNode createRouter(String nodeName) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createRouter",
@@ -565,7 +539,7 @@
 	}
 
 	public ServerApplication createServer(String serverApplicationName,
-			int serverPort) throws RemoteException {
+			int serverPort) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createServer",
@@ -583,8 +557,7 @@
 		return server;
 	}
 
-	public ServerApplication createServer(String serverApplicationName)
-			throws RemoteException {
+	public ServerApplication createServer(String serverApplicationName) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "createServer",
@@ -658,7 +631,7 @@
 	}
 
 	public boolean hupUntilUp(int tries, long hupInterval)
-			throws PuppeTorException, RemoteException {
+			throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "hupUntilUp",
@@ -743,7 +716,7 @@
 		return false;
 	}
 
-	public void hupAllNodes() throws PuppeTorException, RemoteException {
+	public void hupAllNodes() throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "hupAllNodes");
@@ -772,7 +745,7 @@
 		this.logger.exiting(this.getClass().getName(), "hupAllNodes");
 	}
 
-	public void hupAllDirectories() throws PuppeTorException, RemoteException {
+	public void hupAllDirectories() throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "hupAllDirectories");
@@ -804,7 +777,7 @@
 		this.logger.exiting(this.getClass().getName(), "hupAllDirectories");
 	}
 
-	public void shutdownNodes() throws PuppeTorException, RemoteException {
+	public void shutdownNodes() throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "shutdownNodes");
@@ -838,7 +811,7 @@
 	}
 
 	public boolean startNodes(long maximumTimeToWaitInMillis)
-			throws PuppeTorException, RemoteException {
+			throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "startNodes",
@@ -938,7 +911,7 @@
 		return this.networkName;
 	}
 
-	public void writeConfigurations() throws PuppeTorException, RemoteException {
+	public void writeConfigurations() throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "writeConfigurations");
@@ -952,57 +925,6 @@
 		this.logger.exiting(this.getClass().getName(), "writeConfigurations");
 	}
 
-	public void configureAsInterconnectedPrivateNetwork(Network remoteNetwork)
-			throws PuppeTorException, RemoteException {
-
-		// log entering
-		logger.entering(this.getClass().getName(), "mergeNetworks",
-				remoteNetwork);
-
-		// collect dir strings from this and the remote network
-		List<String> ourDirServerStrings = new ArrayList<String>();
-		for (DirectoryNode directory : this.getAllDirectoryNodes().values()) {
-			ourDirServerStrings.add(directory.getDirServerString());
-		}
-		List<String> remoteDirServerStrings = new ArrayList<String>();
-		for (DirectoryNode directory : remoteNetwork.getAllDirectoryNodes()
-				.values()) {
-			remoteDirServerStrings.add(directory.getDirServerString());
-		}
-
-		// add dir strings of local directories to all nodes of the other
-		// network and vice versa
-		for (ProxyNode node : remoteNetwork.getAllNodes().values()) {
-			node.addConfigurations(ourDirServerStrings);
-		}
-		for (ProxyNode node : this.getAllNodes().values()) {
-			node.addConfigurations(remoteDirServerStrings);
-		}
-
-		// collect router fingerprints from all routers in this and the remote
-		// network
-		Set<String> ourApprovedRoutersStrings = new TreeSet<String>();
-		for (RouterNode router : this.getAllRouterNodes().values()) {
-			ourApprovedRoutersStrings.add(router.getFingerprint());
-		}
-		Set<String> remoteApprovedRoutersStrings = new TreeSet<String>();
-		for (RouterNode router : remoteNetwork.getAllRouterNodes().values()) {
-			remoteApprovedRoutersStrings.add(router.getFingerprint());
-		}
-
-		// add the fingerprints of local routers and directories to the
-		// directories of the other network and vice versa
-		for (DirectoryNode node : remoteNetwork.getAllDirectoryNodes().values()) {
-			node.addApprovedRouters(ourApprovedRoutersStrings);
-		}
-		for (DirectoryNode node : this.getAllDirectoryNodes().values()) {
-			node.addApprovedRouters(remoteApprovedRoutersStrings);
-		}
-
-		// log exiting
-		logger.exiting(this.getClass().getName(), "mergeNetworks");
-	}
-
 	public void addTemplateConfiguration(Class<? extends ProxyNode> nodeClass,
 			String templateConfigurationString) {
 
@@ -1129,30 +1051,6 @@
 						"removeTemplateConfiguration");
 	}
 
-	public boolean bindAtRmiregistry() throws RemoteException {
-
-		// log entering
-		logger.entering(this.getClass().getName(), "bindAtRmiregistry");
-
-		// set the RMISecurityManager
-		System.setSecurityManager(new RMISecurityManager());
-
-		// bind the network to the rmiregistry
-		try {
-			Naming.rebind("//127.0.0.1/" + networkName, this);
-		} catch (MalformedURLException e) {
-			this.logger.log(Level.WARNING,
-					"URL to bind this network to is malformed!", e);
-			logger.exiting(this.getClass().getName(), "bindAtRmiregistry",
-					false);
-			return false;
-		}
-
-		// log exiting
-		logger.exiting(this.getClass().getName(), "bindAtRmiregistry", true);
-		return true;
-	}
-
 	/**
 	 * Returns the current port number and increments it afterwards.
 	 * 

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ProxyNodeImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -38,8 +38,6 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.Socket;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -59,7 +57,7 @@
  * @author kloesing
  */
 @SuppressWarnings("serial")
-public class ProxyNodeImpl extends UnicastRemoteObject implements ProxyNode {
+public class ProxyNodeImpl implements ProxyNode {
 
 	/**
 	 * Executable file containing Tor.
@@ -160,11 +158,9 @@
 	 * @throws IllegalArgumentException
 	 *             If at least one of the parameters is <code>null</code> or
 	 *             has an invalid value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	ProxyNodeImpl(NetworkImpl network, String nodeName, int controlPort,
-			int socksPort) throws RemoteException {
+			int socksPort) {
 
 		// make sure that nodeName is a valid logger name
 		if (nodeName == null || nodeName.length() < 1 || nodeName.length() > 19
@@ -313,8 +309,7 @@
 		this.logger.exiting(this.getClass().getName(), "replaceConfiguration");
 	}
 
-	public void removeConfiguration(String configurationKey)
-			throws RemoteException {
+	public void removeConfiguration(String configurationKey) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "deleteConfiguration",
@@ -345,7 +340,7 @@
 	}
 
 	public synchronized HiddenService addHiddenService(String serviceName,
-			int servicePort, int virtualPort) throws RemoteException {
+			int servicePort, int virtualPort) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "addHiddenService",
@@ -369,7 +364,7 @@
 	}
 
 	public synchronized HiddenService addHiddenService(String serviceName,
-			int servicePort) throws RemoteException {
+			int servicePort) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "addHiddenService",
@@ -385,8 +380,7 @@
 		return result;
 	}
 
-	public synchronized HiddenService addHiddenService(String serviceName)
-			throws RemoteException {
+	public synchronized HiddenService addHiddenService(String serviceName) {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "addHiddenService",

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/RouterNodeImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -37,7 +37,6 @@
 import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
-import java.rmi.RemoteException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.logging.Level;
@@ -280,12 +279,9 @@
 	 * @throws IllegalArgumentException
 	 *             If at least one of the parameters is <code>null</code> or
 	 *             has an invalid value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	RouterNodeImpl(NetworkImpl network, String nodeName, int controlPort,
-			int socksPort, int orPort, int dirPort, String serverIpAddress)
-			throws RemoteException {
+			int socksPort, int orPort, int dirPort, String serverIpAddress) {
 
 		// create superclass instance; parameter checking is done in super
 		// constructor
@@ -343,8 +339,7 @@
 		this.logger.exiting(this.getClass().getName(), "RouterNodeImpl");
 	}
 
-	public synchronized String getFingerprint() throws PuppeTorException,
-			RemoteException {
+	public synchronized String getFingerprint() throws PuppeTorException {
 
 		// log entering
 		this.logger.entering(this.getClass().getName(), "getFingerprint");

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ServerApplicationImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ServerApplicationImpl.java	2008-07-09 08:00:33 UTC (rev 15778)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/impl/ServerApplicationImpl.java	2008-07-09 09:36:50 UTC (rev 15779)
@@ -37,8 +37,6 @@
 import java.io.PrintStream;
 import java.net.ServerSocket;
 import java.net.Socket;
-import java.rmi.RemoteException;
-import java.rmi.server.UnicastRemoteObject;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -51,8 +49,7 @@
  * @author kloesing
  */
 @SuppressWarnings("serial")
-public class ServerApplicationImpl extends UnicastRemoteObject implements
-		ServerApplication {
+public class ServerApplicationImpl implements ServerApplication {
 
 	/**
 	 * Internal thread class that is used to process an incoming request.
@@ -274,11 +271,9 @@
 	 * @throws IllegalArgumentException
 	 *             If at least one of the parameters is <code>null</code> or
 	 *             has an invalid value.
-	 * @throws RemoteException
-	 *             Thrown if an error occurs when accessed remotely.
 	 */
 	ServerApplicationImpl(NetworkImpl network, String serverApplicationName,
-			int serverPort) throws RemoteException {
+			int serverPort) {
 
 		// check if serverApplicationName can be used as logger name
 		if (serverApplicationName == null



More information about the tor-commits mailing list