What are the terms “endogenous” and “exogenous” used to describe antigens

What are the terms “endogenous” and “exogenous” used to describe antigens

What are the terms “endogenous” and “exogenous” used to describe antigens, and what type of immunity each one stimulates. How does this relate to the effectiveness of vaccines?