|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.model.OptionalIdentifiedDefinition<Type> org.apache.camel.model.ProcessorDefinition<ExpressionNode> org.apache.camel.model.ExpressionNode org.apache.camel.model.IdempotentConsumerDefinition
public class IdempotentConsumerDefinition
Represents an XML <idempotentConsumer/> element
Field Summary |
---|
Fields inherited from class org.apache.camel.model.ProcessorDefinition |
---|
inheritErrorHandler, log |
Constructor Summary | |
---|---|
IdempotentConsumerDefinition()
|
|
IdempotentConsumerDefinition(Expression messageIdExpression,
IdempotentRepository<?> idempotentRepository)
|
Method Summary | |
---|---|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor based on the definition model. |
IdempotentConsumerDefinition |
eager(boolean eager)
Sets whether to eagerly add the key to the idempotent repository or wait until the exchange is complete. |
Boolean |
getEager()
|
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node |
IdempotentRepository<?> |
getMessageIdRepository()
|
String |
getMessageIdRepositoryRef()
|
Boolean |
getRemoveOnFailure()
|
String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images |
Boolean |
getSkipDuplicate()
|
boolean |
isEager()
|
boolean |
isRemoveOnFailure()
|
boolean |
isSkipDuplicate()
|
IdempotentConsumerDefinition |
messageIdRepository(IdempotentRepository<?> idempotentRepository)
Sets the the message id repository for the idempotent consumer |
IdempotentConsumerDefinition |
messageIdRepositoryRef(String messageIdRepositoryRef)
Sets the reference name of the message id repository |
IdempotentConsumerDefinition |
removeOnFailure(boolean removeOnFailure)
Sets whether to remove or keep the key on failure. |
protected IdempotentRepository<?> |
resolveMessageIdRepository(RouteContext routeContext)
Strategy method to resolve the IdempotentRepository to use |
void |
setEager(Boolean eager)
|
void |
setMessageIdRepository(IdempotentRepository<?> idempotentRepository)
|
void |
setMessageIdRepositoryRef(String messageIdRepositoryRef)
|
void |
setRemoveOnFailure(Boolean removeOnFailure)
|
void |
setSkipDuplicate(Boolean skipDuplicate)
|
IdempotentConsumerDefinition |
skipDuplicate(boolean skipDuplicate)
Sets whether to skip duplicates or not. |
String |
toString()
|
Methods inherited from class org.apache.camel.model.ExpressionNode |
---|
configureChild, createFilterProcessor, createPredicate, getExpression, getOutputs, isOutputSupported, preCreateProcessor, setExpression, setOutputs |
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition |
---|
description, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setDescription, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IdempotentConsumerDefinition()
public IdempotentConsumerDefinition(Expression messageIdExpression, IdempotentRepository<?> idempotentRepository)
Method Detail |
---|
public String toString()
toString
in class Object
public String getLabel()
ProcessorDefinition
getLabel
in class ExpressionNode
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in interface NamedNode
getShortName
in class ExpressionNode
public IdempotentConsumerDefinition messageIdRepositoryRef(String messageIdRepositoryRef)
messageIdRepositoryRef
- the reference name of message id repository
public IdempotentConsumerDefinition messageIdRepository(IdempotentRepository<?> idempotentRepository)
idempotentRepository
- the repository instance of idempotent
public IdempotentConsumerDefinition eager(boolean eager)
eager
- true to add the key before processing, false to wait until
the exchange is complete.
public IdempotentConsumerDefinition removeOnFailure(boolean removeOnFailure)
removeOnFailure
- true to remove the key, false to keep the key
if the exchange fails.
public IdempotentConsumerDefinition skipDuplicate(boolean skipDuplicate)
Exchange.DUPLICATE_MESSAGE
set
to a Boolean.TRUE
value. A none duplicate message will not have this property set.
skipDuplicate
- true to skip duplicates, false to allow duplicates.
public String getMessageIdRepositoryRef()
public void setMessageIdRepositoryRef(String messageIdRepositoryRef)
public IdempotentRepository<?> getMessageIdRepository()
public void setMessageIdRepository(IdempotentRepository<?> idempotentRepository)
public Boolean getEager()
public void setEager(Boolean eager)
public boolean isEager()
public Boolean getSkipDuplicate()
public void setSkipDuplicate(Boolean skipDuplicate)
public boolean isSkipDuplicate()
public Boolean getRemoveOnFailure()
public void setRemoveOnFailure(Boolean removeOnFailure)
public boolean isRemoveOnFailure()
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<ExpressionNode>
Exception
protected IdempotentRepository<?> resolveMessageIdRepository(RouteContext routeContext)
IdempotentRepository
to use
routeContext
- route context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |