The master of every vessel arriving in a port for which a harbormaster shall be appointed, under the provisions of this chapter, shall apply to such harbormaster, or one of the harbormaster’s deputies, for a station in the stream, or a berth at the wharves, and the harbormaster or deputy shall forthwith station such vessel in the stream or at the wharves, as the case may be, so as to best facilitate the loading or discharge of such vessel, and at the same time interfere as little as possible with other vessels in the vicinity; but in stationing vessels at wharves or assigning them berths thereat, the harbormaster or deputy shall conform in every instance to the wishes of the managers of such wharves as to their location at the same.