public abstract class BuilderSupport extends Object
Modifier | Constructor and Description |
---|---|
protected |
BuilderSupport() |
protected |
BuilderSupport(CamelContext context) |
Modifier and Type | Method and Description |
---|---|
ValueBuilder |
bean(Class<?> beanType)
Deprecated.
use
method(Class) instead |
ValueBuilder |
bean(Class<?> beanType,
String method)
Deprecated.
use
method(Class, String) instead |
ValueBuilder |
bean(Object beanOrBeanRef)
Deprecated.
use
method(Object) instead |
ValueBuilder |
bean(Object beanOrBeanRef,
String method)
Deprecated.
use
method(Object, String) instead |
ValueBuilder |
body()
Returns a predicate and value builder for the inbound body on an exchange
|
<T> ValueBuilder |
body(Class<T> type)
Deprecated.
use
bodyAs(Class) |
<T> ValueBuilder |
bodyAs(Class<T> type)
Returns a predicate and value builder for the inbound message body as a
specific type
|
ValueBuilder |
constant(Object value)
Returns a constant expression value builder
|
protected ErrorHandlerBuilder |
createErrorHandlerBuilder() |
DeadLetterChannelBuilder |
deadLetterChannel(Endpoint deadLetterEndpoint)
Dead Letter Channel EIP:
is a error handler for handling messages that could not be delivered to it's intended destination.
|
DeadLetterChannelBuilder |
deadLetterChannel(String deadLetterUri)
Dead Letter Channel EIP:
is a error handler for handling messages that could not be delivered to it's intended destination.
|
DefaultErrorHandlerBuilder |
defaultErrorHandler()
Creates a default error handler.
|
Endpoint |
endpoint(String uri)
Resolves the given URI to an endpoint
|
<T extends Endpoint> |
endpoint(String uri,
Class<T> type)
Resolves the given URI to an endpoint of the specified type
|
List<Endpoint> |
endpoints(Endpoint... endpoints)
Helper method to create a list of
Endpoint instances |
List<Endpoint> |
endpoints(String... uris)
Resolves the list of URIs into a list of
Endpoint instances |
ValueBuilder |
exceptionMessage()
Returns a exception expression value builder
|
ValueBuilder |
exchangeProperty(String name)
Returns a value builder for the given exchange property
|
ValueBuilder |
faultBody()
Returns a predicate and value builder for the fault body on an
exchange
|
<T> ValueBuilder |
faultBodyAs(Class<T> type)
Deprecated.
use
bodyAs(Class) |
ModelCamelContext |
getContext() |
ErrorHandlerBuilder |
getErrorHandlerBuilder() |
ValueBuilder |
header(String name)
Returns a value builder for the given header
|
ValueBuilder |
jsonpath(String value)
Returns a JSonPath expression value builder
|
ValueBuilder |
jsonpath(String value,
Class<?> resultType)
Returns a JSonPath expression value builder
|
ValueBuilder |
language(String language,
String expression)
Returns a language expression value builder
|
LoggingErrorHandlerBuilder |
loggingErrorHandler()
Deprecated.
use dead letter channel with a log endpoint
|
LoggingErrorHandlerBuilder |
loggingErrorHandler(org.slf4j.Logger log)
Deprecated.
use dead letter channel with a log endpoint
|
LoggingErrorHandlerBuilder |
loggingErrorHandler(org.slf4j.Logger log,
LoggingLevel level)
Deprecated.
use dead letter channel with a log endpoint
|
LoggingErrorHandlerBuilder |
loggingErrorHandler(String log)
Deprecated.
use dead letter channel with a log endpoint
|
ValueBuilder |
method(Class<?> beanType)
Returns a method call expression
value builder
|
ValueBuilder |
method(Class<?> beanType,
String method)
Returns a method call expression
value builder
|
ValueBuilder |
method(Object beanOrBeanRef)
Returns a method call expression
value builder
This method accepts dual parameters.
|
ValueBuilder |
method(Object beanOrBeanRef,
String method)
Returns a method call expression
value builder
This method accepts dual parameters.
|
NoErrorHandlerBuilder |
noErrorHandler()
Creates a disabled error handler
for removing the default error handler
|
ValueBuilder |
outBody()
Deprecated.
use
body() |
<T> ValueBuilder |
outBody(Class<T> type)
Deprecated.
use
bodyAs(Class) |
ValueBuilder |
property(String name)
Deprecated.
use
exchangeProperty(String) instead |
ValueBuilder |
regexReplaceAll(Expression content,
String regex,
Expression replacement)
Returns an expression value builder that replaces all occurrences of the
regular expression with the given replacement
|
ValueBuilder |
regexReplaceAll(Expression content,
String regex,
String replacement)
Returns an expression value builder that replaces all occurrences of the
regular expression with the given replacement
|
ValueBuilder |
sendTo(String uri)
Deprecated.
not in use, and not available in XML DSL
|
void |
setContext(CamelContext context) |
void |
setContext(ModelCamelContext context) |
void |
setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
Sets the error handler to use with processors created by this builder
|
SimpleBuilder |
simple(String value)
Returns a simple expression value builder
|
SimpleBuilder |
simple(String value,
Class<?> resultType)
Returns a simple expression value builder
|
SimpleBuilder |
simpleF(String format,
Class<?> resultType,
Object... values)
Returns a simple expression value builder, using String.format style
|
SimpleBuilder |
simpleF(String format,
Object... values)
Returns a simple expression value builder, using String.format style
|
ValueBuilder |
systemProperty(String name)
Returns a value builder for the given system property
|
ValueBuilder |
systemProperty(String name,
String defaultValue)
Returns a value builder for the given system property
|
XPathBuilder |
xpath(String value)
Returns a xpath expression value builder
|
XPathBuilder |
xpath(String value,
Class<?> resultType)
Returns a xpath expression value builder
|
protected BuilderSupport()
protected BuilderSupport(CamelContext context)
public ValueBuilder header(String name)
@Deprecated public ValueBuilder property(String name)
exchangeProperty(String)
insteadpublic ValueBuilder exchangeProperty(String name)
public ValueBuilder body()
@Deprecated public <T> ValueBuilder body(Class<T> type)
bodyAs(Class)
public <T> ValueBuilder bodyAs(Class<T> type)
@Deprecated public ValueBuilder outBody()
body()
@Deprecated public <T> ValueBuilder outBody(Class<T> type)
bodyAs(Class)
public ValueBuilder faultBody()
@Deprecated public <T> ValueBuilder faultBodyAs(Class<T> type)
bodyAs(Class)
public ValueBuilder systemProperty(String name)
public ValueBuilder systemProperty(String name, String defaultValue)
public ValueBuilder constant(Object value)
public ValueBuilder jsonpath(String value)
public ValueBuilder jsonpath(String value, Class<?> resultType)
value
- The JSonPath expressionresultType
- The result type that the JSonPath expression will return.public ValueBuilder language(String language, String expression)
public SimpleBuilder simple(String value)
public SimpleBuilder simple(String value, Class<?> resultType)
public SimpleBuilder simpleF(String format, Object... values)
public SimpleBuilder simpleF(String format, Class<?> resultType, Object... values)
public XPathBuilder xpath(String value)
value
- the XPath expressionpublic XPathBuilder xpath(String value, Class<?> resultType)
value
- the XPath expressionresultType
- the result type that the XPath expression will return.@Deprecated public ValueBuilder bean(Object beanOrBeanRef)
method(Object)
insteadbeanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registry@Deprecated public ValueBuilder bean(Object beanOrBeanRef, String method)
method(Object, String)
insteadbeanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registrymethod
- name of method to invoke@Deprecated public ValueBuilder bean(Class<?> beanType)
method(Class)
insteadbeanType
- the Class of the bean which we want to invoke@Deprecated public ValueBuilder bean(Class<?> beanType, String method)
method(Class, String)
insteadbeanType
- the Class of the bean which we want to invokemethod
- name of method to invokepublic ValueBuilder method(Object beanOrBeanRef)
beanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registrypublic ValueBuilder method(Object beanOrBeanRef, String method)
beanOrBeanRef
- either an instanceof a bean or a reference to bean to lookup in the Registrymethod
- name of method to invokepublic ValueBuilder method(Class<?> beanType)
beanType
- the Class of the bean which we want to invokepublic ValueBuilder method(Class<?> beanType, String method)
beanType
- the Class of the bean which we want to invokemethod
- name of method to invoke@Deprecated public ValueBuilder sendTo(String uri)
uri
- endpoint uri to send the exchange topublic ValueBuilder regexReplaceAll(Expression content, String regex, String replacement)
public ValueBuilder regexReplaceAll(Expression content, String regex, Expression replacement)
public ValueBuilder exceptionMessage()
public Endpoint endpoint(String uri) throws NoSuchEndpointException
uri
- the uri to resolveNoSuchEndpointException
- if the endpoint URI could not be resolvedpublic <T extends Endpoint> T endpoint(String uri, Class<T> type) throws NoSuchEndpointException
uri
- the uri to resolvetype
- the excepted type of the endpointNoSuchEndpointException
- if the endpoint URI could not be resolvedpublic List<Endpoint> endpoints(String... uris) throws NoSuchEndpointException
Endpoint
instancesuris
- list of endpoints to resolveNoSuchEndpointException
- if an endpoint URI could not be resolvedpublic List<Endpoint> endpoints(Endpoint... endpoints)
Endpoint
instancesendpoints
- endpointspublic DefaultErrorHandlerBuilder defaultErrorHandler()
public NoErrorHandlerBuilder noErrorHandler()
@Deprecated public LoggingErrorHandlerBuilder loggingErrorHandler()
@Deprecated public LoggingErrorHandlerBuilder loggingErrorHandler(String log)
@Deprecated public LoggingErrorHandlerBuilder loggingErrorHandler(org.slf4j.Logger log)
@Deprecated public LoggingErrorHandlerBuilder loggingErrorHandler(org.slf4j.Logger log, LoggingLevel level)
public DeadLetterChannelBuilder deadLetterChannel(String deadLetterUri)
deadLetterUri
- uri to the dead letter endpoint storing dead messagespublic DeadLetterChannelBuilder deadLetterChannel(Endpoint deadLetterEndpoint)
deadLetterEndpoint
- dead letter endpoint storing dead messagespublic ModelCamelContext getContext()
public void setContext(CamelContext context)
public void setContext(ModelCamelContext context)
public ErrorHandlerBuilder getErrorHandlerBuilder()
protected ErrorHandlerBuilder createErrorHandlerBuilder()
public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder)
Apache Camel