@Override
	public synchronized void onEvent(Event event, Socket socket)
	{
		switch(event.getType())
		{
		case Protocol.REGISTER_REQUEST:
			RegisterRequest registerRequest = (RegisterRequest)event;
			//create connection?
			try
			{
				//Socket socket = new Socket(request.getIP(), request.getPort());
				//need to verify ip address...
				//otherwise send deregister?
				validateRegistration(registerRequest, socket);


			}catch(IOException ioe)
			{
				ioe.printStackTrace();
			}


			break;
			
		case Protocol.DEREGISTER_REQUEST:
			DeregisterRequest deregisterRequest = (DeregisterRequest)event;
			try
			{
				//Socket socket = new Socket(request.getIP(), request.getPort());
				//need to verify ip address...
				//otherwise send deregister?
				validateDeregistration(deregisterRequest, socket);


			}catch(IOException ioe)
			{
				ioe.printStackTrace();
			}
			break;
			
		case Protocol.TASK_COMPLETE:
			System.out.println("TASK COMPLETE");
			if(++_completedTasks == _connections.size()) //all completed
			{
				try
				{
					TimeUnit.SECONDS.sleep(5);
				}catch(InterruptedException ie)
				{
					ie.printStackTrace();
				}
				sendTaskSummaryRequest();
			}
			break;
			
		case Protocol.TASK_SUMMARY_RESPONSE:
			TaskSummaryResponse response = (TaskSummaryResponse)event;
			System.out.println(response.getIP());
			System.out.println(response.getPort());
			System.out.println(response.getSendTracker());
			System.out.println(response.getSendSummation());
			System.out.println(response.getReceiveTracker());
			System.out.println(response.getReceiveSummation());
			System.out.println(response.getRelayTracker());
			
		default:
			//invalid event?
			break;
		}
	}