@Override
	public void run() {
		try {
			dataConnectionSocket = new Socket(address, port);
			inputStream = new ObjectInputStream(
					dataConnectionSocket.getInputStream());
			DataMessage message = (DataMessage) inputStream.readObject();
			while (message != null) {
				if (message.getDataMessageType() == DataMessageType.NEW_FRAME) {
					client.notifyDataReceived(deviceSerialNumber,
							((NewFrameMessage) message).getFrameContent());
				}
				message = (DataMessage) inputStream.readObject();
			}
		} catch (IOException e) {
			ClientLogger.error(DataClient.class, RemoteResourcesLocalization
					.getMessage(
							RemoteResourcesMessages.DataClient_Error_IOError,
							new Object[] { deviceSerialNumber,
									address.getHostName(), port }), e);
			ClientConnectionManager.getInstance().stopDataConnection(client,
					deviceSerialNumber);
		} catch (ClassNotFoundException e) {
			ClientLogger
					.error(DataClient.class,
							RemoteResourcesLocalization
									.getMessage(
											RemoteResourcesMessages.DataClient_Error_UnknownObjectType,
											new Object[] { deviceSerialNumber,
													address.getHostName(), port }),
							e);
			ClientConnectionManager.getInstance().stopDataConnection(client,
					deviceSerialNumber);
		}
	}