|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.DefaultEndpoint<Exchange>
org.apache.camel.component.mock.MockEndpoint
org.apache.camel.component.dataset.DataSetEndpoint
public class DataSetEndpoint
Constructor Summary | |
---|---|
DataSetEndpoint(String endpointUri,
Component component,
DataSet dataSet)
|
|
DataSetEndpoint(String endpointUri,
DataSet dataSet)
|
Method Summary | |
---|---|
static void |
assertEquals(String description,
Object expected,
Object actual,
Exchange exchange)
|
protected void |
assertMessageExpected(long index,
Exchange expected,
Exchange actual)
|
Consumer<Exchange> |
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 |
PollingConsumer<Exchange> |
createPollingConsumer()
Creates a new Polling Consumer so that the caller can poll message exchanges from the consumer using PollingConsumer.receive() ,
PollingConsumer.receiveNoWait() or
PollingConsumer.receive(long) whenever it is ready to do so
rather than using the Event
Based Consumer returned by Endpoint.createConsumer(Processor) |
long |
getConsumeDelay()
|
DataSet |
getDataSet()
|
long |
getPreloadSize()
|
long |
getProduceDelay()
|
int |
getReceivedCounter()
|
protected void |
performAssertions(Exchange actual)
|
protected void |
reportProgress(Exchange actual,
int receivedCount)
|
void |
reset()
|
void |
setConsumeDelay(long consumeDelay)
Allows a delay to be specified which causes consumers to pause - to simulate slow consumers |
void |
setDataSet(DataSet dataSet)
|
void |
setPreloadSize(long preloadSize)
Sets how many messages should be preloaded (sent) before the route completes its initialisation |
void |
setProduceDelay(long produceDelay)
Allows a delay to be specified which causes producers to pause - to simpulate slow producers |
void |
start()
Starts the service |
void |
stop()
Stops the service |
protected void |
waitForCompleteLatch()
|
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
---|
configureProperties, convertTo, createExchange, createExchange, createExchange, createExecutorService, equals, getCamelContext, getComponent, getEndpointUri, getExchangePattern, getExchangeType, getExecutorService, hashCode, setCamelContext, setExchangePattern, setExecutorService, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.camel.Endpoint |
---|
configureProperties, createExchange, createExchange, createExchange, getCamelContext, getEndpointUri, setCamelContext |
Constructor Detail |
---|
public DataSetEndpoint(String endpointUri, Component component, DataSet dataSet)
public DataSetEndpoint(String endpointUri, DataSet dataSet)
Method Detail |
---|
public static void assertEquals(String description, Object expected, Object actual, Exchange exchange)
public PollingConsumer<Exchange> createPollingConsumer() throws Exception
Endpoint
PollingConsumer.receive()
,
PollingConsumer.receiveNoWait()
or
PollingConsumer.receive(long)
whenever it is ready to do so
rather than using the Event
Based Consumer returned by Endpoint.createConsumer(Processor)
createPollingConsumer
in interface Endpoint<Exchange>
createPollingConsumer
in class DefaultEndpoint<Exchange>
Exception
- if the pull consumer could not be createdpublic Consumer<Exchange> createConsumer(Processor processor) throws Exception
Endpoint
createConsumer
in interface Endpoint<Exchange>
createConsumer
in class MockEndpoint
Exception
public void reset()
reset
in class MockEndpoint
public int getReceivedCounter()
getReceivedCounter
in class MockEndpoint
public Exchange createExchange(long messageIndex) throws Exception
DataSet
Exception
protected void waitForCompleteLatch() throws InterruptedException
waitForCompleteLatch
in class MockEndpoint
InterruptedException
public DataSet getDataSet()
public void setDataSet(DataSet dataSet)
public long getPreloadSize()
public void setPreloadSize(long preloadSize)
public long getConsumeDelay()
public void setConsumeDelay(long consumeDelay)
public long getProduceDelay()
public void setProduceDelay(long produceDelay)
protected void performAssertions(Exchange actual) throws Exception
performAssertions
in class MockEndpoint
Exception
protected void reportProgress(Exchange actual, int receivedCount)
protected void assertMessageExpected(long index, Exchange expected, Exchange actual) throws Exception
Exception
public void start() throws Exception
Service
start
in interface Service
Exception
public void stop() throws Exception
Service
stop
in interface Service
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |