It abstracts duplicate code away. Right now each of SparkUI, MasterWebUI, WorkerWebUI and HistoryServer define their own `serverInfo`, `stop()` and `boundPort` etc. which is common among all these classes.