// Path: Source/src/de/tum/in/www1/jReto/module/api/Advertiser.java
// public interface Advertiser {
// 	/**
// 	* The Advertiser.Handler interface allows the Advertiser to inform its delegate about various events.
// 	*/
// 	public static interface Handler {
// 	    /** Called when the advertiser started advertising. */
// 		void onAdvertisingStarted(Advertiser advertiser);
// 	    /** Called when the advertiser stopped advertising. */
// 		void onAdvertisingStopped(Advertiser advertiser);
// 	    /** Called when the advertiser received an incoming connection from a remote peer. */
// 		void onConnection(Advertiser advertiser, Connection connection);
// 	}
// 	
// 	/** Sets the advertiser's delegate. */
// 	void setAdvertiserHandler(Handler handler);
// 	/** Returns the advertiser's delegate. */
// 	Handler getAdvertiserHandler();
//     /** Whether the advertiser is currently active. */
// 	boolean isAdvertising();
//     /** 
//     * Starts advertising.
//     * @param identifier A UUID identifying the local peer.
//     */
// 	void startAdvertisingWithPeerIdentifier(UUID identifier);
//     /**
//     * Stops advertising.
//     */
// 	void stopAdvertising();
// }
// 
// Path: Source/src/de/tum/in/www1/jReto/module/api/Browser.java
// public interface Browser {
// 	/**
// 	* The Browser.Handler interface allows an implementation of the Browser protocol to inform it's delegate about various events.
// 	*/
// 	public static interface Handler {
// 	    /** Called when the Browser started to browse. */
// 		void onBrowsingStarted(Browser browser);
// 	    /** Called when the Browser stopped to browse. */
// 		void onBrowsingStopped(Browser browser, Object error);
// 	    /** Called when the Browser discovered an address. */
// 		void onAddressDiscovered(Browser browser, Address address, UUID identifier);
// 	    /** Called when the Browser lost an address, i.e. when that address becomes invalid for any reason. */
// 		void onAddressRemoved(Browser browser, Address address, UUID identifier);
// 	}
// 	
//     /** Sets the Browser's delegate */
// 	void setBrowserHandler(Handler handler);
//     /** The Browser's delegate */
// 	Handler getBrowserHandler();
// 	
//     /** Whether the Browser is currently active. */
// 	boolean isBrowsing();
// 	
//     /** Starts browsing for other peers. */
// 	void startBrowsing();
//     /** Stops browsing for other peers. */
// 	void stopBrowsing();
// }
// 
// Path: Source/src/de/tum/in/www1/jReto/module/api/Module.java
// public interface Module {
//     /** The Module's advertiser */
// 	Advertiser getAdvertiser();
//     /** The Module's browser */
// 	Browser getBrowser();
//     /** 
// 	* Sets an Executor for this module.
//     * It is expected that delegate methods will be called on this Executor.
//     */
// 	void setExecutor(Executor executor);
// }
// 
// Path: Source/test/jReto/util/RunLoop.java
// public class RunLoop implements Executor {
// 	private BlockingQueue<Runnable> queue;
// 	private boolean running;
// 	private boolean executeImmediately;
// 	
// 	public RunLoop(boolean executeImmediately) {
// 		this.queue = new LinkedBlockingQueue<>();
// 		this.running = true;
// 		this.executeImmediately = executeImmediately;
// 	}
// 	
// 	public void execute(Runnable runnable) {
// 		if (this.executeImmediately) {
// 			runnable.run();
// 		} else {
// 			this.queue.add(runnable);
// 		}
// 	}
// 	
// 	public void start() {
// 		while (this.running) {
// 			try {
// 				this.queue.take().run();
// 			} catch (InterruptedException e) {
// 				// TODO Auto-generated catch block
// 				e.printStackTrace();
// 			}
// 		}
// 	}
// 	
// 	public void stop() {
// 		this.queue.add(new Runnable() {
// 			
// 			@Override
// 			public void run() {
// 				RunLoop.this.running = false;
// 			}
// 		});
// 	}
// }


import java.util.concurrent.Executor;
import de.tum.in.www1.jReto.module.api.Advertiser;
import de.tum.in.www1.jReto.module.api.Browser;
import de.tum.in.www1.jReto.module.api.Module;
import jReto.util.RunLoop;
package jReto.module.dummy;



