Java implementation of ZRE protocol