Lets refactor the port preference to a local private method since it is used again exactly down in the getName() method.