@Override
	public synchronized void processEvent(Event event) throws RemoteException {

		ArrayList<Event> eventNotifications = new ArrayList<Event>();
		eventNotifications.add(event);

		if(RegExpHelper.isEventType("(AUCTION_.*)", event)) {
			eventNotifications = statisticEvents.processAuctionEvent(eventNotifications);
		} else if(RegExpHelper.isEventType("(USER_.*)", event)) {
			eventNotifications = statisticEvents.processUserEvent(eventNotifications);
		} else if(RegExpHelper.isEventType("(BID_.*)", event)) {
			eventNotifications = statisticEvents.processBidEvent(eventNotifications);
		}


		/*
		for (Subscription sub : subscriptions) { // All subscriptions
			for(Event e : eventNotifications ) { // All events
				if(RegExpHelper.isEventType(sub.getRegex(), e)) {
					try{
						
						sub.getClient().notify(e);   // Callback for matches
						
					}catch(RemoteException ex){
						// nothing to do here right now TODO
					}
				}
			}
		}*/
		
		/*
		 * loop nesting changed & map added -> no notification is sent twice
		 */
		HashMap<String, Boolean> checkNotified;
		
		for(Event e : eventNotifications ) {
			checkNotified = new HashMap<String, Boolean>();
			
			for (Subscription sub : subscriptions) {
				if(RegExpHelper.isEventType(sub.getRegex(), e)) {
					try{
						if(!checkNotified.containsKey(sub.getClient().toString())) {
							sub.getClient().notify(e); 
							checkNotified.put(sub.getClient().toString(), false);
						}
						
					}catch(RemoteException ex){
						System.out.println("A callback for an event (type: " +  e.getType() + " / ID: " + e.getID() + ") failed.");
					}
				}
			}
		}

	}