Constructor. Creates a new message router based on the settings in the given Settings object. @param s The settings object
(Settings s)
| 55 | * @param s The settings object |
| 56 | */ |
| 57 | public ActiveRouter(Settings s) { |
| 58 | super(s); |
| 59 | |
| 60 | this.policy = new MessageTransferAcceptPolicy(s); |
| 61 | |
| 62 | this.deleteDelivered = s.getBoolean(DELETE_DELIVERED_S, false); |
| 63 | |
| 64 | if (s.contains(EnergyModel.INIT_ENERGY_S)) { |
| 65 | this.energy = new EnergyModel(s); |
| 66 | } else { |
| 67 | this.energy = null; /* no energy model */ |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Copy constructor. |
nothing calls this directly
no test coverage detected