@Override
	public void run() {
		String msg = "!auction-ended " + getHighestBidder().getName() + " " + printHighestAmount() + " " + getDescribtion();

		try {
			// if owner is online- send notification
			if (userManagement.getUserByName(owner.getName()).isOnline()) {
//				AuctionServer_UDPSocket.getInstamce().sendMessage(owner.getInternetAdress(), owner.getUdpPort(), msg);
			} else { // else save the notification until user gets online again
				userManagement.getUserByName(owner.getName()).storeNotification(msg);
			}

			// just if a highest bidder exist 
			if (!getHighestBidder().getName().equals("none")) {
				// if highest bidder is online send notification
				if (userManagement.getUserByName(getHighestBidder().getName()).isOnline()) {
//					AuctionServer_UDPSocket.getInstamce().sendMessage(getHighestBidder().getInternetAdress(), getHighestBidder().getUdpPort(), msg);
				} else {
					userManagement.getUserByName(getHighestBidder().getName()).storeNotification(msg);
				}

				// send RMI BID_WON Event
				Timestamp logoutTimestamp = new Timestamp(System.currentTimeMillis());
				long timestamp = logoutTimestamp.getTime();
				try {
					mClientHandler.processEvent(new BidEvent(BidEvent.BID_WON, timestamp, getHighestBidder().getName(), id, hightestAmount));
				} catch (WrongEventTypeException e) {
					// wont happen
				} catch (NullPointerException e) {
					logger.error("Remote Object is null");
				}

				// bill auction on the billing server
				// TODO for now this is static, but I'd rather obtain the protocoll instance, but where?
				CommunicationProtocol.billAuction(getHighestBidder().getName(), id, hightestAmount);

			}

			// send RMI AUCTION_ENDED Event
			Timestamp logoutTimestamp = new Timestamp(System.currentTimeMillis());
			long timestamp = logoutTimestamp.getTime();
			try {
				mClientHandler.processEvent(new AuctionEvent(AuctionEvent.AUCTION_ENDED, timestamp, this.id, durationSec, highestBidder.getName()));
			} catch (WrongEventTypeException e) {
				// wont happen
			} catch (NullPointerException e) {
				logger.error("Remote Object is null");
			}

			// if the auciton server is offline- just flack the auction to inactive. else remoove it.
			synchronized (userManagement.syncAuctionList) {
				this.setActive(false);
				logger.debug("setting aucitons active flag to false");
				
//				if (!AuctionServer.isServerIsOnline()) {
//					logger.info("setting aucitons active flag to false");
//					this.setActive(false);
//				} else {
//					logger.info("removing auciton from syncAuctionList");
//					userManagement.syncAuctionList.remove(this); // delete auction from list
//				}
				
			}
		} catch (IOException e) {
			System.out.println("Didn't send Notification.");
		}
	}