@UriEndpoint(firstVersion="1.4.0", scheme="flatpack", title="Flatpack", syntax="flatpack:type:resourceUri", consumerClass=FlatpackConsumer.class, label="transformation") public class FlatpackEndpoint extends org.apache.camel.impl.DefaultPollingEndpoint
Constructor and Description |
---|
FlatpackEndpoint() |
FlatpackEndpoint(String endpointUri,
org.apache.camel.Component component,
String resourceUri) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
net.sf.flatpack.Parser |
createDelimitedParser(org.apache.camel.Exchange exchange) |
protected net.sf.flatpack.Parser |
createFixedParser(String resourceUri,
Reader bodyReader) |
net.sf.flatpack.Parser |
createParser(org.apache.camel.Exchange exchange) |
org.apache.camel.Producer |
createProducer() |
char |
getDelimiter() |
org.apache.camel.processor.loadbalancer.LoadBalancer |
getLoadBalancer() |
net.sf.flatpack.ParserFactory |
getParserFactory() |
String |
getResourceUri() |
char |
getTextQualifier() |
FlatpackType |
getType() |
boolean |
isAllowShortLines() |
boolean |
isIgnoreExtraColumns() |
boolean |
isIgnoreFirstRecord() |
boolean |
isSingleton() |
boolean |
isSplitRows() |
void |
processDataSet(org.apache.camel.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(org.apache.camel.processor.loadbalancer.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()
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
createConsumer
in class org.apache.camel.impl.DefaultPollingEndpoint
Exception
public void processDataSet(org.apache.camel.Exchange originalExchange, net.sf.flatpack.DataSet dataSet, int counter) throws Exception
Exception
public net.sf.flatpack.Parser createParser(org.apache.camel.Exchange exchange) throws Exception
Exception
protected net.sf.flatpack.Parser createFixedParser(String resourceUri, Reader bodyReader) throws IOException
IOException
public net.sf.flatpack.Parser createDelimitedParser(org.apache.camel.Exchange exchange) throws org.apache.camel.InvalidPayloadException, IOException
org.apache.camel.InvalidPayloadException
IOException
public String getResourceUri()
public net.sf.flatpack.ParserFactory getParserFactory()
public void setParserFactory(net.sf.flatpack.ParserFactory parserFactory)
public org.apache.camel.processor.loadbalancer.LoadBalancer getLoadBalancer()
public void setLoadBalancer(org.apache.camel.processor.loadbalancer.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)
Apache Camel