@UriEndpoint(scheme="dataset",
title="Dataset",
syntax="dataset:name",
consumerClass=DataSetConsumer.class,
label="core,testing",
lenientProperties=true)
public class DataSetEndpoint
extends MockEndpoint
implements Service
reportershutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
DataSetEndpoint()
Deprecated.
|
DataSetEndpoint(String endpointUri,
Component component,
DataSet dataSet) |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertEquals(String description,
Object expected,
Object actual,
Exchange exchange) |
protected void |
assertMessageExpected(long index,
Exchange expected,
Exchange actual) |
Consumer |
createConsumer(Processor processor)
Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
|
Exchange |
createExchange(long messageIndex)
Creates a message exchange for the given index in the
DataSet |
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
protected ThroughputLogger |
createReporter() |
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
long |
getConsumeDelay() |
DataSet |
getDataSet() |
String |
getDataSetIndex() |
long |
getInitialDelay() |
int |
getMinRate() |
long |
getPreloadSize() |
long |
getProduceDelay() |
int |
getReceivedCounter() |
protected void |
performAssertions(Exchange actual,
Exchange copy)
Performs the assertions on the incoming exchange.
|
void |
reset() |
void |
setConsumeDelay(long consumeDelay)
Allows a delay to be specified which causes a delay when a message is consumed by the producer (to simulate slow processing)
|
void |
setDataSet(DataSet dataSet) |
void |
setDataSetIndex(String dataSetIndex)
Controls the behaviour of the CamelDataSetIndex header.
|
void |
setInitialDelay(long initialDelay)
Time period in millis to wait before starting sending messages.
|
void |
setMinRate(int minRate)
Wait until the DataSet contains at least this number of messages
|
void |
setPreloadSize(long preloadSize)
Sets how many messages should be preloaded (sent) before the route completes its initialization
|
void |
setProduceDelay(long produceDelay)
Allows a delay to be specified which causes a delay when a message is sent by the consumer (to simulate slow processing)
|
protected void |
waitForCompleteLatch(long timeout) |
addReceivedExchange, allMessages, assertEquals, assertExchangeReceived, assertIsNotSatisfied, assertIsNotSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertIsSatisfied, assertMessagesAscending, assertMessagesDescending, assertMessagesSorted, assertNoDuplicates, assertTrue, assertWait, await, await, doAssertIsSatisfied, expectedBodiesReceived, expectedBodiesReceived, expectedBodiesReceivedInAnyOrder, expectedBodiesReceivedInAnyOrder, expectedBodyReceived, expectedExchangePattern, expectedFileExists, expectedFileExists, expectedHeaderReceived, expectedHeaderValuesReceivedInAnyOrder, expectedHeaderValuesReceivedInAnyOrder, expectedMessageCount, expectedMessagesMatches, expectedMinimumMessageCount, expectedPropertyReceived, expects, expectsAscending, expectsAscending, expectsDescending, expectsDescending, expectsMessageCount, expectsNoDuplicates, expectsNoDuplicates, fail, getExchanges, getExpectedCount, getExpectedMinimumCount, getFailures, getName, getReceivedExchanges, getReporter, getResultWaitTime, getSleepForEmptyTest, handle, isCopyOnExchange, isLenientProperties, isReportGroup, isSingleton, message, onExchange, resetMocks, resolve, returnReplyBody, returnReplyHeader, setAssertPeriod, setAssertPeriod, setCopyOnExchange, setExpectedCount, setExpectedMessageCount, setMinimumExpectedMessageCount, setMinimumResultWaitTime, setName, setReporter, setReportGroup, setResultMinimumWaitTime, setResultWaitTime, setRetainFirst, setRetainLast, setSleepForEmptyTest, waitForCompleteLatch, whenAnyExchangeReceived, whenExchangeReceivedconfigureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, finalize, getClass, notify, notifyAll, wait, wait, waitconfigureProperties, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointConfiguration, getEndpointKey, getEndpointUri, setCamelContext@Deprecated public DataSetEndpoint()
public DataSetEndpoint(String endpointUri, Component component, DataSet dataSet)
public static void assertEquals(String description, Object expected, Object actual, Exchange exchange)
public Consumer createConsumer(Processor processor) throws Exception
EndpointcreateConsumer in interface EndpointcreateConsumer in class MockEndpointprocessor - the given processorException - can be thrownpublic Producer createProducer() throws Exception
EndpointcreateProducer in interface EndpointcreateProducer in class MockEndpointException - can be thrownpublic void reset()
reset in class MockEndpointpublic int getReceivedCounter()
getReceivedCounter in class MockEndpointpublic Exchange createExchange(long messageIndex) throws Exception
DataSetExceptionprotected void waitForCompleteLatch(long timeout) throws InterruptedException
waitForCompleteLatch in class MockEndpointInterruptedExceptionpublic DataSet getDataSet()
public void setDataSet(DataSet dataSet)
public int getMinRate()
public void setMinRate(int minRate)
public long getPreloadSize()
public void setPreloadSize(long preloadSize)
public long getConsumeDelay()
public void setConsumeDelay(long consumeDelay)
public long getProduceDelay()
public void setProduceDelay(long produceDelay)
public long getInitialDelay()
public void setInitialDelay(long initialDelay)
public void setDataSetIndex(String dataSetIndex)
public String getDataSetIndex()
protected void performAssertions(Exchange actual, Exchange copy) throws Exception
MockEndpointperformAssertions in class MockEndpointactual - the actual exchangecopy - a copy of the exchange (only store this)Exception - can be thrown if something went wrongprotected void assertMessageExpected(long index, Exchange expected, Exchange actual) throws Exception
Exceptionprotected ThroughputLogger createReporter()
protected void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class DefaultEndpointExceptionServiceSupport.doStop()Apache Camel