org.apache.camel.component.flatpack
Class FixedLengthEndpoint
java.lang.Object
org.apache.camel.impl.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:
- 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:
| 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 |
FixedLengthEndpoint
public FixedLengthEndpoint(String uri,
org.springframework.core.io.Resource resource)
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