@Override
	public Auction bid(User user, long auctionId, double amount) {

		Auction a = auctions.get(auctionId);

		if (a == null)
			return null;

		User prevHighestBidder = a.getHighestBidder();

		a.addBid(new Bid(amount, user));

		// Report event
		if (as != null) {
			try {
				as.processEvent(new BidEvent(EventType.BID_PLACED, user
						.getName(), auctionId, amount));
			} catch (Exception e) {
				// Don't propagate the exception, because we don't care for
				// RMI exceptions
				// Maybe add logging later
			}
		}

		// Notify overbid
		if (prevHighestBidder != null && !prevHighestBidder.equals(user)
				&& !prevHighestBidder.equals(a.getHighestBidder())) {
			prevHighestBidder.addNotification("!new-bid " + a.getDescription());

			// Report event
			if (as != null) {
				try {
					as.processEvent(new BidEvent(EventType.BID_OVERBID,
							prevHighestBidder.getName(), auctionId, amount));
				} catch (Exception e) {
					// Don't propagate the exception, because we don't care for
					// RMI exceptions
					// Maybe add logging later
				}
			}
		}

		return a;
	}