Class OsgiParserFactory
- java.lang.Object
-
- org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
-
- org.apache.camel.component.file.remote.OsgiParserFactory
-
- All Implemented Interfaces:
org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory
public class OsgiParserFactory extends org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
OsgiParserFactory commons-net DefaultFTPFileEntryParserFactory uses Class.forName, and fails to load custom ParserFactories in OSGI. This class is an alternative ParserFactory that can be used when Camel is used in an OSGI environment.
-
-
Constructor Summary
Constructors Constructor Description OsgiParserFactory(org.apache.camel.spi.ClassResolver ocr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.net.ftp.FTPFileEntryParser
createFileEntryParser(String key)
org.apache.commons.net.ftp.FTPFileEntryParser
createFileEntryParser(org.apache.commons.net.ftp.FTPClientConfig config)
void
setClassResolver(org.apache.camel.spi.ClassResolver ocr)
setClassResolver sets a class resolver which can be used instead of Class.forName for class resolution.
-
-
-
Method Detail
-
setClassResolver
public void setClassResolver(org.apache.camel.spi.ClassResolver ocr)
setClassResolver sets a class resolver which can be used instead of Class.forName for class resolution.- Parameters:
ocr
- Class Resolver
-
createFileEntryParser
public org.apache.commons.net.ftp.FTPFileEntryParser createFileEntryParser(String key)
- Specified by:
createFileEntryParser
in interfaceorg.apache.commons.net.ftp.parser.FTPFileEntryParserFactory
- Overrides:
createFileEntryParser
in classorg.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
-
createFileEntryParser
public org.apache.commons.net.ftp.FTPFileEntryParser createFileEntryParser(org.apache.commons.net.ftp.FTPClientConfig config) throws org.apache.commons.net.ftp.parser.ParserInitializationException
- Specified by:
createFileEntryParser
in interfaceorg.apache.commons.net.ftp.parser.FTPFileEntryParserFactory
- Overrides:
createFileEntryParser
in classorg.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
- Throws:
org.apache.commons.net.ftp.parser.ParserInitializationException
-
-