Package info.walnutstreet.vs.ps03.dbserver

Examples of info.walnutstreet.vs.ps03.dbserver.DBServerImpl


   * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
   */
  @Override
  public void widgetSelected(SelectionEvent event) {
    BuyMyGoodsSelectionListener.logger.debug("Listener: Finally buy all the selected goods");
    UiUpdateController controller2 = UiUpdateController.getInstance();
    ConnectionController.getInstance().buyGoods();
    controller2.rebuildClientListTable();
  }
View Full Code Here


   */
  @Override
  public void widgetSelected(SelectionEvent event) {
    int id = Integer.parseInt(this.idOfGood.getText());
    ConnectionController.getInstance().changeGoodreservation(id, 0);
    UiUpdateController controller2 = UiUpdateController.getInstance();
    controller2.removeGoodFromClientList(id);
  }
View Full Code Here

      // TODO [xtreme6400] logger
   
  }

  public void reserve_good(int num, int goodId) {
    ClientObjectBundle bundle = new ClientObjectBundle(ClientCommands.CLIENT_RESERVE_GOOD, new Order(num, goodId));
    send(bundle);
  }
View Full Code Here

    send(bundle);
  }
 

  public void buyGoods() {
    ClientObjectBundle bundle = new ClientObjectBundle(ClientCommands.CLIENT_BUY_GOODS, null);
    send(bundle);
  }
View Full Code Here

    ClientObjectBundle bundle = new ClientObjectBundle(ClientCommands.CLIENT_BUY_GOODS, null);
    send(bundle);
  }
 
  public void changeGoodreservation(int id,int ammount){
    ClientObjectBundle bundle = new ClientObjectBundle(ClientCommands.CLIENT_CHANGE_RESERVATION, new GoodReservationUpdate(id, ammount));
    send(bundle);   
  }
View Full Code Here

  @Override
  public void run() {
    try {
      while (true) {
        ClientObjectBundle object = (ClientObjectBundle)this.inputStream.readObject();
        ClientHandler.logger.debug("ClientHander got Command: " + object.getCommand());
        object.getCommand().execute(this, object);
      }
    } catch (Exception e) {
      ClientHandler.logger.error("ClientHander got an error, probably a client disconnencted.["+e.getLocalizedMessage()+"]");
    }   
  }
View Full Code Here

   * @throws RemoteException
   * @throws NotBoundException
   */
  public static void main(String[] args) throws UnknownHostException, IOException, CompositeAlreadySetupException {
    Client.logger.debug("Client started ...");
    MainWindow window = new MainWindow();
    window.createTabFolder();
    window.createClientListControl();
    window.createGoodComposite();
    if (window.connectionDialog())
      window.runWindow();
    Client.logger.debug("Client stopped");
  }
View Full Code Here

   * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
   */
  @Override
  public void widgetSelected(SelectionEvent event) {
    BuyGoodDialogSelectionListener.logger.debug("Listener: BuyGoodDialogSelectionListener - buy good selected");
    BuyGoodSelectNumOfGoodDialog dialog = new BuyGoodSelectNumOfGoodDialog(this.shell, this.id);
    dialog.open();
  }
View Full Code Here

   *
   * return If the shell should be opened or not
   */
  public boolean connectionDialog() {
    MainWindow.logger.debug("UI: Display the connect dialog");
    ConnectServerDialog dialog = new ConnectServerDialog(this.shell);
    return dialog.open();
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
   */
  @Override
  public void widgetSelected(SelectionEvent event) {
    EditGoodInMyListDialog dialog = new EditGoodInMyListDialog(this.shell);
    dialog.open();
  }
View Full Code Here

TOP

Related Classes of info.walnutstreet.vs.ps03.dbserver.DBServerImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.