private String fullyQualifiedRegistrationDomain ( ) { if ( job . getRegistrationDomain ( ) . endsWith ( "." ) ) { return job . getRegistrationDomain ( ) ; } else if ( "" . equals ( job . getRegistrationDomain ( ) ) ) { return defaultRegistrationDomain ; } else { return job . getRegistrationDomain ( ) + "." + defaultRegistrationDomain ; } }
Given the registration domain in the job and the default registration domain for the agent figure out what domain we should actually register the job in .