*/
private boolean distributeMessages() throws IllegalMessageException {
if (!incomingMsgs.isEmpty()) {
for (int index = 0; index < this.incomingMsgs.size(); index++) {
Message msg = this.incomingMsgs.get(index);
Vertex targetVertex = idVertexMap.get(msg.getDestVertexID());
if (targetVertex == null) {
throw new IllegalMessageException(msg, this.getId());
}
targetVertex.queueMessage(msg);
}
this.incomingMsgs.clear();
return true;
}