@Metadata(label="eip,routing,circuitbreaker") public class HystrixDefinition extends ProcessorDefinition<HystrixDefinition>
inheritErrorHandler, log
Constructor and Description |
---|
HystrixDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
addOutput(ProcessorDefinition<?> output)
Adds the given definition as output to this block
|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
ProcessorDefinition<?> |
end()
Ends the current block
|
HystrixConfigurationDefinition |
getHystrixConfiguration() |
String |
getHystrixConfigurationRef() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
OnFallbackDefinition |
getOnFallback() |
List<ProcessorDefinition<?>> |
getOutputs() |
HystrixDefinition |
groupKey(String groupKey)
Sets the group key to use.
|
HystrixConfigurationDefinition |
hystrixConfiguration()
Configures the Hystrix EIP
Use end when configuration is complete, to return back to the Hystrix EIP.
|
HystrixDefinition |
hystrixConfiguration(HystrixConfigurationDefinition configuration)
Configures the Hystrix EIP using the given configuration
|
HystrixDefinition |
hystrixConfiguration(String ref)
Refers to a Hystrix configuration to use for configuring the Hystrix EIP.
|
boolean |
isOutputSupported() |
HystrixDefinition |
onFallback()
The Hystrix fallback route path to execute that does not go over the network.
|
HystrixDefinition |
onFallbackViaNetwork()
The Hystrix fallback route path to execute that will go over the network.
|
protected void |
preCreateProcessor()
Strategy to execute any custom logic before the
Processor is created. |
void |
setHystrixConfiguration(HystrixConfigurationDefinition hystrixConfiguration) |
void |
setHystrixConfigurationRef(String hystrixConfigurationRef)
Refers to a Hystrix configuration to use for configuring the Hystrix EIP.
|
void |
setOnFallback(OnFallbackDefinition onFallback) |
void |
setOutputs(List<ProcessorDefinition<?>> outputs) |
HystrixDefinition |
threadPoolKey(String threadPoolKey)
Sets the thread pool key to use.
|
String |
toString() |
addInterceptStrategies, addInterceptStrategy, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createOutputsProcessorImpl, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, endChoice, endDoTry, endHystrix, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrichRef, enrichRef, enrichRef, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, hystrix, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, pollEnrichRef, pollEnrichWith, pollEnrichWith, pollEnrichWith, process, process, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, startupOrder, stop, threads, threads, threads, threads, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapChannel, wrapInErrorHandler, wrapProcessor
description, description, getCustomId, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setId
public HystrixDefinition()
public String getLabel()
ProcessorDefinition
getLabel
in interface NamedNode
getLabel
in class ProcessorDefinition<HystrixDefinition>
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<HystrixDefinition>
Exception
public List<ProcessorDefinition<?>> getOutputs()
getOutputs
in class ProcessorDefinition<HystrixDefinition>
public boolean isOutputSupported()
isOutputSupported
in class ProcessorDefinition<HystrixDefinition>
public void setOutputs(List<ProcessorDefinition<?>> outputs)
public void addOutput(ProcessorDefinition<?> output)
Block
addOutput
in interface Block
addOutput
in class ProcessorDefinition<HystrixDefinition>
output
- the processor definitionpublic ProcessorDefinition<?> end()
ProcessorDefinition
end
in class ProcessorDefinition<HystrixDefinition>
protected void preCreateProcessor()
ProcessorDefinition
Processor
is created.preCreateProcessor
in class ProcessorDefinition<HystrixDefinition>
public HystrixConfigurationDefinition getHystrixConfiguration()
public void setHystrixConfiguration(HystrixConfigurationDefinition hystrixConfiguration)
public String getHystrixConfigurationRef()
public void setHystrixConfigurationRef(String hystrixConfigurationRef)
public OnFallbackDefinition getOnFallback()
public void setOnFallback(OnFallbackDefinition onFallback)
public HystrixDefinition groupKey(String groupKey)
public HystrixDefinition threadPoolKey(String threadPoolKey)
public HystrixConfigurationDefinition hystrixConfiguration()
public HystrixDefinition hystrixConfiguration(HystrixConfigurationDefinition configuration)
public HystrixDefinition hystrixConfiguration(String ref)
public HystrixDefinition onFallback()
This should be a static or cached result that can immediately be returned upon failure.
If the fallback requires network connection then use onFallbackViaNetwork()
.
public HystrixDefinition onFallbackViaNetwork()
Apache Camel