Interface RestEndpointBuilderFactory.RestEndpointProducerBuilder
-
- All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder
,org.apache.camel.EndpointProducerResolver
- All Known Subinterfaces:
RestEndpointBuilderFactory.RestEndpointBuilder
- Enclosing interface:
- RestEndpointBuilderFactory
public static interface RestEndpointBuilderFactory.RestEndpointProducerBuilder extends org.apache.camel.builder.EndpointProducerBuilder
Builder for endpoint producers for the REST component.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default RestEndpointBuilderFactory.AdvancedRestEndpointProducerBuilder
advanced()
default RestEndpointBuilderFactory.RestEndpointProducerBuilder
apiDoc(String apiDoc)
The openapi api doc resource to use.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
bindingMode(String bindingMode)
Configures the binding mode for the producer.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
bindingMode(RestEndpointBuilderFactory.RestBindingMode bindingMode)
Configures the binding mode for the producer.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
consumes(String consumes)
Media type such as: 'text/xml', or 'application/json' this REST service accepts.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
host(String host)
Host and port of HTTP service to use (override host in openapi schema).default RestEndpointBuilderFactory.RestEndpointProducerBuilder
inType(String inType)
To declare the incoming POJO binding type as a FQN class name.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
lazyStartProducer(boolean lazyStartProducer)
Whether the producer should be started lazy (on the first message).default RestEndpointBuilderFactory.RestEndpointProducerBuilder
lazyStartProducer(String lazyStartProducer)
Whether the producer should be started lazy (on the first message).default RestEndpointBuilderFactory.RestEndpointProducerBuilder
outType(String outType)
To declare the outgoing POJO binding type as a FQN class name.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
producerComponentName(String producerComponentName)
The Camel Rest component to use for (producer) the REST transport, such as http, undertow.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
produces(String produces)
Media type such as: 'text/xml', or 'application/json' this REST service returns.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
queryParameters(String queryParameters)
Query parameters for the HTTP service to call.default RestEndpointBuilderFactory.RestEndpointProducerBuilder
routeId(String routeId)
Name of the route this REST services creates.
-
-
-
Method Detail
-
advanced
default RestEndpointBuilderFactory.AdvancedRestEndpointProducerBuilder advanced()
-
consumes
default RestEndpointBuilderFactory.RestEndpointProducerBuilder consumes(String consumes)
Media type such as: 'text/xml', or 'application/json' this REST service accepts. By default we accept all kinds of types. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
consumes
- the value to set- Returns:
- the dsl builder
-
inType
default RestEndpointBuilderFactory.RestEndpointProducerBuilder inType(String inType)
To declare the incoming POJO binding type as a FQN class name. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
inType
- the value to set- Returns:
- the dsl builder
-
outType
default RestEndpointBuilderFactory.RestEndpointProducerBuilder outType(String outType)
To declare the outgoing POJO binding type as a FQN class name. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
outType
- the value to set- Returns:
- the dsl builder
-
produces
default RestEndpointBuilderFactory.RestEndpointProducerBuilder produces(String produces)
Media type such as: 'text/xml', or 'application/json' this REST service returns. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
produces
- the value to set- Returns:
- the dsl builder
-
routeId
default RestEndpointBuilderFactory.RestEndpointProducerBuilder routeId(String routeId)
Name of the route this REST services creates. The option is a: <code>java.lang.String</code> type. Group: common- Parameters:
routeId
- the value to set- Returns:
- the dsl builder
-
apiDoc
default RestEndpointBuilderFactory.RestEndpointProducerBuilder apiDoc(String apiDoc)
The openapi api doc resource to use. The resource is loaded from classpath by default and must be in JSON format. The option is a: <code>java.lang.String</code> type. Group: producer- Parameters:
apiDoc
- the value to set- Returns:
- the dsl builder
-
bindingMode
default RestEndpointBuilderFactory.RestEndpointProducerBuilder bindingMode(RestEndpointBuilderFactory.RestBindingMode bindingMode)
Configures the binding mode for the producer. If set to anything other than 'off' the producer will try to convert the body of the incoming message from inType to the json or xml, and the response from json or xml to outType. The option is a: <code>org.apache.camel.spi.RestConfiguration$RestBindingMode</code> type. Group: producer- Parameters:
bindingMode
- the value to set- Returns:
- the dsl builder
-
bindingMode
default RestEndpointBuilderFactory.RestEndpointProducerBuilder bindingMode(String bindingMode)
Configures the binding mode for the producer. If set to anything other than 'off' the producer will try to convert the body of the incoming message from inType to the json or xml, and the response from json or xml to outType. The option will be converted to a <code>org.apache.camel.spi.RestConfiguration$RestBindingMode</code> type. Group: producer- Parameters:
bindingMode
- the value to set- Returns:
- the dsl builder
-
host
default RestEndpointBuilderFactory.RestEndpointProducerBuilder host(String host)
Host and port of HTTP service to use (override host in openapi schema). The option is a: <code>java.lang.String</code> type. Group: producer- Parameters:
host
- the value to set- Returns:
- the dsl builder
-
lazyStartProducer
default RestEndpointBuilderFactory.RestEndpointProducerBuilder lazyStartProducer(boolean lazyStartProducer)
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option is a: <code>boolean</code> type. Default: false Group: producer- Parameters:
lazyStartProducer
- the value to set- Returns:
- the dsl builder
-
lazyStartProducer
default RestEndpointBuilderFactory.RestEndpointProducerBuilder lazyStartProducer(String lazyStartProducer)
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option will be converted to a <code>boolean</code> type. Default: false Group: producer- Parameters:
lazyStartProducer
- the value to set- Returns:
- the dsl builder
-
producerComponentName
default RestEndpointBuilderFactory.RestEndpointProducerBuilder producerComponentName(String producerComponentName)
The Camel Rest component to use for (producer) the REST transport, such as http, undertow. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestProducerFactory is registered in the registry. If either one is found, then that is being used. The option is a: <code>java.lang.String</code> type. Group: producer- Parameters:
producerComponentName
- the value to set- Returns:
- the dsl builder
-
queryParameters
default RestEndpointBuilderFactory.RestEndpointProducerBuilder queryParameters(String queryParameters)
Query parameters for the HTTP service to call. The query parameters can contain multiple parameters separated by ampersand such such as foo=123&bar=456. The option is a: <code>java.lang.String</code> type. Group: producer- Parameters:
queryParameters
- the value to set- Returns:
- the dsl builder
-
-