SeleniumHQ/selenium — pull request #153 by dimacus (2013-12-12 22:41:58+00:00)
Title: Step 1 in config refactor. Get rid of the GridParameters.properties file...

Problem: We have several implementations of how the configs read from CLI vs JSON Config File vs Configs. Even how the same configs are printed on screen has its own implementation. This makes it very difficult to find which config does what and how to add new ones.

So, here is my plan: To refactor all 3 types of configs (Standalone, Hub, Node) into a common config interface, and get rid of the 3x duplication.

Step 1: Get rid of the properties file that only 1 class uses, and move it into "Proto-Config" who's only job for now is to hold the information the config file had
Step 2: Extract methods such as loadFromCommandLine, loadFromGridYml, loadFromJSON from GridHubConfiguration into a common place, no need to have 3 coppies of the same conditional statements
Step 3: Build basic Config interface for all 3 types of configs we have
Step 4: Make Standalone, Grid, Node config implement common methods to be used by all, such as "setPort" or getTimeout
Step 5: Replace the old config with a single common config object that is unique on per instance level (maxSession only applies to node config etc..) but all of the common methods are moved into a single common location