Class EndpointRoleAttribute
Declares that only one side of an endpoint reads this option — Camel's = "consumer") /
label = "producer". An options class shared by producer and consumer otherwise gives no sign that an option
written on the other side does nothing: username on an http: consumer looked like protection and checked
nobody. The connector refuses such an option by this declaration
(), and tooling — the Route-XML catalog, the editor schema,
check — reads the same declaration by reflection. An option both sides read carries no role.
On a component class it declares the only side the component has: Apache Camel's producerOnly /
consumerOnly. [EndpointRole(EndpointRole.Producer)] on smtp means a route cannot start from it;
the context refuses such a route, and the catalog, the editor schema and check read the same declaration
(). A component with both sides carries none.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
public sealed class EndpointRoleAttribute : Attribute
Inheritance
Properties
Hint
On a component: what to use instead, appended to the refusal of the missing side
public string? Hint { get; init; }
Role
The side that reads the option, or the only side of the component.
public EndpointRole Role { get; }
Constructors
EndpointRoleAttribute(EndpointRole)
Declares that only one side of an endpoint reads this option — Camel's = "consumer") /