Makes rudimentary checks (that we have at least one message and one connection) about can this router start transfer. @return True if router can start transfer, false if not
()
| 205 | * @return True if router can start transfer, false if not |
| 206 | */ |
| 207 | protected boolean canStartTransfer() { |
| 208 | if (this.getNrofMessages() == 0) { |
| 209 | return false; |
| 210 | } |
| 211 | if (this.getConnections().size() == 0) { |
| 212 | return false; |
| 213 | } |
| 214 | |
| 215 | return true; |
| 216 | } |
| 217 | |
| 218 | /** |
| 219 | * Checks if router "wants" to start receiving message (i.e. router |