GBNprotocol in java