protected String registerProcessingNode(final String protocol,final String host,final int servicePort,final int adminPort,final SPQRResourceManagerClient client) throws RequiredInputMissingException, RemoteClientConnectionFailedException, IOException {
  if (StringUtils.isBlank(protocol))   throw new RequiredInputMissingException("Missing require communication protocol used by resource manager for accessing this node. See 'protocol' property in config file.");
  if (StringUtils.isBlank(host))   throw new RequiredInputMissingException("Missing required host name used by resource manager for accessing this node. See 'host' property in config file.");
  if (servicePort < 1)   throw new RequiredInputMissingException("Missing required service port used by resource manager for accessing this node. See 'servicePort' property in config file.");
  if (adminPort < 1)   throw new RequiredInputMissingException("Missing required admin port used by resource manager for accessing this node. See 'adminPort' property in config file.");
  final NodeRegistrationResponse registrationResponse=client.registerNode(protocol,host,servicePort,adminPort);
  if (registrationResponse == null)   throw new RemoteClientConnectionFailedException("Failed to connect with resource manager. Error: no response received");
  if (registrationResponse.getState() != NodeRegistrationState.OK)   throw new RemoteClientConnectionFailedException("Failed to register processing node with resource manage. Reason: " + registrationResponse.getState() + ". Message: "+ registrationResponse.getMessage());
  return registrationResponse.getId();
}

protected String registerProcessingNode ( final String protocol , final String host , final int servicePort , final int adminPort , final SPQRResourceManagerClient client ) throws RequiredInputMissingException , RemoteClientConnectionFailedException , IOException { if ( StringUtils . isBlank ( protocol ) ) throw new RequiredInputMissingException ( "Missing require communication protocol used by resource manager for accessing this node. See 'protocol' property in config file." ) ; if ( StringUtils . isBlank ( host ) ) throw new RequiredInputMissingException ( "Missing required host name used by resource manager for accessing this node. See 'host' property in config file." ) ; if ( servicePort < 1 ) throw new RequiredInputMissingException ( "Missing required service port used by resource manager for accessing this node. See 'servicePort' property in config file." ) ; if ( adminPort < 1 ) throw new RequiredInputMissingException ( "Missing required admin port used by resource manager for accessing this node. See 'adminPort' property in config file." ) ; final NodeRegistrationResponse registrationResponse = client . registerNode ( protocol , host , servicePort , adminPort ) ; if ( registrationResponse == null ) throw new RemoteClientConnectionFailedException ( "Failed to connect with resource manager. Error: no response received" ) ; if ( registrationResponse . getState ( ) != NodeRegistrationState . OK ) throw new RemoteClientConnectionFailedException ( "Failed to register processing node with resource manage. Reason: " + registrationResponse . getState ( ) + ". Message: " + registrationResponse . getMessage ( ) ) ; return registrationResponse . getId ( ) ; }
registers this processing node with the remote resource manager
