mPort = remote.getIntAttr(Provisioning.A_zimbraRemoteManagementPort, -1);
mPort = remote.getIntAttr(Provisioning.A_zimbraRemoteManagementPort, DEFAULT_REMOTE_MANAGEMENT_PORT);
	private RemoteManager(Server remote) throws ServiceException {	    mHost = remote.getAttr(Provisioning.A_zimbraServiceHostname, null);	    if (mHost == null) throw ServiceException.FAILURE("server " + remote.getName() + " does not have a service host name", null);	    	    mPort = remote.getIntAttr(Provisioning.A_zimbraRemoteManagementPort, -1);	    if (mPort < 0) throw ServiceException.FAILURE("server " + remote.getName() + " has invalid " + Provisioning.A_zimbraRemoteManagementPort, null);	    	    mUser = remote.getAttr(Provisioning.A_zimbraRemoteManagementUser, null);	    if (mUser == null) throw ServiceException.FAILURE("server " + remote.getName() + " has no " + Provisioning.A_zimbraRemoteManagementUser, null);	    mShimCommand = remote.getAttr(Provisioning.A_zimbraRemoteManagementCommand, null);	    if (mShimCommand == null) throw ServiceException.FAILURE("server " + remote.getName() + " has no " + Provisioning.A_zimbraRemoteManagementCommand, null);			    Server local = Provisioning.getInstance().getLocalServer();	    String localName = local.getName(); 	    String privateKey = local.getAttr(Provisioning.A_zimbraRemoteManagementPrivateKeyPath, null);	    if (privateKey == null) {	        throw ServiceException.FAILURE("server " + localName + " has no " + Provisioning.A_zimbraRemoteManagementPrivateKeyPath, null);	    }	    	    File key = new File(privateKey);	    if (!key.exists()) {	        throw ServiceException.FAILURE("server " + localName + " " + Provisioning.A_zimbraRemoteManagementPrivateKeyPath + " (" + key + ") does not exist", null);	    }	    if (!key.canRead()) {	        throw ServiceException.FAILURE("server " + localName + " " + Provisioning.A_zimbraRemoteManagementPrivateKeyPath + " (" + key + ") is not readable", null);	    }	    mPrivateKey = key;	    mDescription = "{RemoteManager: " + localName + "->" + mUser + "@" + mHost + ":" + mPort + "}";	}