How does a man become a king in Medieval Ireland?

Who is eligible to rule?

How is a king chosen?
banfeis (pagan)
bull feast (pagan)
ordaination (christian)

Stories about men becoming kings:
Niall, King of Ireland (A.D. 379 - 405)
Cormac, son of Art
Conare Mar, King of Ulaid
Ailill, husband of Medb and King of Connacht