@UriEndpoint(firstVersion="1.4.0",
scheme="flatpack",
title="Flatpack",
syntax="flatpack:type:resourceUri",
category=TRANSFORMATION)
public class FlatpackEndpoint
extends org.apache.camel.support.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 |
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
|
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDefaultDelay, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelayconfigurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringbuild, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
createConsumer in interface org.apache.camel.EndpointcreateConsumer in class org.apache.camel.support.DefaultPollingEndpointExceptionpublic void processDataSet(org.apache.camel.Exchange originalExchange,
net.sf.flatpack.DataSet dataSet,
int counter)
throws Exception
Exceptionpublic net.sf.flatpack.Parser createParser(org.apache.camel.Exchange exchange)
throws Exception
Exceptionprotected net.sf.flatpack.Parser createFixedParser(String resourceUri, Reader bodyReader) throws IOException
IOExceptionpublic net.sf.flatpack.Parser createDelimitedParser(org.apache.camel.Exchange exchange)
throws org.apache.camel.InvalidPayloadException,
IOException
org.apache.camel.InvalidPayloadExceptionIOExceptionpublic 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