@SuppressWarnings("unchecked")
	private void createObjectReceiveServer() {
		ServerSocket serverSocket = null;
		try {
			serverSocket = new ServerSocket(Integer.parseInt(port));
			while (true) {
				byte[] data = readData(serverSocket);
				//convert bytes from socket into an object
				if ((data[0] == -84) && (data[1] == -19)) {
					ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(data));
					Object objectOut = ois.readObject();
					//write object to the queue
					if (objectOut != null && this.type.isAssignableFrom(objectOut.getClass())) {
						//This cast is guaranteed because of the if statement above
						q.put((T)objectOut);
					}
				}
			}
		}
		catch (IOException ioe) {
			ioe.printStackTrace();
		}
		catch (ClassNotFoundException cnfe) {
			cnfe.printStackTrace();
		}
		finally {
			if (serverSocket != null) {
				try {
					serverSocket.close();
				} catch (IOException ioe) {
					ioe.printStackTrace();
				}
			}
		}
	}