org.apache.camel.component.flatpack
Class FixedLengthEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.impl.ScheduledPollEndpoint
              extended by org.apache.camel.impl.DefaultPollingEndpoint
                  extended by 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:

Field Summary
protected  String definition
           
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
FixedLengthEndpoint()
           
FixedLengthEndpoint(String endpointUri, org.apache.camel.Component component, String definition)
           
 
Method Summary
 org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
           
 net.sf.flatpack.Parser createParser(org.apache.camel.Exchange exchange)
           
protected  net.sf.flatpack.Parser createParser(String resourceUri, Reader bodyReader)
           
 org.apache.camel.Producer createProducer()
           
 String getDefinition()
           
 org.apache.camel.processor.loadbalancer.LoadBalancer getLoadBalancer()
           
 net.sf.flatpack.ParserFactory getParserFactory()
           
 boolean isAllowShortLines()
           
 boolean isIgnoreExtraColumns()
           
 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 setIgnoreExtraColumns(boolean ignoreExtraColumns)
          Allows for lines to be longer than expected and ignores the extra characters
 void setLoadBalancer(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
           
 void setParserFactory(net.sf.flatpack.ParserFactory parserFactory)
           
 void setSplitRows(boolean splitRows)
          Sets the Component to send each row as a separate exchange once parsed
 
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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

definition

protected String definition
Constructor Detail

FixedLengthEndpoint

public FixedLengthEndpoint()

FixedLengthEndpoint

public FixedLengthEndpoint(String endpointUri,
                           org.apache.camel.Component component,
                           String definition)
Method Detail

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