public void setDomain(String domain) {
		if(domain.length() < 256) {
		try {
			isValidDomain(domain);
			this.domain = domain;
		} catch(Exception e) {
			System.out.println(e.getMessage());
			System.out.println("Domain not set.");
		}
		}
		else
			System.out.println("Domain part length must be less than 256 characters");
	}