Java implementation of the PGM protocol