Open Shortest Path First in Java