bdi-network-resilience

Changes

Details

diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/BDINetRApp.java b/network-resilience/src/br/ufrgs/inf/bdinetr/BDINetRApp.java
index 3ca4d06..296adb9 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/BDINetRApp.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/BDINetRApp.java
@@ -57,7 +57,9 @@ import br.ufrgs.inf.bdinetr.agent.RouterAgent;
 import br.ufrgs.inf.bdinetr.domain.Ip;
 import br.ufrgs.inf.bdinetr.domain.Link;
 import br.ufrgs.inf.bdinetr.domain.Role;
+import br.ufrgs.inf.bdinetr.domain.AbstractRouterComponentFactory;
 import br.ufrgs.inf.bdinetr.domain.Router;
+import br.ufrgs.inf.bdinetr.domain.dummy.DummyRouterComponentFactory;
 
 /**
  * @author Ingrid Nunes
@@ -65,6 +67,7 @@ import br.ufrgs.inf.bdinetr.domain.Router;
 public class BDINetRApp {
 
 	private static final Map<Ip, Agent> AGENTS;
+	private static final AbstractRouterComponentFactory FACTORY = new DummyRouterComponentFactory();
 	private static final Network NETWORK;
 
 	static {
@@ -72,14 +75,14 @@ public class BDINetRApp {
 				.getResource("log4j.properties"));
 
 		Set<Router> routers = new HashSet<>();
-		routers.add(new Router(new Ip("RouterLM"), Role.LINK_MONITOR.getId()));
-		routers.add(new Router(new Ip("RouterRL"), Role.RATE_LIMITER.getId()));
-		routers.add(new Router(new Ip("RouterRL+FE"), Role.RATE_LIMITER.getId() | Role.FLOW_EXPORTER.getId()));
-		routers.add(new Router(new Ip("RouterAD"), Role.ANOMALY_DETECTION.getId()));
-		routers.add(new Router(new Ip("RouterAD+RL"), Role.ANOMALY_DETECTION.getId() | Role.RATE_LIMITER.getId()));
-		routers.add(new Router(new Ip("RouterCL"), Role.CLASSIFIER.getId()));
-		routers.add(new Router(new Ip("RouterCL+FE"), Role.CLASSIFIER.getId() | Role.FLOW_EXPORTER.getId()));
-		routers.add(new Router(new Ip("RouterFE"), Role.FLOW_EXPORTER.getId()));
+		routers.add(new Router(new Ip("RouterLM"), Role.LINK_MONITOR.getId(), FACTORY));
+		routers.add(new Router(new Ip("RouterRL"), Role.RATE_LIMITER.getId(), FACTORY));
+		routers.add(new Router(new Ip("RouterRL+FE"), Role.RATE_LIMITER.getId() | Role.FLOW_EXPORTER.getId(), FACTORY));
+		routers.add(new Router(new Ip("RouterAD"), Role.ANOMALY_DETECTION.getId(), FACTORY));
+		routers.add(new Router(new Ip("RouterAD+RL"), Role.ANOMALY_DETECTION.getId() | Role.RATE_LIMITER.getId(), FACTORY));
+		routers.add(new Router(new Ip("RouterCL"), Role.CLASSIFIER.getId(), FACTORY));
+		routers.add(new Router(new Ip("RouterCL+FE"), Role.CLASSIFIER.getId() | Role.FLOW_EXPORTER.getId(), FACTORY));
+		routers.add(new Router(new Ip("RouterFE"), Role.FLOW_EXPORTER.getId(), FACTORY));
 
 		Link affectedLink = new Link("AFFECTED_LINK");
 
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AbstractRouterComponent.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AbstractRouterComponent.java
new file mode 100644
index 0000000..4c1ea29
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AbstractRouterComponent.java
@@ -0,0 +1,52 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Ingrid Nunes
+ */
+public abstract class AbstractRouterComponent implements RouterComponent,
+		Observable {
+
+	private final Set<Observer> observers;
+	protected final Router router;
+
+	public AbstractRouterComponent(Router router) {
+		this.router = router;
+		this.observers = new HashSet<>();
+	}
+
+	@Override
+	public void attachObserver(Observer observer) {
+		this.observers.add(observer);
+	}
+
+	protected void notifyObservers(Object arg) {
+		for (Observer observer : observers) {
+			observer.update(this, arg);
+		}
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AbstractRouterComponentFactory.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AbstractRouterComponentFactory.java
new file mode 100644
index 0000000..e8c0e56
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AbstractRouterComponentFactory.java
@@ -0,0 +1,58 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+/**
+ * @author Ingrid Nunes
+ */
+public abstract class AbstractRouterComponentFactory {
+
+	public abstract AnomalyDetection createAnomalyDetection(Router router);
+
+	public abstract Classifier createClassifier(Router router);
+
+	public abstract FlowExporter createFlowExporter(Router router);
+
+	public abstract LinkMonitor createLinkMonitor(Router router);
+
+	public abstract RateLimiter createRateLimiter(Router router);
+
+	public RouterComponent createRouterComponent(Role role, Router router) {
+		if (Role.ANOMALY_DETECTION.equals(role)) {
+			return createAnomalyDetection(router);
+		}
+		if (Role.CLASSIFIER.equals(role)) {
+			return createClassifier(router);
+		}
+		if (Role.FLOW_EXPORTER.equals(role)) {
+			return createFlowExporter(router);
+		}
+		if (Role.LINK_MONITOR.equals(role)) {
+			return createLinkMonitor(router);
+		}
+		if (Role.RATE_LIMITER.equals(role)) {
+			return createRateLimiter(router);
+		}
+		return null;
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AnomalyDetection.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AnomalyDetection.java
index b7ec1a0..c7e8681 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AnomalyDetection.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/AnomalyDetection.java
@@ -1,53 +1,41 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2011  Ingrid Nunes
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// 
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-// 
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-// 
-// To contact the authors:
-// http://inf.ufrgs.br/prosoft/bdi4jade/
-//
-//----------------------------------------------------------------------------
-package br.ufrgs.inf.bdinetr.domain;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * ids
- * 
- * addOperation: "name:action:" remoteName: "togglereport".
- * 
- * event
- * 
- * at: "intrusion" put: (factory/event create: #( "value_victim" ));
- * 
- * @author Ingrid Nunes
- */
-public class AnomalyDetection extends RouterComponent {
-
-	public AnomalyDetection(Router router) {
-		super(router);
-	}
-
-	public Set<Ip> detectIntrusion(Link link) {
-		Set<Ip> intrusions = new HashSet<>();
-		if (link.getId().equals("AFFECTED_LINK")) {
-			intrusions.add(new Ip("victim1"));
-			intrusions.add(new Ip("victim2"));
-		}
-		return intrusions;
-	}
-
-}
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+import java.util.Set;
+
+/**
+ * ids
+ * 
+ * addOperation: "name:action:" remoteName: "togglereport".
+ * 
+ * event
+ * 
+ * at: "intrusion" put: (factory/event create: #( "value_victim" ));
+ * 
+ * @author Ingrid Nunes
+ */
+public interface AnomalyDetection extends RouterComponent {
+
+	public Set<Ip> detectIntrusion(Link link);
+
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Classifier.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Classifier.java
index b602c9e..a138cb7 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Classifier.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Classifier.java
@@ -1,55 +1,38 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2011  Ingrid Nunes
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// 
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-// 
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-// 
-// To contact the authors:
-// http://inf.ufrgs.br/prosoft/bdi4jade/
-//
-//----------------------------------------------------------------------------
-package br.ufrgs.inf.bdinetr.domain;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * event at:
- * 
- * "classification" put: (factory/event create: #( "value_name" "value_source"
- * "value_destination" "value_protocol" ));
- * 
- * @author Ingrid Nunes
- */
-public class Classifier extends RouterComponent {
-
-	public Classifier(Router router) {
-		super(router);
-	}
-
-	public Set<Flow> classifyFlows(Ip ip) {
-		Set<Flow> flows = new HashSet<>();
-		if (ip.getAddress().equals("victim1")) {
-			flows.add(new Flow(new Ip("DDoS1"), 80, new Ip("victim1"), 80,
-					"http"));
-			flows.add(new Flow(new Ip("DDoS2"), 80, new Ip("victim1"), 80,
-					"http"));
-		} else if (ip.getAddress().equals("victim2")) {
-			flows.add(new Flow(new Ip("DDoS3"), 80, new Ip("victim2"), 80,
-					"http"));
-		}
-		return flows;
-	}
-
-}
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+import java.util.Set;
+
+/**
+ * event at:
+ * 
+ * "classification" put: (factory/event create: #( "value_name" "value_source"
+ * "value_destination" "value_protocol" ));
+ * 
+ * @author Ingrid Nunes
+ */
+public interface Classifier extends RouterComponent {
+
+	public Set<Flow> classifyFlows(Ip ip);
+
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyAnomalyDetection.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyAnomalyDetection.java
new file mode 100644
index 0000000..2adbfd6
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyAnomalyDetection.java
@@ -0,0 +1,53 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain.dummy;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import br.ufrgs.inf.bdinetr.domain.AnomalyDetection;
+import br.ufrgs.inf.bdinetr.domain.Ip;
+import br.ufrgs.inf.bdinetr.domain.Link;
+import br.ufrgs.inf.bdinetr.domain.Router;
+import br.ufrgs.inf.bdinetr.domain.AbstractRouterComponent;
+
+/**
+ * @author Ingrid Nunes
+ */
+public class DummyAnomalyDetection extends AbstractRouterComponent implements
+		AnomalyDetection {
+
+	public DummyAnomalyDetection(Router router) {
+		super(router);
+	}
+
+	@Override
+	public Set<Ip> detectIntrusion(Link link) {
+		Set<Ip> intrusions = new HashSet<>();
+		if (link.getId().equals("AFFECTED_LINK")) {
+			intrusions.add(new Ip("victim1"));
+			intrusions.add(new Ip("victim2"));
+		}
+		return intrusions;
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyClassifier.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyClassifier.java
new file mode 100644
index 0000000..4ebd1fa
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyClassifier.java
@@ -0,0 +1,57 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain.dummy;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import br.ufrgs.inf.bdinetr.domain.Classifier;
+import br.ufrgs.inf.bdinetr.domain.Flow;
+import br.ufrgs.inf.bdinetr.domain.Ip;
+import br.ufrgs.inf.bdinetr.domain.Router;
+import br.ufrgs.inf.bdinetr.domain.AbstractRouterComponent;
+
+/**
+ * @author Ingrid Nunes
+ */
+public class DummyClassifier extends AbstractRouterComponent implements Classifier {
+
+	public DummyClassifier(Router router) {
+		super(router);
+	}
+
+	@Override
+	public Set<Flow> classifyFlows(Ip ip) {
+		Set<Flow> flows = new HashSet<>();
+		if (ip.getAddress().equals("victim1")) {
+			flows.add(new Flow(new Ip("DDoS1"), 80, new Ip("victim1"), 80,
+					"http"));
+			flows.add(new Flow(new Ip("DDoS2"), 80, new Ip("victim1"), 80,
+					"http"));
+		} else if (ip.getAddress().equals("victim2")) {
+			flows.add(new Flow(new Ip("DDoS3"), 80, new Ip("victim2"), 80,
+					"http"));
+		}
+		return flows;
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyFlowExporter.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyFlowExporter.java
new file mode 100644
index 0000000..c63ea9a
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyFlowExporter.java
@@ -0,0 +1,43 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain.dummy;
+
+import br.ufrgs.inf.bdinetr.domain.FlowExporter;
+import br.ufrgs.inf.bdinetr.domain.Ip;
+import br.ufrgs.inf.bdinetr.domain.Router;
+import br.ufrgs.inf.bdinetr.domain.AbstractRouterComponent;
+
+/**
+ * @author Ingrid Nunes
+ */
+public class DummyFlowExporter extends AbstractRouterComponent implements FlowExporter {
+
+	public DummyFlowExporter(Router router) {
+		super(router);
+	}
+
+	@Override
+	public void turnFlowExporterOn(Ip ip) {
+
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyLinkMonitor.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyLinkMonitor.java
new file mode 100644
index 0000000..130a8ed
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyLinkMonitor.java
@@ -0,0 +1,64 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain.dummy;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import br.ufrgs.inf.bdinetr.domain.Link;
+import br.ufrgs.inf.bdinetr.domain.LinkMonitor;
+import br.ufrgs.inf.bdinetr.domain.Router;
+import br.ufrgs.inf.bdinetr.domain.AbstractRouterComponent;
+
+/**
+ * @author Ingrid Nunes
+ */
+public class DummyLinkMonitor extends AbstractRouterComponent implements LinkMonitor {
+
+	private final Map<Link, Boolean> overUsageLinks;
+
+	public DummyLinkMonitor(Router router) {
+		super(router);
+		this.overUsageLinks = new HashMap<>();
+	}
+
+	@Override
+	public Set<Link> getLinks() {
+		return overUsageLinks.keySet();
+	}
+
+	@Override
+	public boolean isOverUsage(Link link) {
+		Boolean overUsage = this.overUsageLinks.get(link);
+		if (overUsage == null)
+			overUsage = false;
+		return overUsage;
+	}
+
+	@Override
+	public void setOverUsage(Link link, boolean overUsage) {
+		this.overUsageLinks.put(link, overUsage);
+		notifyObservers(link);
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyRateLimiter.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyRateLimiter.java
new file mode 100644
index 0000000..36a9941
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyRateLimiter.java
@@ -0,0 +1,83 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain.dummy;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import br.ufrgs.inf.bdinetr.domain.AbstractRouterComponent;
+import br.ufrgs.inf.bdinetr.domain.Flow;
+import br.ufrgs.inf.bdinetr.domain.Ip;
+import br.ufrgs.inf.bdinetr.domain.LimitLinkEvent;
+import br.ufrgs.inf.bdinetr.domain.Link;
+import br.ufrgs.inf.bdinetr.domain.RateLimiter;
+import br.ufrgs.inf.bdinetr.domain.Router;
+
+/**
+ * @author Ingrid Nunes
+ */
+public class DummyRateLimiter extends AbstractRouterComponent implements
+		RateLimiter {
+
+	private final Map<Flow, Double> rateLimitedflows;
+	private final Map<Ip, Double> rateLimitedIps;
+	private final Map<Link, Double> rateLimitedLinks;
+
+	public DummyRateLimiter(Router router) {
+		super(router);
+		this.rateLimitedLinks = new HashMap<>();
+		this.rateLimitedIps = new HashMap<>();
+		this.rateLimitedflows = new HashMap<>();
+	}
+
+	@Override
+	public void limitFlow(Flow flow, double rate) {
+		this.rateLimitedflows.put(flow, rate);
+	}
+
+	@Override
+	public void limitIp(Ip ip, double rate) {
+		this.rateLimitedIps.put(ip, rate);
+	}
+
+	@Override
+	public void limitLink(Link link, double rate) {
+		this.rateLimitedLinks.put(link, rate);
+		notifyObservers(new LimitLinkEvent(link));
+	}
+
+	@Override
+	public void unlimitFlow(Flow flow) {
+		this.rateLimitedflows.remove(flow);
+	}
+
+	@Override
+	public void unlimitIp(Ip ip) {
+		this.rateLimitedIps.remove(ip);
+	}
+
+	@Override
+	public void unlimitLink(Link link) {
+		this.rateLimitedLinks.remove(link);
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyRouterComponentFactory.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyRouterComponentFactory.java
new file mode 100644
index 0000000..6ca57fe
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/dummy/DummyRouterComponentFactory.java
@@ -0,0 +1,62 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain.dummy;
+
+import br.ufrgs.inf.bdinetr.domain.AbstractRouterComponentFactory;
+import br.ufrgs.inf.bdinetr.domain.AnomalyDetection;
+import br.ufrgs.inf.bdinetr.domain.Classifier;
+import br.ufrgs.inf.bdinetr.domain.FlowExporter;
+import br.ufrgs.inf.bdinetr.domain.LinkMonitor;
+import br.ufrgs.inf.bdinetr.domain.RateLimiter;
+import br.ufrgs.inf.bdinetr.domain.Router;
+
+/**
+ * @author Ingrid Nunes
+ */
+public class DummyRouterComponentFactory extends AbstractRouterComponentFactory {
+
+	@Override
+	public AnomalyDetection createAnomalyDetection(Router router) {
+		return new DummyAnomalyDetection(router);
+	}
+
+	@Override
+	public Classifier createClassifier(Router router) {
+		return new DummyClassifier(router);
+	}
+
+	@Override
+	public FlowExporter createFlowExporter(Router router) {
+		return new DummyFlowExporter(router);
+	}
+
+	@Override
+	public LinkMonitor createLinkMonitor(Router router) {
+		return new DummyLinkMonitor(router);
+	}
+
+	@Override
+	public RateLimiter createRateLimiter(Router router) {
+		return new DummyRateLimiter(router);
+	}
+
+}
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/FlowExporter.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/FlowExporter.java
index cf1f140..47f3c20 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/FlowExporter.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/FlowExporter.java
@@ -26,14 +26,8 @@ package br.ufrgs.inf.bdinetr.domain;
  * 
  * @author Ingrid Nunes
  */
-public class FlowExporter extends RouterComponent {
+public interface FlowExporter extends RouterComponent {
 
-	public FlowExporter(Router router) {
-		super(router);
-	}
+	public void turnFlowExporterOn(Ip ip);
 
-	public void turnFlowExporterOn(Ip ip) {
-
-	}
-
-}
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/LimitLinkEvent.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/LimitLinkEvent.java
new file mode 100644
index 0000000..bdf544d
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/LimitLinkEvent.java
@@ -0,0 +1,39 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+/**
+ * @author Ingrid Nunes
+ */
+public class LimitLinkEvent {
+
+	private Link link;
+
+	public LimitLinkEvent(Link link) {
+		this.link = link;
+	}
+
+	public Link getLink() {
+		return link;
+	}
+
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/LinkMonitor.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/LinkMonitor.java
index c58dd26..8eb6e87 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/LinkMonitor.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/LinkMonitor.java
@@ -1,62 +1,43 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2011  Ingrid Nunes
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// 
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-// 
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-// 
-// To contact the authors:
-// http://inf.ufrgs.br/prosoft/bdi4jade/
-//
-//----------------------------------------------------------------------------
-package br.ufrgs.inf.bdinetr.domain;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * event at:
- * 
- * "load" put: (factory/event create: #( "value_name" "value_index" ));
- * 
- * --> value_name: ??? --> value_index: id do link
- * 
- * @author Ingrid Nunes
- */
-public class LinkMonitor extends RouterComponent {
-
-	private final Map<Link, Boolean> overUsageLinks;
-
-	public LinkMonitor(Router router) {
-		super(router);
-		this.overUsageLinks = new HashMap<>();
-	}
-
-	public Set<Link> getLinks() {
-		return overUsageLinks.keySet();
-	}
-
-	public boolean isOverUsage(Link link) {
-		Boolean overUsage = this.overUsageLinks.get(link);
-		if (overUsage == null)
-			overUsage = false;
-		return overUsage;
-	}
-
-	public void setOverUsage(Link link, boolean overUsage) {
-		this.overUsageLinks.put(link, overUsage);
-		notifyObservers(link);
-	}
-
-}
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+import java.util.Set;
+
+/**
+ * event at:
+ * 
+ * "load" put: (factory/event create: #( "value_name" "value_index" ));
+ * 
+ * --> value_name: ??? --> value_index: id do link
+ * 
+ * @author Ingrid Nunes
+ */
+public interface LinkMonitor extends RouterComponent, Observable {
+
+	public Set<Link> getLinks();
+
+	public boolean isOverUsage(Link link);
+
+	public void setOverUsage(Link link, boolean overUsage);
+
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Observable.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Observable.java
new file mode 100644
index 0000000..f1b603c
--- /dev/null
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Observable.java
@@ -0,0 +1,31 @@
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+/**
+ * @author Ingrid Nunes
+ */
+public interface Observable {
+
+	public abstract void attachObserver(Observer observer);
+
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RateLimiter.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RateLimiter.java
index ae88ded..cc6355b 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RateLimiter.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RateLimiter.java
@@ -1,89 +1,50 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2011  Ingrid Nunes
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// 
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-// 
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-// 
-// To contact the authors:
-// http://inf.ufrgs.br/prosoft/bdi4jade/
-//
-//----------------------------------------------------------------------------
-package br.ufrgs.inf.bdinetr.domain;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * ratelimiter
- * 
- * addOperation: "name:index:rate:" remoteName: "limitlink";
- * 
- * addOperation: "name:ip:rate:" remoteName: "limitip";
- * 
- * addOperation: "name:source:destination:protocol:rate:" remoteName:
- * "limitflow".
- * 
- * @author Ingrid Nunes
- */
-public class RateLimiter extends RouterComponent {
-
-	public class LimitLinkEvent {
-		private Link link;
-
-		public LimitLinkEvent(Link link) {
-			this.link = link;
-		}
-
-		public Link getLink() {
-			return link;
-		}
-	}
-
-	private final Map<Flow, Double> rateLimitedflows;
-	private final Map<Ip, Double> rateLimitedIps;
-	private final Map<Link, Double> rateLimitedLinks;
-
-	public RateLimiter(Router router) {
-		super(router);
-		this.rateLimitedLinks = new HashMap<>();
-		this.rateLimitedIps = new HashMap<>();
-		this.rateLimitedflows = new HashMap<>();
-	}
-
-	public void limitFlow(Flow flow, double rate) {
-		this.rateLimitedflows.put(flow, rate);
-	}
-
-	public void limitIp(Ip ip, double rate) {
-		this.rateLimitedIps.put(ip, rate);
-	}
-
-	public void limitLink(Link link, double rate) {
-		this.rateLimitedLinks.put(link, rate);
-		notifyObservers(new LimitLinkEvent(link));
-	}
-
-	public void unlimitFlow(Flow flow) {
-		this.rateLimitedflows.remove(flow);
-	}
-
-	public void unlimitIp(Ip ip) {
-		this.rateLimitedIps.remove(ip);
-	}
-
-	public void unlimitLink(Link link) {
-		this.rateLimitedLinks.remove(link);
-	}
-
-}
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+/**
+ * ratelimiter
+ * 
+ * addOperation: "name:index:rate:" remoteName: "limitlink";
+ * 
+ * addOperation: "name:ip:rate:" remoteName: "limitip";
+ * 
+ * addOperation: "name:source:destination:protocol:rate:" remoteName:
+ * "limitflow".
+ * 
+ * @author Ingrid Nunes
+ */
+public interface RateLimiter extends RouterComponent, Observable {
+
+	public void limitFlow(Flow flow, double rate);
+
+	public void limitIp(Ip ip, double rate);
+
+	public void limitLink(Link link, double rate);
+
+	public void unlimitFlow(Flow flow);
+
+	public void unlimitIp(Ip ip);
+
+	public void unlimitLink(Link link);
+
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Router.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Router.java
index 683729d..58ba016 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Router.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/Router.java
@@ -32,24 +32,14 @@ public class Router {
 	private final Map<Role, RouterComponent> components;
 	private final Ip ip;
 
-	public Router(final Ip id, int roles) {
+	public Router(final Ip id, int roles, AbstractRouterComponentFactory factory) {
 		this.ip = id;
 		this.components = new HashMap<>();
-		if (Role.ANOMALY_DETECTION.isPresent(roles)) {
-			this.components.put(Role.ANOMALY_DETECTION, new AnomalyDetection(
-					this));
-		}
-		if (Role.CLASSIFIER.isPresent(roles)) {
-			this.components.put(Role.CLASSIFIER, new Classifier(this));
-		}
-		if (Role.FLOW_EXPORTER.isPresent(roles)) {
-			this.components.put(Role.FLOW_EXPORTER, new FlowExporter(this));
-		}
-		if (Role.LINK_MONITOR.isPresent(roles)) {
-			this.components.put(Role.LINK_MONITOR, new LinkMonitor(this));
-		}
-		if (Role.RATE_LIMITER.isPresent(roles)) {
-			this.components.put(Role.RATE_LIMITER, new RateLimiter(this));
+		for (Role role : Role.values()) {
+			if (role.isPresent(roles)) {
+				this.components.put(role,
+						factory.createRouterComponent(role, this));
+			}
 		}
 	}
 
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RouterComponent.java b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RouterComponent.java
index f5f4784..33ef111 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RouterComponent.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/domain/RouterComponent.java
@@ -1,50 +1,29 @@
-//----------------------------------------------------------------------------
-// Copyright (C) 2011  Ingrid Nunes
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// 
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-// 
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-// 
-// To contact the authors:
-// http://inf.ufrgs.br/prosoft/bdi4jade/
-//
-//----------------------------------------------------------------------------
-package br.ufrgs.inf.bdinetr.domain;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author Ingrid Nunes
- */
-public abstract class RouterComponent {
-
-	protected final Router router;
-	private final Set<Observer> observers;
-
-	public RouterComponent(Router router) {
-		this.router = router;
-		this.observers = new HashSet<>();
-	}
-
-	public void attachObserver(Observer observer) {
-		this.observers.add(observer);
-	}
-
-	protected void notifyObservers(Object arg) {
-		for (Observer observer : observers) {
-			observer.update(this, arg);
-		}
-	}
-
-}
+//----------------------------------------------------------------------------
+// Copyright (C) 2011  Ingrid Nunes
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+// 
+// To contact the authors:
+// http://inf.ufrgs.br/prosoft/bdi4jade/
+//
+//----------------------------------------------------------------------------
+package br.ufrgs.inf.bdinetr.domain;
+
+/**
+ * @author Ingrid Nunes
+ */
+public interface RouterComponent {
+
+}
\ No newline at end of file
diff --git a/network-resilience/src/br/ufrgs/inf/bdinetr/Network.java b/network-resilience/src/br/ufrgs/inf/bdinetr/Network.java
index 97be9ee..644a18f 100644
--- a/network-resilience/src/br/ufrgs/inf/bdinetr/Network.java
+++ b/network-resilience/src/br/ufrgs/inf/bdinetr/Network.java
@@ -26,13 +26,14 @@ import java.util.Set;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import bdi4jade.examples.BDI4JADEExamplesPanel;
+import br.ufrgs.inf.bdinetr.domain.LimitLinkEvent;
 import br.ufrgs.inf.bdinetr.domain.Link;
 import br.ufrgs.inf.bdinetr.domain.LinkMonitor;
 import br.ufrgs.inf.bdinetr.domain.Observer;
-import br.ufrgs.inf.bdinetr.domain.Router;
 import br.ufrgs.inf.bdinetr.domain.RateLimiter;
-import br.ufrgs.inf.bdinetr.domain.RateLimiter.LimitLinkEvent;
 import br.ufrgs.inf.bdinetr.domain.Role;
+import br.ufrgs.inf.bdinetr.domain.Router;
 
 /**
  * @author Ingrid Nunes
@@ -44,8 +45,7 @@ public class Network implements Observer {
 	private final Log log;
 	private final Set<Router> routers;
 
-	public Network(Set<Router> routers, Set<Link> links,
-			Set<Link> affectedLinks) {
+	public Network(Set<Router> routers, Set<Link> links, Set<Link> affectedLinks) {
 		this.log = LogFactory.getLog(this.getClass());
 		this.routers = routers;
 		this.links = links;