Exemple #1
0
 private void removeWish() {
   try {
     marketobj.removeWish(command.getItemName(), command.getPrice(), command.getClient());
     contr.updateLog(client.getName() + " removed wish for " + command.getItemName());
     getWishes();
   } catch (RemoteException e) {
     contr.remoteExceptionHandler(e);
   }
 }
Exemple #2
0
 private void sell() {
   try {
     marketobj.Sell(command.getItemName(), command.getItemDescr(), command.getPrice(), client);
     contr.updateLog(client.getName() + " listed " + command.getItemName() + " for sale");
     getForSale();
   } catch (RemoteException e) {
     contr.remoteExceptionHandler(e);
   }
 }
Exemple #3
0
 private void removeSell() {
   try {
     marketobj.removeSell(
         command.getItemName(), command.getItemDescr(), command.getPrice(), command.getClient());
     contr.updateLog(
         client.getName() + " removed " + command.getItemName() + " that was listed as for sale");
     getForSale();
   } catch (RemoteException e) {
     contr.remoteExceptionHandler(e);
   }
 }
Exemple #4
0
 private void buy() {
   try {
     marketobj.Buy(
         command.getItemName(),
         command.getItemDescr(),
         command.getPrice(),
         command.getSeller(),
         client);
     contr.updateLog(
         "you bought "
             + command.getItemName()
             + " from "
             + command.getSeller()
             + " for: "
             + command.getPrice());
     listItems();
   } catch (RejectedException e2) {
     contr.rejectedExceptionHandler(e2);
   } catch (RemoteException e) {
     contr.remoteExceptionHandler(e);
   }
 }