org.apache.servicemix.truezip
Class TrueZipPollerEndpoint
java.lang.Object
org.apache.servicemix.common.Endpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ConsumerEndpoint
org.apache.servicemix.common.endpoints.PollingEndpoint
org.apache.servicemix.truezip.TrueZipPollerEndpoint
- All Implemented Interfaces:
- ExchangeProcessor, TrueZipEndpointType
public class TrueZipPollerEndpoint
- extends PollingEndpoint
- implements TrueZipEndpointType
A polling endpoint which looks for a file or files in a directory and sends
the files into the JBI bus as messages, deleting the files by default when
they are processed.
- Version:
- $Revision: 2908 $
| Methods inherited from class org.apache.servicemix.common.endpoints.PollingEndpoint |
getDelay, getExecutor, getFirstTime, getPeriod, getScheduler, handlePollException, setDelay, setFirstTime, setPeriod, setScheduler, start, stop |
| Methods inherited from class org.apache.servicemix.common.endpoints.ConsumerEndpoint |
configureExchangeTarget, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUri |
| Methods inherited from class org.apache.servicemix.common.Endpoint |
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString |
TrueZipPollerEndpoint
public TrueZipPollerEndpoint()
TrueZipPollerEndpoint
public TrueZipPollerEndpoint(ServiceUnit serviceUnit,
QName service,
String endpoint)
TrueZipPollerEndpoint
public TrueZipPollerEndpoint(DefaultComponent component,
ServiceEndpoint endpoint)
poll
public void poll()
throws Exception
- Specified by:
poll in class PollingEndpoint
- Throws:
Exception
validate
public void validate()
throws DeploymentException
- Overrides:
validate in class ConsumerEndpoint
- Throws:
DeploymentException
createLockManager
protected LockManager createLockManager()
getFile
public File getFile()
setFile
public void setFile(File file)
- Sets the file to poll, which can be a directory or a file.
- Parameters:
file -
getLockManager
public LockManager getLockManager()
- Returns:
- the lockManager
setLockManager
public void setLockManager(LockManager lockManager)
- Parameters:
lockManager - the lockManager to set
getFilter
public FileFilter getFilter()
setFilter
public void setFilter(FileFilter filter)
- Sets the optional filter to choose which files to process
isDeleteFile
public boolean isDeleteFile()
- Returns whether or not we should delete the file when its processed
setDeleteFile
public void setDeleteFile(boolean deleteFile)
isRecursive
public boolean isRecursive()
setRecursive
public void setRecursive(boolean recursive)
isAutoCreateDirectory
public boolean isAutoCreateDirectory()
setAutoCreateDirectory
public void setAutoCreateDirectory(boolean autoCreateDirectory)
getMarshaler
public FileMarshaler getMarshaler()
setMarshaler
public void setMarshaler(FileMarshaler marshaler)
pollFileOrDirectory
protected void pollFileOrDirectory(de.schlichtherle.io.File fileOrDirectory)
pollFileOrDirectory
protected void pollFileOrDirectory(de.schlichtherle.io.File fileOrDirectory,
boolean processDir)
pollFile
protected void pollFile(de.schlichtherle.io.File aFile)
processFileAndDelete
protected void processFileAndDelete(de.schlichtherle.io.File aFile)
processFile
protected void processFile(de.schlichtherle.io.File aFile)
throws Exception
- Throws:
Exception
getLocationURI
public String getLocationURI()
- Specified by:
getLocationURI in class ConsumerEndpoint
process
public void process(MessageExchange exchange)
throws Exception
- Specified by:
process in interface ExchangeProcessor
- Throws:
Exception
Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.