org.apache.camel.component.flatpack
Class FixedLengthEndpoint
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.impl.ScheduledPollEndpoint
org.apache.camel.impl.DefaultPollingEndpoint
org.apache.camel.component.flatpack.FixedLengthEndpoint
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
- Direct Known Subclasses:
- DelimitedEndpoint
public class FixedLengthEndpoint
- extends org.apache.camel.impl.DefaultPollingEndpoint
A Flatpack Endpoint
for working with fixed width and delimited files
- Version:
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint |
configureProperties |
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from interface org.apache.camel.Service |
start, stop |
definition
protected String definition
FixedLengthEndpoint
public FixedLengthEndpoint()
FixedLengthEndpoint
public FixedLengthEndpoint(String endpointUri,
org.apache.camel.Component component,
String definition)
isSingleton
public boolean isSingleton()
createProducer
public org.apache.camel.Producer createProducer()
throws Exception
- Throws:
Exception
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
- Specified by:
createConsumer
in interface org.apache.camel.Endpoint
- Overrides:
createConsumer
in class org.apache.camel.impl.DefaultPollingEndpoint
- Throws:
Exception
processDataSet
public void processDataSet(org.apache.camel.Exchange originalExchange,
net.sf.flatpack.DataSet dataSet,
int counter)
throws Exception
- Throws:
Exception
createParser
public net.sf.flatpack.Parser createParser(org.apache.camel.Exchange exchange)
throws org.apache.camel.InvalidPayloadException,
IOException
- Throws:
org.apache.camel.InvalidPayloadException
IOException
createParser
protected net.sf.flatpack.Parser createParser(String resourceUri,
Reader bodyReader)
throws IOException
- Throws:
IOException
getDefinition
public String getDefinition()
getParserFactory
public net.sf.flatpack.ParserFactory getParserFactory()
setParserFactory
public void setParserFactory(net.sf.flatpack.ParserFactory parserFactory)
getLoadBalancer
public org.apache.camel.processor.loadbalancer.LoadBalancer getLoadBalancer()
setLoadBalancer
public void setLoadBalancer(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
isSplitRows
public boolean isSplitRows()
setSplitRows
public void setSplitRows(boolean splitRows)
- Sets the Component to send each row as a separate exchange once parsed
isAllowShortLines
public boolean isAllowShortLines()
setAllowShortLines
public void setAllowShortLines(boolean allowShortLines)
- Allows for lines to be shorter than expected and ignores the extra characters
setIgnoreExtraColumns
public void setIgnoreExtraColumns(boolean ignoreExtraColumns)
- Allows for lines to be longer than expected and ignores the extra characters
isIgnoreExtraColumns
public boolean isIgnoreExtraColumns()
Apache CAMEL