code: public static Properties writeUserDataAsProperties(
  			Map<String,String> messagingConfiguration,
  			String domain,
  			String applicationName,
  			String scopedInstancePath )
  	throws IOException {
  
  		Properties result = new Properties();
  		if( applicationName != null )
  			result.setProperty( APPLICATION_NAME, applicationName );
  
  		if( scopedInstancePath != null )
  			result.setProperty( SCOPED_INSTANCE_PATH, scopedInstancePath );
  
  		if( domain != null )
  			result.setProperty( DOMAIN, domain );
  
  		if( messagingConfiguration != null ) {
  			for( Map.Entry<String,String> e : messagingConfiguration.entrySet()) {
  				if( e.getValue() != null )
  					result.setProperty( e.getKey(), e.getValue());
  			}
  		}
  
  		interceptLoadingFiles( result );
  		return result;
  	}
docs: Writes user data as properties.
  <p>
  If file contents should be sent as well, use {@link #ENCODE_FILE_CONTENT_PREFIX}.
  </p>
  
  @param domain the domain (used among other things in the messaging)
  @param applicationName the application name
  @param scopedInstancePath the scoped instance's path (the instance associated with the agent)
  @param messagingConfiguration a map containing the messaging configuration
  @return a non-null object
  @throws IOException if files had to be loaded and were not found