org.apache.camel.component.flatpack
Class FixedLengthEndpoint

java.lang.Object
  extended by org.apache.camel.impl.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:
CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId
Direct Known Subclasses:
DelimitedEndpoint

public class FixedLengthEndpoint
extends DefaultPollingEndpoint

A Flatpack Endpoint for working with fixed width and delimited files

Version:

Constructor Summary
FixedLengthEndpoint(String uri, org.springframework.core.io.Resource resource)
           
 
Method Summary
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Exchange createExchange(net.sf.flatpack.DataSet dataSet, int counter)
           
 net.sf.flatpack.Parser createParser(Exchange exchange)
           
protected  net.sf.flatpack.Parser createParser(org.springframework.core.io.Resource resource, Reader bodyReader)
           
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 LoadBalancer getLoadBalancer()
           
 net.sf.flatpack.ParserFactory getParserFactory()
           
 org.springframework.core.io.Resource getResource()
           
 boolean isSingleton()
          Whether this class supports being singleton or not.
 boolean isSplitRows()
           
 void processDataSet(net.sf.flatpack.DataSet dataSet, int counter)
           
 void setLoadBalancer(LoadBalancer loadBalancer)
           
 void setParserFactory(net.sf.flatpack.ParserFactory parserFactory)
           
 void setSplitRows(boolean splitRows)
           
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, 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
 

Constructor Detail

FixedLengthEndpoint

public FixedLengthEndpoint(String uri,
                           org.springframework.core.io.Resource resource)
Method Detail

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Returns:
true to be a single shared instance, false to create new instances.

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Returns:
a newly created producer
Throws:
Exception - can be thrown

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Overrides:
createConsumer in class DefaultPollingEndpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

processDataSet

public void processDataSet(net.sf.flatpack.DataSet dataSet,
                           int counter)
                    throws Exception
Throws:
Exception

createExchange

public Exchange createExchange(net.sf.flatpack.DataSet dataSet,
                               int counter)

createParser

public net.sf.flatpack.Parser createParser(Exchange exchange)
                                    throws InvalidPayloadException,
                                           IOException
Throws:
InvalidPayloadException
IOException

createParser

protected net.sf.flatpack.Parser createParser(org.springframework.core.io.Resource resource,
                                              Reader bodyReader)
                                       throws IOException
Throws:
IOException

getResource

public org.springframework.core.io.Resource getResource()

getParserFactory

public net.sf.flatpack.ParserFactory getParserFactory()

setParserFactory

public void setParserFactory(net.sf.flatpack.ParserFactory parserFactory)

getLoadBalancer

public LoadBalancer getLoadBalancer()

setLoadBalancer

public void setLoadBalancer(LoadBalancer loadBalancer)

isSplitRows

public boolean isSplitRows()

setSplitRows

public void setSplitRows(boolean splitRows)


Apache CAMEL