Пример #1
0
 public void removeArbitrator(
     Arbitrator arbitrator, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
   log.debug("removeArbitrator arbitrator.hashCode() " + arbitrator.hashCode());
   if (p2PService.removeData(arbitrator)) {
     log.trace("Remove arbitrator from network was successful. Arbitrator = " + arbitrator);
     resultHandler.handleResult();
   } else {
     errorMessageHandler.handleErrorMessage("Remove arbitrator failed");
   }
 }
Пример #2
0
 public void addArbitrator(
     Arbitrator arbitrator,
     final ResultHandler resultHandler,
     ErrorMessageHandler errorMessageHandler) {
   log.debug("addArbitrator arbitrator.hashCode() " + arbitrator.hashCode());
   boolean result = p2PService.addData(arbitrator);
   if (result) {
     log.trace("Add arbitrator to network was successful. Arbitrator = " + arbitrator);
     resultHandler.handleResult();
   } else {
     errorMessageHandler.handleErrorMessage("Add arbitrator failed");
   }
 }