org.apache.camel.component.file
Class FileEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint<E>
      extended by org.apache.camel.impl.ScheduledPollEndpoint<FileExchange>
          extended by org.apache.camel.component.file.FileEndpoint
All Implemented Interfaces:
Endpoint<FileExchange>

public class FileEndpoint
extends ScheduledPollEndpoint<FileExchange>

A File Endpoint for working with file systems

Version:
$Revision: 523016 $

Constructor Summary
protected FileEndpoint(File file, String endpointUri, FileComponent component)
           
 
Method Summary
 Consumer<FileExchange> createConsumer(Processor file)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 FileExchange createExchange()
          Create a new exchange for communicating with this endpoint
 FileExchange createExchange(File file)
           
 Producer<FileExchange> createProducer()
          Creates a new producer which is used send messages into the endpoint
 File getFile()
           
 boolean isAutoCreate()
           
 boolean isSingleton()
          Returns if the endpoint should be a CamelContext singleton.
 void setAutoCreate(boolean autoCreate)
           
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
convertTo, createExchange, createExecutorService, createPollingConsumer, equals, getComponent, getContext, getEndpointUri, getExchangeType, getExecutorService, hashCode, setExecutorService, toExchangeType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileEndpoint

protected FileEndpoint(File file,
                       String endpointUri,
                       FileComponent component)
Method Detail

createProducer

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

Returns:
a Producer
Throws:
Exception
See Also:
Endpoint.createProducer()

createConsumer

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

Parameters:
file -
Returns:
a Consumer
Throws:
Exception
See Also:
Endpoint.createConsumer(org.apache.camel.Processor)

createExchange

public FileExchange createExchange(File file)
Parameters:
file -
Returns:
a FileExchange
See Also:
Endpoint.createExchange()

createExchange

public FileExchange createExchange()
Description copied from interface: Endpoint
Create a new exchange for communicating with this endpoint

Returns:
an Exchange
See Also:
Endpoint.createExchange()

getFile

public File getFile()

isSingleton

public boolean isSingleton()
Description copied from interface: Endpoint
Returns if the endpoint should be a CamelContext singleton. If the endpoint is a Singleton, then a single Endpoint instance will be shared by all routes with the same URI. Because the endpoint is shared, it should be treated as an immutable.


isAutoCreate

public boolean isAutoCreate()
Returns:
the autoCreate

setAutoCreate

public void setAutoCreate(boolean autoCreate)
Parameters:
autoCreate - the autoCreate to set


Copyright © 2007 Apache Software Foundation. All Rights Reserved.