Interface RestOpenApiConsumerFactory
public interface RestOpenApiConsumerFactory
Allows SPI to plugin a
RestOpenApiConsumerFactory that creates the Camel Consumer responsible for
handling incoming HTTP requests from clients that request to access REST services which has been created using the
rest-dsl for an entire open-api specification.- Since:
- 4.6
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateConsumer(CamelContext camelContext, Processor processor, String contextPath, RestConfiguration configuration, Map<String, Object> parameters) Creates a new REST Event Driven Consumer, which consumes messages from the endpoint using the given processordefault booleanWhether consumers created by this factory enforce theoauthProfileoption for validating incomingAuthorization: Bearertokens.
-
Method Details
-
createConsumer
Consumer createConsumer(CamelContext camelContext, Processor processor, String contextPath, RestConfiguration configuration, Map<String, Object> parameters) throws ExceptionCreates a new REST Event Driven Consumer, which consumes messages from the endpoint using the given processor- Parameters:
camelContext- the camel contextprocessor- the processorcontextPath- the context-pathconfiguration- REST configurationparameters- additional parameters- Returns:
- a newly created REST consumer
- Throws:
Exception- can be thrown
-
supportsOAuthProfile
default boolean supportsOAuthProfile()Whether consumers created by this factory enforce theoauthProfileoption for validating incomingAuthorization: Bearertokens. Factories that do not enforce the option must returnfalse, so callers such as the rest-openapi endpoint can fail fast at startup instead of starting an unprotected consumer.- Returns:
- true when consumers created by this factory enforce the
oauthProfileoption - Since:
- 4.21
-