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

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer
          extended by org.apache.camel.impl.ScheduledPollConsumer
              extended by org.apache.camel.component.file.GenericFileConsumer<T>
                  extended by org.apache.camel.component.file.remote.RemoteFileConsumer<T>
All Implemented Interfaces:
Runnable, BatchConsumer, Consumer, Service, ShutdownableService, ShutdownAware, SuspendableService
Direct Known Subclasses:
FtpConsumer, SftpConsumer

public abstract class RemoteFileConsumer<T>
extends GenericFileConsumer<T>

Base class for remote file consumers.


Field Summary
protected  boolean loggedIn
           
 
Fields inherited from class org.apache.camel.component.file.GenericFileConsumer
endpoint, fileExpressionResult, log, maxMessagesPerPoll, operations, pendingExchanges, shutdownRunningTask
 
Constructor Summary
RemoteFileConsumer(RemoteFileEndpoint<T> endpoint, Processor processor, RemoteFileOperations<T> operations)
           
 
Method Summary
protected  void connectIfNecessary()
           
protected  void disconnect()
           
protected  void doStop()
           
 RemoteFileEndpoint<T> getEndpoint()
          Gets the endpoint this Consumer consumes from.
protected  RemoteFileOperations getOperations()
           
protected  void postPollCheck()
          Override if required.
protected  boolean prePollCheck()
          Override if required.
protected  void recoverableConnectIfNecessary()
           
protected  String remoteServer()
          Returns human readable server information for logging purpose
 
Methods inherited from class org.apache.camel.component.file.GenericFileConsumer
canPollMoreFiles, deferShutdown, doStart, getPendingExchangesSize, isBatchAllowed, isInProgress, isMatched, isValidFile, poll, pollDirectory, processBatch, processExchange, setMaxMessagesPerPoll, setOperations
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
getDelay, getInitialDelay, getPollStrategy, getTimeUnit, isPollAllowed, isSuspended, isUseFixedDelay, resume, run, setDelay, setInitialDelay, setPollStrategy, setTimeUnit, setUseFixedDelay, suspend
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
getAsyncProcessor, getExceptionHandler, getProcessor, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

loggedIn

protected boolean loggedIn
Constructor Detail

RemoteFileConsumer

public RemoteFileConsumer(RemoteFileEndpoint<T> endpoint,
                          Processor processor,
                          RemoteFileOperations<T> operations)
Method Detail

getEndpoint

public RemoteFileEndpoint<T> getEndpoint()
Description copied from interface: Consumer
Gets the endpoint this Consumer consumes from.

Specified by:
getEndpoint in interface Consumer
Overrides:
getEndpoint in class DefaultConsumer
Returns:
the endpoint

getOperations

protected RemoteFileOperations getOperations()

prePollCheck

protected boolean prePollCheck()
                        throws Exception
Description copied from class: GenericFileConsumer
Override if required. Perform some checks (and perhaps actions) before we poll.

Overrides:
prePollCheck in class GenericFileConsumer<T>
Returns:
true to poll, false to skip this poll.
Throws:
Exception

postPollCheck

protected void postPollCheck()
Description copied from class: GenericFileConsumer
Override if required. Perform some checks (and perhaps actions) after we have polled.

Overrides:
postPollCheck in class GenericFileConsumer<T>

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class ScheduledPollConsumer
Throws:
Exception

disconnect

protected void disconnect()

recoverableConnectIfNecessary

protected void recoverableConnectIfNecessary()
                                      throws Exception
Throws:
Exception

connectIfNecessary

protected void connectIfNecessary()
                           throws IOException
Throws:
IOException

remoteServer

protected String remoteServer()
Returns human readable server information for logging purpose



Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.