public class DummyModule implements Module {
	private Advertiser advertiser;
	private Browser browser;
	
// Path: Source/src/de/tum/in/www1/jReto/module/api/Advertiser.java
// public interface Advertiser {
// 	/**
// 	* The Advertiser.Handler interface allows the Advertiser to inform its delegate about various events.
// 	*/
// 	public static interface Handler {
// 	    /** Called when the advertiser started advertising. */
// 		void onAdvertisingStarted(Advertiser advertiser);
// 	    /** Called when the advertiser stopped advertising. */
// 		void onAdvertisingStopped(Advertiser advertiser);
// 	    /** Called when the advertiser received an incoming connection from a remote peer. */
// 		void onConnection(Advertiser advertiser, Connection connection);
// 	}
// 	
// 	/** Sets the advertiser's delegate. */
// 	void setAdvertiserHandler(Handler handler);
// 	/** Returns the advertiser's delegate. */
// 	Handler getAdvertiserHandler();
//     /** Whether the advertiser is currently active. */
// 	boolean isAdvertising();
//     /** 
//     * Starts advertising.
//     * @param identifier A UUID identifying the local peer.
//     */
// 	void startAdvertisingWithPeerIdentifier(UUID identifier);
//     /**
//     * Stops advertising.
//     */
// 	void stopAdvertising();
// }
// 
// Path: Source/src/de/tum/in/www1/jReto/module/api/Browser.java
// public interface Browser {
// 	/**
// 	* The Browser.Handler interface allows an implementation of the Browser protocol to inform it's delegate about various events.
// 	*/
// 	public static interface Handler {
// 	    /** Called when the Browser started to browse. */
// 		void onBrowsingStarted(Browser browser);
// 	    /** Called when the Browser stopped to browse. */
// 		void onBrowsingStopped(Browser browser, Object error);
// 	    /** Called when the Browser discovered an address. */
// 		void onAddressDiscovered(Browser browser, Address address, UUID identifier);
// 	    /** Called when the Browser lost an address, i.e. when that address becomes invalid for any reason. */
// 		void onAddressRemoved(Browser browser, Address address, UUID identifier);
// 	}
// 	
//     /** Sets the Browser's delegate */
// 	void setBrowserHandler(Handler handler);
//     /** The Browser's delegate */
// 	Handler getBrowserHandler();
// 	
//     /** Whether the Browser is currently active. */
// 	boolean isBrowsing();
// 	
//     /** Starts browsing for other peers. */
// 	void startBrowsing();
//     /** Stops browsing for other peers. */
// 	void stopBrowsing();
// }
// 
// Path: Source/src/de/tum/in/www1/jReto/module/api/Module.java
// public interface Module {
//     /** The Module's advertiser */
// 	Advertiser getAdvertiser();
//     /** The Module's browser */
// 	Browser getBrowser();
//     /** 
// 	* Sets an Executor for this module.
//     * It is expected that delegate methods will be called on this Executor.
//     */
// 	void setExecutor(Executor executor);
// }
// 
// Path: Source/test/jReto/util/RunLoop.java
// public class RunLoop implements Executor {
// 	private BlockingQueue<Runnable> queue;
// 	private boolean running;
// 	private boolean executeImmediately;
// 	
// 	public RunLoop(boolean executeImmediately) {
// 		this.queue = new LinkedBlockingQueue<>();
// 		this.running = true;
// 		this.executeImmediately = executeImmediately;
// 	}
// 	
// 	public void execute(Runnable runnable) {
// 		if (this.executeImmediately) {
// 			runnable.run();
// 		} else {
// 			this.queue.add(runnable);
// 		}
// 	}
// 	
// 	public void start() {
// 		while (this.running) {
// 			try {
// 				this.queue.take().run();
// 			} catch (InterruptedException e) {
// 				// TODO Auto-generated catch block
// 				e.printStackTrace();
// 			}
// 		}
// 	}
// 	
// 	public void stop() {
// 		this.queue.add(new Runnable() {
// 			
// 			@Override
// 			public void run() {
// 				RunLoop.this.running = false;
// 			}
// 		});
// 	}
// }


// Path: Source/test/jReto/module/dummy/DummyModule.java
import java.util.concurrent.Executor;
import de.tum.in.www1.jReto.module.api.Advertiser;
import de.tum.in.www1.jReto.module.api.Browser;
import de.tum.in.www1.jReto.module.api.Module;
import jReto.util.RunLoop;

package jReto.module.dummy;



public class DummyModule implements Module {
	private Advertiser advertiser;
	private Browser browser;
	
	public DummyModule(DummyNetworkInterface networkInterface, RunLoop runloop) {		