@UriEndpoint(scheme="flatpack", title="Flatpack", syntax="flatpack:type:resourceUri", consumerClass=FlatpackConsumer.class, label="transformation") public class FlatpackEndpoint extends DefaultPollingEndpoint
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
FlatpackEndpoint() |
FlatpackEndpoint(String endpointUri,
Component component,
String resourceUri) |
Modifier and Type | Method and Description |
---|---|
Consumer |
createConsumer(Processor processor)
Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
|
net.sf.flatpack.Parser |
createDelimitedParser(Exchange exchange) |
protected net.sf.flatpack.Parser |
createFixedParser(String resourceUri,
Reader bodyReader) |
net.sf.flatpack.Parser |
createParser(Exchange exchange) |
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
char |
getDelimiter() |
LoadBalancer |
getLoadBalancer() |
net.sf.flatpack.ParserFactory |
getParserFactory() |
String |
getResourceUri() |
char |
getTextQualifier() |
FlatpackType |
getType() |
boolean |
isAllowShortLines() |
boolean |
isIgnoreExtraColumns() |
boolean |
isIgnoreFirstRecord() |
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
boolean |
isSplitRows() |
void |
processDataSet(Exchange originalExchange,
net.sf.flatpack.DataSet dataSet,
int counter) |
void |
setAllowShortLines(boolean allowShortLines)
Allows for lines to be shorter than expected and ignores the extra characters
|
void |
setDelimiter(char delimiter)
The default character delimiter for delimited files.
|
void |
setIgnoreExtraColumns(boolean ignoreExtraColumns)
Allows for lines to be longer than expected and ignores the extra characters
|
void |
setIgnoreFirstRecord(boolean ignoreFirstRecord)
Whether the first line is ignored for delimited files (for the column headers).
|
void |
setLoadBalancer(LoadBalancer loadBalancer) |
void |
setParserFactory(net.sf.flatpack.ParserFactory parserFactory) |
void |
setResourceUri(String resourceUri)
URL for loading the flatpack mapping file from classpath or file system
|
void |
setSplitRows(boolean splitRows)
Sets the Component to send each row as a separate exchange once parsed
|
void |
setTextQualifier(char textQualifier)
The text qualifier for delimited files.
|
void |
setType(FlatpackType type)
Whether to use fixed or delimiter
|
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, initConsumerProperties, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public boolean isSingleton()
IsSingleton
public Producer createProducer() throws Exception
Endpoint
Exception
- can be thrownpublic Consumer createConsumer(Processor processor) throws Exception
Endpoint
createConsumer
in interface Endpoint
createConsumer
in class DefaultPollingEndpoint
processor
- the given processorException
- can be thrownpublic void processDataSet(Exchange originalExchange, net.sf.flatpack.DataSet dataSet, int counter) throws Exception
Exception
public net.sf.flatpack.Parser createParser(Exchange exchange) throws Exception
Exception
protected net.sf.flatpack.Parser createFixedParser(String resourceUri, Reader bodyReader) throws IOException
IOException
public net.sf.flatpack.Parser createDelimitedParser(Exchange exchange) throws InvalidPayloadException, IOException
InvalidPayloadException
IOException
public String getResourceUri()
public net.sf.flatpack.ParserFactory getParserFactory()
public void setParserFactory(net.sf.flatpack.ParserFactory parserFactory)
public LoadBalancer getLoadBalancer()
public void setLoadBalancer(LoadBalancer loadBalancer)
public boolean isSplitRows()
public void setSplitRows(boolean splitRows)
public boolean isAllowShortLines()
public void setAllowShortLines(boolean allowShortLines)
public void setIgnoreExtraColumns(boolean ignoreExtraColumns)
public boolean isIgnoreExtraColumns()
public FlatpackType getType()
public void setType(FlatpackType type)
public void setResourceUri(String resourceUri)
public char getDelimiter()
public void setDelimiter(char delimiter)
public char getTextQualifier()
public void setTextQualifier(char textQualifier)
public boolean isIgnoreFirstRecord()
public void setIgnoreFirstRecord(boolean ignoreFirstRecord)
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.