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

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.component.file.GenericFileEndpoint<T>
                  extended by org.apache.camel.component.file.remote.RemoteFileEndpoint<T>
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.BrowsableEndpoint, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
FtpEndpoint, SftpEndpoint

public abstract class RemoteFileEndpoint<T>
extends org.apache.camel.component.file.GenericFileEndpoint<T>

Remote file endpoint.


Field Summary
 
Fields inherited from class org.apache.camel.component.file.GenericFileEndpoint
allowNullBody, antFilter, autoCreate, bufferSize, charset, configuration, DEFAULT_IDEMPOTENT_CACHE_SIZE, DEFAULT_STRATEGYFACTORY_CLASS, delete, directoryMustExist, doneFileName, eagerDeleteTargetFile, eagerMaxMessagesPerPoll, exclude, exclusiveReadLockStrategy, fileExist, fileName, filter, flatten, idempotent, idempotentKey, idempotentRepository, include, inProgressRepository, keepLastModified, localWorkDirectory, log, maxDepth, maxMessagesPerPoll, minDepth, move, moveExisting, moveFailed, noop, preMove, processStrategy, readLock, readLockCheckInterval, readLockLoggingLevel, readLockMinLength, readLockTimeout, recursive, sortBy, sorter, startingDirectoryMustExist, tempFileName, tempPrefix
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
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(org.apache.camel.Processor processor)
          Remote File Endpoints, impl this method to create a custom consumer specific to their "protocol" etc.
protected abstract  org.apache.camel.component.file.GenericFileProducer<T> buildProducer()
          Remote File Endpoints, impl this method to create a custom producer specific to their "protocol" etc.
 RemoteFileConsumer<T> createConsumer(org.apache.camel.Processor processor)
           
 org.apache.camel.Exchange createExchange(org.apache.camel.component.file.GenericFile<T> file)
           
 org.apache.camel.component.file.GenericFileProducer<T> createProducer()
           
abstract  RemoteFileOperations<T> createRemoteFileOperations()
          Creates the operations to be used by the consumer or producer.
 RemoteFileConfiguration getConfiguration()
           
 char getFileSeparator()
           
 int getMaximumReconnectAttempts()
           
protected  Map<String,Object> getParamsAsMap()
           
 long getReconnectDelay()
           
 boolean isAbsolute(String name)
           
 boolean isDisconnect()
           
 boolean isDownload()
           
 boolean isFastExistsCheck()
           
 String remoteServerInformation()
          Returns human readable server information for logging purpose
 void setDisconnect(boolean disconnect)
           
 void setDownload(boolean download)
           
 void setFastExistsCheck(boolean fastExistsCheck)
           
 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, getAntFilter, getBufferSize, getCharset, getDoneFileName, getExchanges, getExclude, getExclusiveReadLockStrategy, getFileExist, getFileName, getFilter, getGeneratedFileName, getGenericFileProcessStrategy, getIdempotentKey, getIdempotentRepository, getInclude, getInProgressRepository, getLocalWorkDirectory, getMaxDepth, getMaxMessagesPerPoll, getMinDepth, getMove, getMoveExisting, getMoveFailed, getPreMove, getProcessStrategy, getReadLock, getReadLockCheckInterval, getReadLockLoggingLevel, getReadLockMinLength, getReadLockTimeout, getScheme, getSortBy, getSorter, getTempFileName, getTempPrefix, isAllowNullBody, isAutoCreate, isDelete, isDirectoryMustExist, isDoneFile, isEagerDeleteTargetFile, isEagerMaxMessagesPerPoll, isFlatten, isIdempotent, isIdempotentSet, isKeepLastModified, isNoop, isRecursive, isSingleton, isStartingDirectoryMustExist, setAllowNullBody, setAntExclude, setAntFilterCaseSensitive, setAntInclude, setAutoCreate, setBufferSize, setCharset, setConfiguration, setDelete, setDirectoryMustExist, setDoneFileName, setEagerDeleteTargetFile, setEagerMaxMessagesPerPoll, setExclude, setExclusiveReadLockStrategy, setFileExist, setFileName, setFileName, setFilter, setFlatten, setIdempotent, setIdempotentKey, setIdempotentKey, setIdempotentRepository, setInclude, setInProgressRepository, setKeepLastModified, setLocalWorkDirectory, setMaxDepth, setMaxMessagesPerPoll, setMinDepth, setMove, setMove, setMoveExisting, setMoveExisting, setMoveFailed, setMoveFailed, setNoop, setPreMove, setPreMove, setProcessStrategy, setReadLock, setReadLockCheckInterval, setReadLockLoggingLevel, setReadLockMinLength, setReadLockTimeout, setRecursive, setSortBy, setSortBy, setSortBy, setSorter, setStartingDirectoryMustExist, setTempFileName, setTempFileName, setTempPrefix
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setProperties, setSynchronous, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, 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.Endpoint
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointConfiguration, 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 org.apache.camel.component.file.GenericFileEndpoint<T>

createExchange

public org.apache.camel.Exchange createExchange(org.apache.camel.component.file.GenericFile<T> file)
Specified by:
createExchange in class org.apache.camel.component.file.GenericFileEndpoint<T>

createProducer

public org.apache.camel.component.file.GenericFileProducer<T> createProducer()
                                                                      throws Exception
Specified by:
createProducer in interface org.apache.camel.Endpoint
Overrides:
createProducer in class org.apache.camel.component.file.GenericFileEndpoint<T>
Throws:
Exception

createConsumer

public RemoteFileConsumer<T> createConsumer(org.apache.camel.Processor processor)
                                     throws Exception
Specified by:
createConsumer in interface org.apache.camel.Endpoint
Overrides:
createConsumer in class org.apache.camel.component.file.GenericFileEndpoint<T>
Throws:
Exception

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

getParamsAsMap

protected Map<String,Object> getParamsAsMap()
Overrides:
getParamsAsMap in class org.apache.camel.component.file.GenericFileEndpoint<T>

buildConsumer

protected abstract RemoteFileConsumer<T> buildConsumer(org.apache.camel.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 org.apache.camel.component.file.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 org.apache.camel.component.file.GenericFileEndpoint<T>

isAbsolute

public boolean isAbsolute(String name)
Specified by:
isAbsolute in class org.apache.camel.component.file.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)

isFastExistsCheck

public boolean isFastExistsCheck()

setFastExistsCheck

public void setFastExistsCheck(boolean fastExistsCheck)

isDownload

public boolean isDownload()

setDownload

public void setDownload(boolean download)


Apache Camel