|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.model.OptionalIdentifiedDefinition
org.apache.camel.model.ProcessorDefinition<Type>
org.apache.camel.model.OutputDefinition<SamplingDefinition>
org.apache.camel.model.SamplingDefinition
public class SamplingDefinition
Represents an XML <sample/> element
| Field Summary |
|---|
| Fields inherited from class org.apache.camel.model.OutputDefinition |
|---|
outputs |
| Fields inherited from class org.apache.camel.model.ProcessorDefinition |
|---|
errorHandlerBuilder, errorHandlerRef, inheritErrorHandler, log |
| Constructor Summary | |
|---|---|
SamplingDefinition()
|
|
SamplingDefinition(long messageFrequency)
|
|
SamplingDefinition(long samplePeriod,
TimeUnit units)
|
|
| Method Summary | |
|---|---|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor based on the definition model. |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node |
Long |
getMessageFrequency()
|
Long |
getSamplePeriod()
|
String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images |
TimeUnit |
getUnits()
|
SamplingDefinition |
sampleMessageFrequency(long messageFrequency)
Sets the sample message count which only a single Exchange will pass through after this many received. |
SamplingDefinition |
samplePeriod(long samplePeriod)
Sets the sample period during which only a single Exchange will pass through. |
void |
setMessageFrequency(Long messageFrequency)
|
void |
setSamplePeriod(Long samplePeriod)
|
void |
setUnits(String units)
|
void |
setUnits(TimeUnit units)
|
SamplingDefinition |
timeUnits(TimeUnit units)
Sets the time units for the sample period, defaulting to seconds. |
String |
toString()
|
| Methods inherited from class org.apache.camel.model.OutputDefinition |
|---|
getOutputs, 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 SamplingDefinition()
public SamplingDefinition(long samplePeriod,
TimeUnit units)
public SamplingDefinition(long messageFrequency)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getShortName()
OptionalIdentifiedDefinition
getShortName in class OptionalIdentifiedDefinitionpublic String getLabel()
ProcessorDefinition
getLabel in class ProcessorDefinition<SamplingDefinition>
public Processor createProcessor(RouteContext routeContext)
throws Exception
ProcessorDefinition
createProcessor in class ProcessorDefinition<SamplingDefinition>Exceptionpublic SamplingDefinition sampleMessageFrequency(long messageFrequency)
Exchange will pass through after this many received.
messageFrequency -
public SamplingDefinition samplePeriod(long samplePeriod)
Exchange will pass through.
samplePeriod - the period
public SamplingDefinition timeUnits(TimeUnit units)
units - the time unit of the sample period.
public Long getSamplePeriod()
public void setSamplePeriod(Long samplePeriod)
public Long getMessageFrequency()
public void setMessageFrequency(Long messageFrequency)
public void setUnits(String units)
public void setUnits(TimeUnit units)
public TimeUnit getUnits()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||