org.apache.camel.component.file.remote
Class RemoteFileEndpoint<T>

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.component.file.GenericFileEndpoint<T>
                  extended by org.apache.camel.component.file.remote.RemoteFileEndpoint<T>
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, BrowsableEndpoint, HasId
Direct Known Subclasses:
FtpEndpoint, SftpEndpoint

public abstract class RemoteFileEndpoint<T>
extends GenericFileEndpoint<T>

Remote file endpoint.


Field Summary
 
Fields inherited from class org.apache.camel.component.file.GenericFileEndpoint
autoCreate, bufferSize, charset, configuration, DEFAULT_IDEMPOTENT_CACHE_SIZE, DEFAULT_STRATEGYFACTORY_CLASS, delete, directoryMustExist, doneFileName, eagerDeleteTargetFile, exclude, exclusiveReadLockStrategy, fileExist, fileName, filter, flatten, idempotent, idempotentRepository, include, inProgressRepository, keepLastModified, localWorkDirectory, log, maxDepth, maxMessagesPerPoll, minDepth, move, moveFailed, noop, preMove, processStrategy, readLock, readLockCheckInterval, readLockTimeout, recursive, sortBy, sorter, startingDirectoryMustExist, tempFileName, tempPrefix
 
Constructor Summary
RemoteFileEndpoint()
           
RemoteFileEndpoint(String uri, RemoteFileComponent<T> component, RemoteFileConfiguration configuration)
           
 
Method Summary
protected  void afterPropertiesSet()
          Validates this endpoint if its configured properly.
protected abstract  RemoteFileConsumer<T> buildConsumer(Processor processor)
          Remote File Endpoints, impl this method to create a custom consumer specific to their "protocol" etc.
protected abstract  GenericFileProducer<T> buildProducer()
          Remote File Endpoints, impl this method to create a custom producer specific to their "protocol" etc.
 RemoteFileConsumer<T> createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Exchange createExchange(GenericFile<T> file)
           
 GenericFileProducer<T> createProducer()
          Creates a new producer which is used send messages into the endpoint
abstract  RemoteFileOperations<T> createRemoteFileOperations()
          Creates the operations to be used by the consumer or producer.
 RemoteFileConfiguration getConfiguration()
           
 char getFileSeparator()
           
 int getMaximumReconnectAttempts()
           
 long getReconnectDelay()
           
 boolean isAbsolute(String name)
           
 boolean isDisconnect()
           
 String remoteServerInformation()
          Returns human readable server information for logging purpose
 void setDisconnect(boolean disconnect)
           
 void setMaximumReconnectAttempts(int maximumReconnectAttempts)
           
 void setReconnectDelay(long reconnectDelay)
           
 
Methods inherited from class org.apache.camel.component.file.GenericFileEndpoint
configureExchange, configureMessage, configureMoveOrPreMoveExpression, createDoneFileName, createGenericFileStrategy, doStart, doStop, getBufferSize, getCharset, getDoneFileName, getExchanges, getExclude, getExclusiveReadLockStrategy, getFileExist, getFileName, getFilter, getGeneratedFileName, getGenericFileProcessStrategy, getIdempotentRepository, getInclude, getInProgressRepository, getLocalWorkDirectory, getMaxDepth, getMaxMessagesPerPoll, getMinDepth, getMove, getMoveFailed, getParamsAsMap, getPreMove, getProcessStrategy, getReadLock, getReadLockCheckInterval, getReadLockTimeout, getScheme, getSortBy, getSorter, getTempFileName, getTempPrefix, isAutoCreate, isDelete, isDirectoryMustExist, isDoneFile, isEagerDeleteTargetFile, isFlatten, isIdempotent, isKeepLastModified, isNoop, isRecursive, isSingleton, isStartingDirectoryMustExist, setAutoCreate, setBufferSize, setCharset, setConfiguration, setDelete, setDirectoryMustExist, setDoneFileName, setEagerDeleteTargetFile, setExclude, setExclusiveReadLockStrategy, setFileExist, setFileName, setFileName, setFilter, setFlatten, setIdempotent, setIdempotentRepository, setInclude, setInProgressRepository, setKeepLastModified, setLocalWorkDirectory, setMaxDepth, setMaxMessagesPerPoll, setMinDepth, setMove, setMove, setMoveFailed, setMoveFailed, setNoop, setPreMove, setPreMove, setProcessStrategy, setReadLock, setReadLockCheckInterval, setReadLockTimeout, setRecursive, setSortBy, setSortBy, setSortBy, setSorter, setStartingDirectoryMustExist, setTempFileName, setTempFileName, setTempPrefix
 
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, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, 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.Endpoint
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointKey, getEndpointUri, isLenientProperties, setCamelContext
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

RemoteFileEndpoint

public RemoteFileEndpoint()

RemoteFileEndpoint

public RemoteFileEndpoint(String uri,
                          RemoteFileComponent<T> component,
                          RemoteFileConfiguration configuration)
Method Detail

getConfiguration

public RemoteFileConfiguration getConfiguration()
Overrides:
getConfiguration in class GenericFileEndpoint<T>

createExchange

public Exchange createExchange(GenericFile<T> file)
Specified by:
createExchange in class GenericFileEndpoint<T>

createProducer

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

Specified by:
createProducer in interface Endpoint
Specified by:
createProducer in class GenericFileEndpoint<T>
Returns:
a newly created producer
Throws:
Exception - can be thrown

createConsumer

public RemoteFileConsumer<T> 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
Specified by:
createConsumer in class GenericFileEndpoint<T>
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

afterPropertiesSet

protected void afterPropertiesSet()
                           throws Exception
Validates this endpoint if its configured properly.

Throws:
Exception - is thrown if endpoint is invalid configured for its mandatory options

buildConsumer

protected abstract RemoteFileConsumer<T> buildConsumer(Processor processor)
Remote File Endpoints, impl this method to create a custom consumer specific to their "protocol" etc.

Parameters:
processor - the processor
Returns:
the created consumer

buildProducer

protected abstract GenericFileProducer<T> buildProducer()
Remote File Endpoints, impl this method to create a custom producer specific to their "protocol" etc.

Returns:
the created producer

createRemoteFileOperations

public abstract RemoteFileOperations<T> createRemoteFileOperations()
                                                            throws Exception
Creates the operations to be used by the consumer or producer.

Returns:
a new created operations
Throws:
Exception - is thrown if error creating operations.

remoteServerInformation

public String remoteServerInformation()
Returns human readable server information for logging purpose


getFileSeparator

public char getFileSeparator()
Specified by:
getFileSeparator in class GenericFileEndpoint<T>

isAbsolute

public boolean isAbsolute(String name)
Specified by:
isAbsolute in class GenericFileEndpoint<T>

getMaximumReconnectAttempts

public int getMaximumReconnectAttempts()

setMaximumReconnectAttempts

public void setMaximumReconnectAttempts(int maximumReconnectAttempts)

getReconnectDelay

public long getReconnectDelay()

setReconnectDelay

public void setReconnectDelay(long reconnectDelay)

isDisconnect

public boolean isDisconnect()

setDisconnect

public void setDisconnect(boolean disconnect)


Apache CAMEL