Please answer a question about the following article about Samurai:

The English sailor and adventurer William Adams (1564–1620) was the first Westerner to receive the dignity of samurai. The Shogun Tokugawa Ieyasu presented him with two swords representing the authority of a samurai, and decreed that William Adams the sailor was dead and that Anjin Miura (三浦按針), a samurai, was born. Adams also received the title of hatamoto (bannerman), a high-prestige position as a direct retainer in the Shogun's court. He was provided with generous revenues: "For the services that I have done and do daily, being employed in the Emperor's service, the Emperor has given me a living" (Letters). He was granted a fief in Hemi (逸見) within the boundaries of present-day Yokosuka City, "with eighty or ninety husbandmen, that be my slaves or servants" (Letters). His estate was valued at 250 koku. He finally wrote "God hath provided for me after my great misery", (Letters) by which he meant the disaster-ridden voyage that initially brought him to Japan.

What did hatamoto mean?
bannerman